]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Prior to Solaris 7, Solaris apps could not select() more than 1024
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Thu, 28 Aug 2003 15:16:08 +0000 (15:16 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Thu, 28 Aug 2003 15:16:08 +0000 (15:16 +0000)
file descriptors...

Align select set to 32 bit boundary.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@3888 7a7537e8-13f0-0310-91df-b6672ffda945

config-scripts/cups-network.m4
cups/http.c
scheduler/main.c

index b34a7da16f9915fe6e2c8a79092238a08d8ed6bf..1cfa7140dd0378a281ed183ce554b45cbb78744c 100644 (file)
@@ -1,5 +1,5 @@
 dnl
-dnl "$Id: cups-network.m4,v 1.9 2003/02/12 19:31:10 mike Exp $"
+dnl "$Id: cups-network.m4,v 1.10 2003/08/28 15:16:07 mike Exp $"
 dnl
 dnl   Networking stuff for the Common UNIX Printing System (CUPS).
 dnl
@@ -36,13 +36,24 @@ AC_CHECK_HEADER(sys/sockio.h,AC_DEFINE(HAVE_SYS_SOCKIO_H))
 
 AC_SUBST(NETLIBS)
 
-maxfiles=4096
+if test "$uname" = "SunOS"; then
+       case "$uversion" in
+               55* | 56*)
+                       maxfiles=1024
+                       ;;
+               *)
+                       maxfiles=4096
+                       ;;
+       esac
+else
+       maxfiles=4096
+fi
 
-AC_ARG_WITH(maxfiles, [  --with-maxfiles=N       set maximum number of file descriptors for CUPS. ],
+AC_ARG_WITH(maxfiles, [  --with-maxfiles=N       set maximum number of file descriptors for scheduler ],
        maxfiles=$withval)
 
 AC_DEFINE_UNQUOTED(CUPS_MAX_FDS, $maxfiles)
 
 dnl
-dnl End of "$Id: cups-network.m4,v 1.9 2003/02/12 19:31:10 mike Exp $".
+dnl End of "$Id: cups-network.m4,v 1.10 2003/08/28 15:16:07 mike Exp $".
 dnl
index a2370c9ef0f12dd6cdc27757a1f25c6f8c45fbaf..85a70d0b91a9567e91c80835b1e9580ad1e5d92b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: http.c,v 1.122 2003/08/04 18:45:51 swdev Exp $"
+ * "$Id: http.c,v 1.123 2003/08/28 15:16:07 mike Exp $"
  *
  *   HTTP routines for the Common UNIX Printing System (CUPS).
  *
@@ -2019,7 +2019,7 @@ http_wait(http_t *http,                   /* I - HTTP data */
 
     getrlimit(RLIMIT_NOFILE, &limit);
 
-    http->input_set = calloc(1, (limit.rlim_cur + 7) / 8);
+    http->input_set = calloc(1, (limit.rlim_cur + 31) / 32);
 #endif /* WIN32 */
 
     if (!http->input_set)
@@ -2410,5 +2410,5 @@ CDSAWriteFunc(SSLConnectionRef connection,        /* I  - SSL/TLS connection */
 
 
 /*
- * End of "$Id: http.c,v 1.122 2003/08/04 18:45:51 swdev Exp $".
+ * End of "$Id: http.c,v 1.123 2003/08/28 15:16:07 mike Exp $".
  */
index 34408fa85c1a37e83632147d2dd4b0d539d3e31c..3f7cc33947158f8616c30ac0dc9acdeafd844101 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: main.c,v 1.107 2003/08/01 20:00:53 mike Exp $"
+ * "$Id: main.c,v 1.108 2003/08/28 15:16:08 mike Exp $"
  *
  *   Scheduler main loop for the Common UNIX Printing System (CUPS).
  *
@@ -291,7 +291,7 @@ main(int  argc,                             /* I - Number of command-line arguments */
   * Allocate memory for the input and output sets...
   */
 
-  SetSize   = (MaxFDs + 7) / 8;
+  SetSize   = (MaxFDs + 31) / 32;
   InputSet  = (fd_set *)calloc(1, SetSize);
   OutputSet = (fd_set *)calloc(1, SetSize);
   input     = (fd_set *)calloc(1, SetSize);
@@ -1103,5 +1103,5 @@ usage(void)
 
 
 /*
- * End of "$Id: main.c,v 1.107 2003/08/01 20:00:53 mike Exp $".
+ * End of "$Id: main.c,v 1.108 2003/08/28 15:16:08 mike Exp $".
  */