This patch is generated from the cygwin-20001021 branch of HEAD in squid Wed Apr 6 02:18:51 2005 GMT See http://devel.squid-cache.org/ Index: squid/configure.in diff -u squid/configure.in:1.1.1.4.2.21 squid/configure.in:1.1.1.4.2.12.2.9 --- squid/configure.in:1.1.1.4.2.21 Fri Oct 20 16:54:31 2000 +++ squid/configure.in Wed Oct 4 02:31:24 2000 @@ -204,7 +204,7 @@ [ --enable-gnuregex Compile GNUregex], [USE_GNUREGEX=$enableval]) -AC_ARG_ENABLE(xmalloc-debug, +AC_ARG_ENABLE(xmalloc_debug, [ --enable-xmalloc-debug Do some simple malloc debugging], [ if test "$enableval" = "yes" ; then echo "Malloc debugging enabled" @@ -212,7 +212,7 @@ fi ]) -AC_ARG_ENABLE(xmalloc-debug-trace, +AC_ARG_ENABLE(xmalloc_debug_trace, [ --enable-xmalloc-debug-trace Detailed trace of memory allocations], [ if test "$enableval" = "yes" ; then @@ -222,7 +222,7 @@ fi ]) -AC_ARG_ENABLE(xmalloc-statistics, +AC_ARG_ENABLE(xmalloc_statistics, [ --enable-xmalloc-statistics Show malloc statistics in status page], [ if test "$enableval" = "yes" ; then @@ -338,7 +338,7 @@ fi ]) -AC_ARG_ENABLE(removal-policies, +AC_ARG_ENABLE(removal_policies, [ --enable-removal-policies=\"list of policies\" Build support for the list of removal policies. The default is only to build the "lru" module. @@ -381,7 +381,7 @@ ]) AC_SUBST(OPT_PINGER_EXE) -AC_ARG_ENABLE(delay-pools, +AC_ARG_ENABLE(delay_pools, [ --enable-delay-pools Enable delay pools to limit bandwith usage], [ if test "$enableval" = "yes" ; then echo "Delay pools enabled" @@ -399,7 +399,7 @@ fi ]) -AC_ARG_ENABLE(useragent-log, +AC_ARG_ENABLE(useragent_log, [ --enable-useragent-log Enable logging of User-Agent header], [ if test "$enableval" = "yes" ; then echo "User-Agent logging enabled" @@ -407,14 +407,6 @@ fi ]) -AC_ARG_ENABLE(referer-log, -[ --enable-referer-log Enable logging of Referer header], -[ if test "$enableval" = "yes" ; then - echo "Referer logging enabled" - AC_DEFINE(USE_REFERER_LOG) - fi -]) - AC_ARG_ENABLE(wccp, [ --disable-wccp Disable Web Cache Coordination Protocol], [ if test "$enableval" = "no" ; then @@ -425,7 +417,7 @@ fi ]) -AC_ARG_ENABLE(kill-parent-hack, +AC_ARG_ENABLE(kill_parent_hack, [ --enable-kill-parent-hack Kill parent on shutdown], [ if test "$enableval" = "yes" ; then @@ -449,7 +441,7 @@ AC_SUBST(SNMP_OBJS) AC_SUBST(makesnmplib) -AC_ARG_ENABLE(time-hack, +AC_ARG_ENABLE(time_hack, [ --enable-time-hack Update internal timestamp only once per second], [ if test "$enableval" = "yes" ; then echo "Update internal timestamp only once per second" @@ -457,7 +449,7 @@ fi ]) -AC_ARG_ENABLE(cachemgr-hostname, +AC_ARG_ENABLE(cachemgr_hostname, [ --enable-cachemgr-hostname[=hostname] Make cachemgr.cgi default to this host], [ case $enableval in @@ -475,7 +467,7 @@ esac ]) -AC_ARG_ENABLE(arp-acl, +AC_ARG_ENABLE(arp_acl, [ --enable-arp-acl Enable use of ARP ACL lists (ether address)], [ if test "$enableval" = "yes" ; then echo "ARP ACL lists enabled (ether address)" Index: squid/src/client_side.c diff -u squid/src/client_side.c:1.1.1.4.2.22 squid/src/client_side.c:1.1.1.4.2.10.4.11 --- squid/src/client_side.c:1.1.1.4.2.22 Fri Oct 20 16:54:32 2000 +++ squid/src/client_side.c Fri Oct 20 16:56:50 2000 @@ -2484,6 +2484,11 @@ int len = conn->in.size - conn->in.offset - 1; debug(33, 4) ("clientReadRequest: FD %d: reading request...\n", fd); statCounter.syscalls.sock.reads++; + /* + * Cygwin is blocking on this read when called by readnext request. + * This is because ? ? + */ +// commSetNonBlocking(fd); size = read(fd, conn->in.buf + conn->in.offset, len); if (size > 0) { fd_bytes(fd, size, FD_READ); Index: squid/src/main.c diff -u squid/src/main.c:1.1.1.4.2.10 squid/src/main.c:1.1.1.4.2.5.4.7 --- squid/src/main.c:1.1.1.4.2.10 Fri Oct 20 16:54:32 2000 +++ squid/src/main.c Tue Oct 17 21:13:48 2000 @@ -184,7 +184,7 @@ else if (!strncmp(optarg, "check", strlen(optarg))) opt_send_signal = 0; /* SIGNULL */ else if (!strncmp(optarg, "parse", strlen(optarg))) - opt_parse_cfg_only = 1; /* parse cfg file only */ + opt_parse_cfg_only = 1; /* parse cfg file only */ else usage(); break; @@ -195,14 +195,16 @@ /* NOTREACHED */ break; #else - fatal("Need to add -DMALLOC_DBG when compiling to use -mX option"); + fatal + ("Need to add -DMALLOC_DBG when compiling to use -mX option"); /* NOTREACHED */ #endif } else { #if XMALLOC_TRACE xmalloc_trace = !xmalloc_trace; #else - fatal("Need to configure --enable-xmalloc-debug-trace to use -m option"); + fatal + ("Need to configure --enable-xmalloc-debug-trace to use -m option"); #endif } case 's': @@ -470,8 +472,7 @@ log_trace_init("/tmp/squid.alloc"); #endif debug(1, 0) ("Starting Squid Cache version %s for %s...\n", - version_string, - CONFIG_HOST_TYPE); + version_string, CONFIG_HOST_TYPE); debug(1, 1) ("Process ID %d\n", (int) getpid()); debug(1, 1) ("With %d file descriptors available\n", Squid_MaxFD); @@ -696,7 +697,8 @@ time_t wait = do_shutdown > 0 ? (int) Config.shutdownLifetime : 0; debug(1, 1) ("Preparing for shutdown after %d requests\n", statCounter.client_http.requests); - debug(1, 1) ("Waiting %d seconds for active connections to finish\n", + debug(1, + 1) ("Waiting %d seconds for active connections to finish\n", wait); do_shutdown = 0; shutting_down = 1; @@ -708,7 +710,8 @@ #endif redirectShutdown(); authenticateShutdown(); - eventAdd("SquidShutdown", SquidShutdown, NULL, (double) (wait + 1), 1); + eventAdd("SquidShutdown", SquidShutdown, NULL, (double) (wait + 1), + 1); } eventRun(); if ((loop_delay = eventNextTime()) < 0) @@ -749,7 +752,7 @@ pid = readPidFile(); if (pid > 1) { if (kill(pid, opt_send_signal) && - /* ignore permissions if just running check */ + /* ignore permissions if just running check */ !(opt_send_signal == 0 && errno == EPERM)) { fprintf(stderr, "%s: ERROR: Could not send ", appname); fprintf(stderr, "signal %d to process %d: %s\n", @@ -797,7 +800,8 @@ int status; rpid = waitpid(-1, &status, 0); #endif - } while (rpid != cpid); + } + while (rpid != cpid); } } @@ -860,6 +864,7 @@ /* Close all else */ for (i = 3; i < Squid_MaxFD; i++) close(i); + for (;;) { mainStartScript(argv[0]); if ((pid = fork()) == 0) {