[Privoxy-commits] [privoxy] 03/12: Bring back "--with-fdsetsize" now that select() is supported again
    User Git 
    git at git.privoxy.org
       
    Tue Jan  5 13:56:39 UTC 2021
    
    
  
This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository privoxy.
commit b007fbc564941cc5fcc22f356cf5f9a6433aa932
Author: Fabian Keil <fk at fabiankeil.de>
AuthorDate: Sat Jan 2 14:37:24 2021 +0100
    Bring back "--with-fdsetsize" now that select() is supported again
    
    This reverts commit d2a6fcf8b923dc9f81b03417ede4d44f0beb03e0.
---
 configure.in | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
diff --git a/configure.in b/configure.in
index c6276434..91d8128d 100644
--- a/configure.in
+++ b/configure.in
@@ -480,6 +480,27 @@ fi
 
 AC_SUBST(PTHREAD_ONLY)
 
+dnl =================================================================
+dnl On most platforms select() does not support fd numbers above
+dnl FD_SETSIZE, as a result Privoxy can't handle more than
+dnl approximately FD_SETSIZE/2 client connections.
+dnl On some platforms the value can be changed at compile time,
+dnl on others it's hardcoded and requires recompilation of the OS.
+dnl Only relevant if select() is actually being used.
+dnl =================================================================
+AC_ARG_WITH(fdsetsize,
+ [  --with-fdsetsize=n  Optimistically redefine FD_SETSIZE with the intend to change the number of connections Privoxy can handle. Dangerous if the platform doesn't support this. Pointless if Privoxy can use poll() instead of select().],
+ [
+   if test "x$withval" != "xyes"; then
+     AC_DEFINE_UNQUOTED(FD_SETSIZE,$with_fdsetsize,[Relevant for select(). Not honoured by all OS.])
+     echo "Redefining FD_SETSIZE to $with_fdsetsize."
+     AC_MSG_WARN(On platforms that don't support FD_SETSIZE redefinition it may cause memory corruption.)
+   else
+     AC_MSG_ERROR(--with-fdsetsize used without value)
+   fi
+   ]
+)
+
 dnl =================================================================
 dnl Support for thread-safe versions of gethostbyaddr, gethostbyname,
 dnl gmtime and localtime
-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
    
    
More information about the Privoxy-commits
mailing list