diff -NdruBbx configure ../squidclean/squid-2.3.STABLE3/README.cygwin ./README.cygwin --- ../squidclean/squid-2.3.STABLE3/README.cygwin Thu Jan 1 10:00:00 1970 +++ ./README.cygwin Tue Jun 13 23:12:59 2000 @@ -0,0 +1,23 @@ + + + Partial(buyer beware :-]) updated CYGWIN PORT of SQUID 2.3 Stable 3 + w/ stale reference patch. + + +KNOWN ISSUES: +* Cygwin 1.1.2 fcntl doesn't support non-blocking sockets, so the performance enhancements for squid that accept multiple outstanding connections at once, actually decrease performance. +* /etc/resolv.conf must have a valid nameserver. I haven't dug into squids dns_internal as yet. +* squid must be run -N, the fork call coredumps at the moment. +* configure often doesn't get the SQUID_MAXFD values - the script dies. Edit include/autoconf.h and set this to 256. I have seen an earlier port to native win32 of squid (Romeo Anghelache - http://www.phys-iasi.ro/users/romeo/) that has this set as high as 2000. I am only running small sites at the moment so this hasn't been tested w/high numbers. +* dnsserver.c has some problems at the moment, but the internal dns server runs fine. To get dnsserver to compile, run make and after make has stap an error, run the same command, but don't link agains m - ie remove -lm from the gcc command. +* rfc1123.c has an issue with _timezone deing defined twice. I edited /usr/include/time.h and define this under the ANSI #ifdef where timezone is exported from.This probably should be included in the squid patch rather than the platform... +* the #define for the sys_nerr import in util.c should probably go via ./configure, and may not be the best way to do it. + +Installation notes: +* Install the bind 8.1.2 or newer rpm (I got it from Rebums' at http://cygwin.cjb.net/. +* Run configure and edit include/autoconf.h as listed above +* Use srvany (NT resource kit) or a similar tool to run squid as a service + +Rob Collins, Jul 2000 +rbtcollins@hotmail.com + diff -NdruBbx configure ../squidclean/squid-2.3.STABLE3/configure.in ./configure.in --- ../squidclean/squid-2.3.STABLE3/configure.in Sat Apr 29 06:17:12 2000 +++ ./configure.in Tue Jun 13 22:32:01 2000 @@ -1153,9 +1153,10 @@ main() { FILE *fp; int i,j; -#if __CYGWIN32__ +#if defined(__CYGWIN32__) || defined (__CYGWIN__) /* getrlimit and sysconf returns bogous values on cygwin32. * Number of fds is virtually unlimited in cygwin (sys/param.h) + * __CYGWIN32__ is deprecated */ i = NOFILE; #elif HAVE_SETRLIMIT diff -NdruBbx configure ../squidclean/squid-2.3.STABLE3/include/config.h.in ./include/config.h.in --- ../squidclean/squid-2.3.STABLE3/include/config.h.in Sun Sep 12 11:35:06 1999 +++ ./include/config.h.in Tue Jun 13 22:32:27 2000 @@ -97,7 +97,7 @@ #elif defined(__NetBSD__) #define _SQUID_NETBSD_ -#elif defined(__CYGWIN32__) || defined(WIN32) || defined(WINNT) || defined(__WIN32__) || defined(__WIN32) +#elif defined(__CYGWIN32__) || defined(__CYGWIN__) || defined(WIN32) || defined(WINNT) || defined(__WIN32__) || defined(__WIN32) #define _SQUID_MSWIN_ #elif defined(__APPLE__) diff -NdruBbx configure ../squidclean/squid-2.3.STABLE3/lib/util.c ./lib/util.c --- ../squidclean/squid-2.3.STABLE3/lib/util.c Thu Feb 10 10:29:51 2000 +++ ./lib/util.c Thu Jun 15 09:29:14 2000 @@ -73,7 +73,13 @@ void (*failure_notify) (const char *) = NULL; static char msg[128]; + +#if !defined(__CYGWIN__) extern int sys_nerr; +#else + #define sys_nerr _sys_nerr +#endif + #if MEM_GEN_TRACE diff -NdruBbx configure ../squidclean/squid-2.3.STABLE3/src/defines.h ./src/defines.h --- ../squidclean/squid-2.3.STABLE3/src/defines.h Thu Feb 10 10:29:55 2000 +++ ./src/defines.h Tue Jun 13 23:11:25 2000 @@ -240,16 +240,28 @@ /* * Max number of ICP messages to receive per call to icpHandleUdp */ -#define INCOMING_ICP_MAX 15 +#ifdef __CYGWIN__ + #define INCOMING_ICP_MAX 1 +#else + #define INCOMING_ICP_MAX 15 +#endif /* * Max number of DNS messages to receive per call to DNS read handler */ -#define INCOMING_DNS_MAX 15 +#ifdef __CYGWIN__ + #define INCOMING_DNS_MAX 1 +#else + #define INCOMING_DNS_MAX 15 +#endif /* * Max number of HTTP connections to accept per call to httpAccept * and PER HTTP PORT */ -#define INCOMING_HTTP_MAX 10 +#ifdef __CYGWIN__ + #define INCOMING_HTTP_MAX 1 +#else + #define INCOMING_HTTP_MAX 10 +#endif #define INCOMING_TOTAL_MAX (INCOMING_ICP_MAX+INCOMING_HTTP_MAX) /* diff -NdruBbx configure ../squidclean/squid-2.3.STABLE3/src/dns_internal.c ./src/dns_internal.c --- ../squidclean/squid-2.3.STABLE3/src/dns_internal.c Wed Mar 22 16:01:42 2000 +++ ./src/dns_internal.c Tue Jun 13 18:46:15 2000 @@ -301,7 +301,7 @@ ssize_t len; struct sockaddr_in from; socklen_t from_len; - int max = 10; + int max = INCOMING_DNS_MAX; static char rbuf[512]; int ns; while (max--) {