-# From configure.in Revision: 1.168
+# From configure.in Revision: 1.169
ac_aux_dir=
for ac_dir in cfgaux $srcdir/cfgaux; do
if test -f $ac_dir/install-sh; then
* Number of fds is virtually unlimited in cygwin (sys/param.h)
*/
i = NOFILE;
-#else
-#if HAVE_SETRLIMIT
+#elif HAVE_SETRLIMIT
struct rlimit rl;
#if defined(RLIMIT_NOFILE)
if (getrlimit(RLIMIT_NOFILE, &rl) < 0) {
}
#endif /* RLIMIT_NOFILE */
#endif /* HAVE_SETRLIMIT */
-#if HAVE_GETRLIMIT && defined(RLIMIT_NOFILE)
- if (getrlimit(RLIMIT_NOFILE, &rl) < 0) {
- perror("getrlimit: RLIMIT_NOFILE");
- }
- i = rl.rlim_cur;
-#elif HAVE_SYSCONF && defined(_SC_OPEN_MAX)
- i = sysconf(_SC_OPEN_MAX);
-#elif HAVE_GETDTABLESIZE && !defined(__linux__)
- i = getdtablesize();
-#elif defined(OPEN_MAX)
- i = OPEN_MAX;
-#elif defined(NOFILE)
- i = NOFILE;
-#elif defined(_NFILE)
- i = _NFILE;
-#else
- while((j=open("/dev/null", 0)) > 0) i=j;
- close(i); close(i-1);
- i++;
-#endif
-#endif /* __CYGWIN32__ */
+ /* by starting at 2^14, we will never get higher
+ than 2^15 for SQUID_MAXFD */
+ i = j = 1<<14;
+ while (j) {
+ j >>= 1;
+ if (dup2(0, i) < 0) {
+ i -= j;
+ } else {
+ close(i);
+ i += j;
+ }
+ }
+ i++;
fp = fopen("conftestval", "w");
fprintf (fp, "%d\n", i);
exit(0);
}
EOF
-if { (eval echo configure:4442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
SQUID_MAXFD=`cat conftestval`
else
fi
echo $ac_n "checking Default UDP send buffer size""... $ac_c" 1>&6
-echo "configure:4468: checking Default UDP send buffer size" >&5
+echo "configure:4459: checking Default UDP send buffer size" >&5
if test "$cross_compiling" = yes; then
SQUID_UDP_SO_SNDBUF=16384
else
cat > conftest.$ac_ext <<EOF
-#line 4473 "configure"
+#line 4464 "configure"
#include "confdefs.h"
#include <stdlib.h>
}
EOF
-if { (eval echo configure:4494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
SQUID_UDP_SO_SNDBUF=`cat conftestval`
else
echo $ac_n "checking Default UDP receive buffer size""... $ac_c" 1>&6
-echo "configure:4513: checking Default UDP receive buffer size" >&5
+echo "configure:4504: checking Default UDP receive buffer size" >&5
if test "$cross_compiling" = yes; then
SQUID_UDP_SO_RCVBUF=16384
else
cat > conftest.$ac_ext <<EOF
-#line 4518 "configure"
+#line 4509 "configure"
#include "confdefs.h"
#include <stdlib.h>
}
EOF
-if { (eval echo configure:4539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
SQUID_UDP_SO_RCVBUF=`cat conftestval`
else
echo $ac_n "checking Default TCP send buffer size""... $ac_c" 1>&6
-echo "configure:4558: checking Default TCP send buffer size" >&5
+echo "configure:4549: checking Default TCP send buffer size" >&5
if test "$cross_compiling" = yes; then
SQUID_TCP_SO_SNDBUF=16384
else
cat > conftest.$ac_ext <<EOF
-#line 4563 "configure"
+#line 4554 "configure"
#include "confdefs.h"
#include <stdlib.h>
}
EOF
-if { (eval echo configure:4584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
SQUID_TCP_SO_SNDBUF=`cat conftestval`
else
echo $ac_n "checking Default TCP receive buffer size""... $ac_c" 1>&6
-echo "configure:4603: checking Default TCP receive buffer size" >&5
+echo "configure:4594: checking Default TCP receive buffer size" >&5
if test "$cross_compiling" = yes; then
SQUID_TCP_SO_RCVBUF=16384
else
cat > conftest.$ac_ext <<EOF
-#line 4608 "configure"
+#line 4599 "configure"
#include "confdefs.h"
#include <stdlib.h>
}
EOF
-if { (eval echo configure:4629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
SQUID_TCP_SO_RCVBUF=`cat conftestval`
else
echo $ac_n "checking if sys_errlist is already defined""... $ac_c" 1>&6
-echo "configure:4648: checking if sys_errlist is already defined" >&5
+echo "configure:4639: checking if sys_errlist is already defined" >&5
if eval "test \"`echo '$''{'ac_cv_needs_sys_errlist'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4653 "configure"
+#line 4644 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
char *s = sys_errlist0;
; return 0; }
EOF
-if { (eval echo configure:4660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_needs_sys_errlist="no"
else
fi
echo $ac_n "checking for libresolv _dns_ttl_ hack""... $ac_c" 1>&6
-echo "configure:4682: checking for libresolv _dns_ttl_ hack" >&5
+echo "configure:4673: checking for libresolv _dns_ttl_ hack" >&5
cat > conftest.$ac_ext <<EOF
-#line 4684 "configure"
+#line 4675 "configure"
#include "confdefs.h"
extern int _dns_ttl_;
int main() {
return _dns_ttl_;
; return 0; }
EOF
-if { (eval echo configure:4691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
rm -f conftest*
echo $ac_n "checking if inet_ntoa() actually works""... $ac_c" 1>&6
-echo "configure:4707: checking if inet_ntoa() actually works" >&5
+echo "configure:4698: checking if inet_ntoa() actually works" >&5
if test "$cross_compiling" = yes; then
INET_NTOA_RESULT="broken"
else
cat > conftest.$ac_ext <<EOF
-#line 4712 "configure"
+#line 4703 "configure"
#include "confdefs.h"
#include <stdlib.h>
}
EOF
-if { (eval echo configure:4731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
INET_NTOA_RESULT=`cat conftestval`
else
if test "$ac_cv_header_sys_statvfs_h" = "yes" ; then
echo $ac_n "checking for working statvfs() interface""... $ac_c" 1>&6
-echo "configure:4757: checking for working statvfs() interface" >&5
+echo "configure:4748: checking for working statvfs() interface" >&5
cat > conftest.$ac_ext <<EOF
-#line 4759 "configure"
+#line 4750 "configure"
#include "confdefs.h"
#include <stdlib.h>
; return 0; }
EOF
-if { (eval echo configure:4776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_func_statvfs=yes
else
fi
echo $ac_n "checking for _res.nsaddr_list""... $ac_c" 1>&6
-echo "configure:4796: checking for _res.nsaddr_list" >&5
+echo "configure:4787: checking for _res.nsaddr_list" >&5
if eval "test \"`echo '$''{'ac_cv_have_res_nsaddr_list'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4801 "configure"
+#line 4792 "configure"
#include "confdefs.h"
#if HAVE_SYS_TYPES_H
_res.nsaddr_list[0];
; return 0; }
EOF
-if { (eval echo configure:4824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_have_res_nsaddr_list="yes"
else
if test $ac_cv_have_res_nsaddr_list = "no" ; then
echo $ac_n "checking for _res.ns_list""... $ac_c" 1>&6
-echo "configure:4846: checking for _res.ns_list" >&5
+echo "configure:4837: checking for _res.ns_list" >&5
if eval "test \"`echo '$''{'ac_cv_have_res_ns_list'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4851 "configure"
+#line 4842 "configure"
#include "confdefs.h"
#if HAVE_SYS_TYPES_H
_res.ns_list[0].addr;
; return 0; }
EOF
-if { (eval echo configure:4874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4865: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_have_res_ns_list="yes"
else
dnl
dnl Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9)
dnl
-dnl $Id: configure.in,v 1.169 1999/04/15 06:14:54 wessels Exp $
+dnl $Id: configure.in,v 1.170 1999/04/21 03:51:55 wessels Exp $
dnl
dnl
dnl
AC_INIT(src/main.c)
AC_CONFIG_HEADER(include/autoconf.h)
-AC_REVISION($Revision: 1.169 $)dnl
+AC_REVISION($Revision: 1.170 $)dnl
AC_PREFIX_DEFAULT(/usr/local/squid)
AC_CONFIG_AUX_DIR(cfgaux)
* Number of fds is virtually unlimited in cygwin (sys/param.h)
*/
i = NOFILE;
-#else
-#if HAVE_SETRLIMIT
+#elif HAVE_SETRLIMIT
struct rlimit rl;
#if defined(RLIMIT_NOFILE)
if (getrlimit(RLIMIT_NOFILE, &rl) < 0) {
}
#endif /* RLIMIT_NOFILE */
#endif /* HAVE_SETRLIMIT */
-#if HAVE_GETRLIMIT && defined(RLIMIT_NOFILE)
- if (getrlimit(RLIMIT_NOFILE, &rl) < 0) {
- perror("getrlimit: RLIMIT_NOFILE");
- }
- i = rl.rlim_cur;
-#elif HAVE_SYSCONF && defined(_SC_OPEN_MAX)
- i = sysconf(_SC_OPEN_MAX);
-#elif HAVE_GETDTABLESIZE && !defined(__linux__)
- i = getdtablesize();
-#elif defined(OPEN_MAX)
- i = OPEN_MAX;
-#elif defined(NOFILE)
- i = NOFILE;
-#elif defined(_NFILE)
- i = _NFILE;
-#else
- while((j=open("/dev/null", 0)) > 0) i=j;
- close(i); close(i-1);
- i++;
-#endif
-#endif /* __CYGWIN32__ */
+ /* by starting at 2^14, we will never get higher
+ than 2^15 for SQUID_MAXFD */
+ i = j = 1<<14;
+ while (j) {
+ j >>= 1;
+ if (dup2(0, i) < 0) {
+ i -= j;
+ } else {
+ close(i);
+ i += j;
+ }
+ }
+ i++;
fp = fopen("conftestval", "w");
fprintf (fp, "%d\n", i);
exit(0);