[Privoxy-devel] remove warnings for win32 && --disable-pthread

Lee ler762 at gmail.com
Sun Mar 21 18:08:36 UTC 2021


On 3/21/21, User Git  wrote:
>
> commit bf54b0927201c92a2e44998824cef998eea67cb8
> Author: Fabian Keil <fk at fabiankeil.de>
> AuthorDate: Thu Mar 18 18:25:15 2021 +0100
>
>     configure: Add another warning in case --disable-pthread is used

Posix threads need to be disabled on windows - see w32svrapi.c

#ifndef FEATURE_PTHREAD
   /* NOTE: a cygwin cross-compiler build for --host=i686-w64-mingw32
must disable POSIX threading - eg
    *         ./configure --host=i686-w64-mingw32 --disable-pthread
    */
   child_id = _beginthread(w32_service_listen_loop, 0, NULL);
   if (child_id > 0)
#else
#error "FIXME: Do pthread stuff here!"
#endif

How does this look?

$ git diff configure.in
diff --git a/configure.in b/configure.in
index 3ec78e00..b1527b42 100644
--- a/configure.in
+++ b/configure.in
@@ -459,7 +459,7 @@ AC_ARG_ENABLE(pthread,
 [  --disable-pthread               Don't use POSIX threads (pthreads)],
 [if test $enableval = no; then
   # Disable pthreads
-  if test $have_pthread = yes; then
+  if test $have_pthread = yes -a $target_type != mingw; then
      AC_MSG_WARN([pthreads seem to be available but you are using
--disable-pthread.])
      AC_MSG_WARN([This is almost always a mistake and can render
Privoxy unacceptable slow.])
      AC_MSG_WARN([Also various Privoxy features only work when using
threads and won't even compile without them.])

Lee

> diff --git a/configure.in b/configure.in
> index 07f2fd9c..3ec78e00 100644
> --- a/configure.in
> +++ b/configure.in
> @@ -462,6 +462,7 @@ AC_ARG_ENABLE(pthread,
>    if test $have_pthread = yes; then
>       AC_MSG_WARN([pthreads seem to be available but you are using
> --disable-pthread.])
>       AC_MSG_WARN([This is almost always a mistake and can render Privoxy
> unacceptable slow.])
> +     AC_MSG_WARN([Also various Privoxy features only work when using
> threads and won't even compile without them.])
>    fi
>    have_pthread=no
>  fi])


More information about the Privoxy-devel mailing list