-# From configure.in Revision: 1.14
+# From configure.in Revision: 1.15
ac_aux_dir=
for ac_dir in aux $srcdir/aux; do
if test -f $ac_dir/install-sh; then
fi
-echo $ac_n "checking for tm->tm_gmtoff""... $ac_c" 1>&6
-cat > conftest.$ac_ext <<EOF
-#line 1258 "configure"
-#include "confdefs.h"
-#include <time.h>
-#include <sys/time.h>
-int main() { return 0; }
-int t() {
-struct tm foo;
-foo.tm_gmtoff = 0;
-; return 0; }
-EOF
-if eval $ac_compile; then
- rm -rf conftest*
- cat >> confdefs.h <<\EOF
-#define HAVE_TM_GMTOFF 1
-EOF
-
-echo "$ac_t""yes" 1>&6
-else
- rm -rf conftest*
- echo "$ac_t""no" 1>&6
-fi
-rm -f conftest*
-
-
for ac_hdr in \
alloca.h \
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1310 "configure"
+#line 1284 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
done
+echo $ac_n "checking for tm->tm_gmtoff""... $ac_c" 1>&6
cat > conftest.$ac_ext <<EOF
-#line 1340 "configure"
+#line 1315 "configure"
#include "confdefs.h"
+#include <time.h>
+#include <sys/time.h>
+int main() { return 0; }
+int t() {
+struct tm foo;
+foo.tm_gmtoff = 0;
+; return 0; }
+EOF
+if eval $ac_compile; then
+ rm -rf conftest*
+ cat >> confdefs.h <<\EOF
+#define HAVE_TM_GMTOFF 1
+EOF
+
+echo "$ac_t""yes" 1>&6
+else
+ rm -rf conftest*
+ echo "$ac_t""no" 1>&6
+fi
+rm -f conftest*
+
+
+echo $ac_n "checking for extended mallinfo""... $ac_c" 1>&6
+cat > conftest.$ac_ext <<EOF
+#line 1341 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
#include <malloc.h>
+int main() { return 0; }
+int t() {
+struct mallinfo foo;
+foo.mxfast = 0;
+; return 0; }
EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "mxfast" >/dev/null 2>&1; then
+if eval $ac_compile; then
rm -rf conftest*
- XTRA_CFLAGS="$XTRA_CFLAGS -DLNG_MALLINFO"
+ cat >> confdefs.h <<\EOF
+#define HAVE_EXT_MALLINFO 1
+EOF
+
+echo "$ac_t""yes" 1>&6
+else
+ rm -rf conftest*
+ echo "$ac_t""no" 1>&6
fi
rm -f conftest*
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 1360 "configure"
+#line 1373 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 1394 "configure"
+#line 1407 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1428 "configure"
+#line 1441 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() { return 0; }
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1460 "configure"
+#line 1473 "configure"
#include "confdefs.h"
#ifdef __GNUC__
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1519 "configure"
+#line 1532 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1548 "configure"
+#line 1561 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 1602 "configure"
+#line 1615 "configure"
#include "confdefs.h"
find_stack_direction ()
{
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1647 "configure"
+#line 1660 "configure"
#include "confdefs.h"
int main() { return 0; }
ac_save_LIBS="$LIBS"
LIBS="-lmalloc $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1687 "configure"
+#line 1700 "configure"
#include "confdefs.h"
int main() { return 0; }
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1721 "configure"
+#line 1734 "configure"
#include "confdefs.h"
int main() { return 0; }
ac_save_LIBS="$LIBS"
LIBS="-lresolv $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1761 "configure"
+#line 1774 "configure"
#include "confdefs.h"
int main() { return 0; }
ac_save_LIBS="$LIBS"
LIBS="-lbsd $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1801 "configure"
+#line 1814 "configure"
#include "confdefs.h"
int main() { return 0; }
ac_save_LIBS="$LIBS"
LIBS="-l44bsd $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1842 "configure"
+#line 1855 "configure"
#include "confdefs.h"
int main() { return 0; }
ac_save_LIBS="$LIBS"
LIBS="-lresolv $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1876 "configure"
+#line 1889 "configure"
#include "confdefs.h"
int main() { return 0; }
ac_save_LIBS="$LIBS"
LIBS="-lcrypt $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1911 "configure"
+#line 1924 "configure"
#include "confdefs.h"
int main() { return 0; }
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1973 "configure"
+#line 1986 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
dnl
dnl Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.7)
dnl
-dnl $Id: configure.in,v 1.15 1996/04/15 03:50:47 wessels Exp $
+dnl $Id: configure.in,v 1.16 1996/04/15 18:00:24 wessels Exp $
dnl
dnl
dnl
AC_INIT(src/main.c)
AC_CONFIG_HEADER(include/autoconf.h)
-AC_REVISION($Revision: 1.15 $)dnl
+AC_REVISION($Revision: 1.16 $)dnl
AC_PREFIX_DEFAULT(/usr/local/squid)
AC_CONFIG_AUX_DIR(aux)
AC_HEADER_DIRENT
AC_HEADER_STDC
-AC_MSG_CHECKING(for tm->tm_gmtoff)
-AC_TRY_COMPILE([#include <time.h>
-#include <sys/time.h>],
-[struct tm foo;
-foo.tm_gmtoff = 0;],
-[AC_DEFINE(HAVE_TM_GMTOFF)
-AC_MSG_RESULT(yes)],
-AC_MSG_RESULT(no))
-
AC_CHECK_HEADERS( \
alloca.h \
syslog.h \
)
-AC_EGREP_HEADER(mxfast, malloc.h, [XTRA_CFLAGS="$XTRA_CFLAGS -DLNG_MALLINFO"])
+AC_MSG_CHECKING(for tm->tm_gmtoff)
+AC_TRY_COMPILE([#include <time.h>
+#include <sys/time.h>],
+[struct tm foo;
+foo.tm_gmtoff = 0;],
+[AC_DEFINE(HAVE_TM_GMTOFF)
+AC_MSG_RESULT(yes)],
+AC_MSG_RESULT(no))
+
+AC_MSG_CHECKING(for extended mallinfo)
+AC_TRY_COMPILE([#include <sys/types.h>
+#include <malloc.h>],
+[struct mallinfo foo;
+foo.mxfast = 0;],
+[AC_DEFINE(HAVE_EXT_MALLINFO)
+AC_MSG_RESULT(yes)],
+AC_MSG_RESULT(no))
dnl Check for typedefs
AC_CHECK_SIZEOF(int)
/* Define struct tm has tm_gmtoff member */
#undef HAVE_TM_GMTOFF
+/* Define struct mallinfo has mxfast member */
+#undef HAVE_EXT_MALLINFO
+
/* The number of bytes in a int. */
#undef SIZEOF_INT
-/* $Id: stat.cc,v 1.23 1996/04/14 03:05:50 wessels Exp $ */
+/* $Id: stat.cc,v 1.24 1996/04/15 18:00:28 wessels Exp $ */
/*
* DEBUG: Section 18 stat
sprintf(line, "{\tcost of enabling keep option:\t%d}\n", mp.keepcost);
storeAppend(sentry, line, strlen(line));
}
-#if LNG_MALLINFO
+#if HAVE_EXT_MALLINFO
sprintf(line, "{\tmax size of small blocks:\t%d}\n", mp.mxfast);
storeAppend(sentry, line, strlen(line));
sprintf(line, "{\tnumber of small blocks in a holding block:\t%d}\n",
mp.treeoverhead);
storeAppend(sentry, line, strlen(line));
-#endif /* LNG_MALLINFO */
+#endif /* HAVE_EXT_MALLINFO */
#endif /* HAVE_MALLINFO */
-/* $Id: tools.cc,v 1.30 1996/04/11 23:52:01 wessels Exp $ */
+/* $Id: tools.cc,v 1.31 1996/04/15 18:00:27 wessels Exp $ */
/*
* DEBUG: Section 21 tools
fprintf(f, " space in ordinary blocks in use %d\n", mp.uordblks);
fprintf(f, " space in free ordinary blocks %d\n", mp.fordblks);
fprintf(f, " cost of enabling keep option %d\n", mp.keepcost);
-#if LNG_MALLINFO
+#if HAVE_EXT_MALLINFO
fprintf(f, " max size of small blocks %d\n", mp.mxfast);
fprintf(f, " number of small blocks in a holding block %d\n",
mp.nlblks);
mp.allocated);
fprintf(f, " bytes used in maintaining the free tree %d\n",
mp.treeoverhead);
-#endif /* LNG_MALLINFO */
+#endif /* HAVE_EXT_MALLINFO */
#if PRINT_MMAP
mallocmap();
void shut_down(sig)
int sig;
{
+ int i;
+ FD_ENTRY *f;
debug(21, 1, "Preparing for shutdown...\n");
serverConnectionsClose();
ipcacheShutdownServers();
+ for(i=fdstat_biggest_fd(); i >= 0; i--) {
+ f = &fd_table[i];
+ if (f->read_handler || f->write_handler || f->except_handler)
+ comm_set_fd_lifetime(i, 30);
+ }
shutdown_pending = 1;
/* reinstall signal handler? */
}