PATCH: tools.c assumes RLIMIT_NOFILE or RLIMIT_OFILE if HAVE_SETRLIMIT

From: Robert Collins <robert.collins@dont-contact.us>
Date: Mon, 12 Mar 2001 22:10:34 +1100

for some reason, I have a broken SETRLIMIT environment - the struct
rlimit is undefined. Whilst I'm looking into that, IMO we shouldn'
assume that HAVE_SETRLIMIT implies RLIMIT_NOFILE || RLIMIT_OFILE...

Rob

Index: src/tools.c
===================================================================
RCS file: /cvsroot/squid/squid/src/tools.c,v
retrieving revision 1.11
diff -u -r1.11 tools.c
--- src/tools.c 2001/02/15 21:09:17 1.11
+++ src/tools.c 2001/03/12 11:08:45
@@ -626,7 +626,7 @@
 void
 setMaxFD(void)
 {
-#if HAVE_SETRLIMIT
+#if HAVE_SETRLIMIT && (defined(RLIMIT_NOFILE) || defined(RLIMIT_OFILE))
     /* try to use as many file descriptors as possible */
     /* System V uses RLIMIT_NOFILE and BSD uses RLIMIT_OFILE */
     struct rlimit rl;
Received on Mon Mar 12 2001 - 04:11:16 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:13:37 MST