--------------------- PatchSet 2575 Date: 2001/07/03 21:58:03 Author: serassio Branch: nt-2_3 Tag: (none) Log: Another group of WIN32 bug Fixes Members: include/autoconf.h:1.1.2.3->1.1.2.4 include/config.h:1.1.2.3->1.1.2.4 include/config.h.in:1.1.1.3.4.1.2.3->1.1.1.3.4.1.2.4 include/util.h:1.1.1.3.4.1.2.1->1.1.1.3.4.1.2.2 src/main.c:1.1.1.3.4.2.2.6->1.1.1.3.4.2.2.7 Index: squid/include/autoconf.h =================================================================== RCS file: /cvsroot/squid-sf//squid/include/Attic/autoconf.h,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -u -r1.1.2.3 -r1.1.2.4 --- squid/include/autoconf.h 14 Jun 2001 20:36:15 -0000 1.1.2.3 +++ squid/include/autoconf.h 3 Jul 2001 21:58:03 -0000 1.1.2.4 @@ -93,6 +93,7 @@ * Traffic management via "delay pools". */ #undef DELAY_POOLS +#define DELAY_POOLS 1 /* * If you want to log User-Agent request header values, define this. @@ -100,6 +101,7 @@ * directory. */ #undef USE_USERAGENT_LOG +#define USE_USERAGENT_LOG 1 /* * A dangerous feature which causes Squid to kill its parent process @@ -166,7 +168,7 @@ /* Maximum number of open filedescriptors */ #undef SQUID_MAXFD -#define SQUID_MAXFD 2048 +#define SQUID_MAXFD 4096 /* UDP send buffer size */ #undef SQUID_UDP_SO_SNDBUF Index: squid/include/config.h =================================================================== RCS file: /cvsroot/squid-sf//squid/include/config.h,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -u -r1.1.2.3 -r1.1.2.4 --- squid/include/config.h 14 Jun 2001 20:36:15 -0000 1.1.2.3 +++ squid/include/config.h 3 Jul 2001 21:58:03 -0000 1.1.2.4 @@ -111,32 +111,36 @@ #define mkdir _mkdir #define setmode _setmode #define snprintf _snprintf +#define strcasecmp _stricmp +#define strncasecmp _strnicmp #define vsnprintf _vsnprintf #define O_BYNARY _O_BINARY #define O_TEXT _O_TEXT #define S_IRWXO 007 #define S_ISDIR(m) (((m) & _S_IFDIR) == _S_IFDIR) +#define ushort unsigned short int +#define uid_t int +#define gid_t int + +#define CHANGE_FD_SETSIZE 1 +#if CHANGE_FD_SETSIZE && SQUID_MAXFD > DEFAULT_FD_SETSIZE +#define FD_SETSIZE SQUID_MAXFD +#endif #include #include #include "readdir.h" -#define SQUIDHOSTNAMELEN 128 typedef char *caddr_t; #undef FD_CLOSE #undef FD_OPEN #undef FD_READ #undef FD_WRITE -#undef FD_SETSIZE #define EISCONN WSAEISCONN #define EINPROGRESS WSAEINPROGRESS #define EWOULDBLOCK WSAEWOULDBLOCK #define EALREADY WSAEALREADY #define ETIMEDOUT WSAETIMEDOUT -#define uid_t int -#define gid_t int -#define strcasecmp _stricmp -#define strncasecmp _strnicmp #if defined (COMM_C) || defined (COMM_SELECT_C) #define recv(x,y,z) recv(x,y,z,0) Index: squid/include/config.h.in =================================================================== RCS file: /cvsroot/squid-sf//squid/include/Attic/config.h.in,v retrieving revision 1.1.1.3.4.1.2.3 retrieving revision 1.1.1.3.4.1.2.4 diff -u -r1.1.1.3.4.1.2.3 -r1.1.1.3.4.1.2.4 --- squid/include/config.h.in 14 Jun 2001 20:36:15 -0000 1.1.1.3.4.1.2.3 +++ squid/include/config.h.in 3 Jul 2001 22:00:12 -0000 1.1.1.3.4.1.2.4 @@ -1,5 +1,5 @@ /* - * $Id: config.h.in,v 1.1.1.3.4.1.2.3 2001/06/14 20:36:15 serassio Exp $ + * $Id: config.h.in,v 1.1.1.3.4.1.2.4 2001/07/03 22:00:12 serassio Exp $ * * AUTHOR: Duane Wessels * @@ -111,11 +111,16 @@ #define mkdir _mkdir #define setmode _setmode #define snprintf _snprintf +#define strcasecmp _stricmp +#define strncasecmp _strnicmp #define vsnprintf _vsnprintf #define O_BYNARY _O_BINARY #define O_TEXT _O_TEXT #define S_IRWXO 007 #define S_ISDIR(m) (((m) & _S_IFDIR) == _S_IFDIR) +#define ushort unsigned short int +#define uid_t int +#define gid_t int #elif defined(__APPLE__) #define _SQUID_APPLE_ Index: squid/include/util.h =================================================================== RCS file: /cvsroot/squid-sf//squid/include/util.h,v retrieving revision 1.1.1.3.4.1.2.1 retrieving revision 1.1.1.3.4.1.2.2 diff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.2 --- squid/include/util.h 6 Jan 2001 12:40:10 -0000 1.1.1.3.4.1.2.1 +++ squid/include/util.h 3 Jul 2001 21:58:03 -0000 1.1.1.3.4.1.2.2 @@ -1,5 +1,5 @@ /* - * $Id: util.h,v 1.1.1.3.4.1.2.1 2001/01/06 12:40:10 hno Exp $ + * $Id: util.h,v 1.1.1.3.4.1.2.2 2001/07/03 21:58:03 serassio Exp $ * * AUTHOR: Harvest Derived * @@ -41,11 +41,13 @@ #endif #if !defined(SQUIDHOSTNAMELEN) +#ifndef _SQUID_MSWIN_ #include #ifndef _SQUID_NETDB_H_ /* need protection on NEXTSTEP */ #define _SQUID_NETDB_H_ #include #endif +#endif #if !defined(MAXHOSTNAMELEN) || (MAXHOSTNAMELEN < 128) #define SQUIDHOSTNAMELEN 128 #else Index: squid/src/main.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/main.c,v retrieving revision 1.1.1.3.4.2.2.6 retrieving revision 1.1.1.3.4.2.2.7 diff -u -r1.1.1.3.4.2.2.6 -r1.1.1.3.4.2.2.7 --- squid/src/main.c 18 Jun 2001 19:30:39 -0000 1.1.1.3.4.2.2.6 +++ squid/src/main.c 3 Jul 2001 21:58:03 -0000 1.1.1.3.4.2.2.7 @@ -1,6 +1,6 @@ /* - * $Id: main.c,v 1.1.1.3.4.2.2.6 2001/06/18 19:30:39 serassio Exp $ + * $Id: main.c,v 1.1.1.3.4.2.2.7 2001/07/03 21:58:03 serassio Exp $ * * DEBUG: section 1 Startup and Main Loop * AUTHOR: Harvest Derived @@ -632,7 +632,6 @@ #ifdef USE_WIN32_SERVICE if (WIN32_Subsystem_Init()) return; -/* opt_no_daemon=(WIN32_run_mode == _WIN_SQUID_RUN_MODE_SERVICE) ? 0 : 1; */ #else { int WIN32_init_err; @@ -764,7 +763,11 @@ comm_init(); comm_select_init(); +#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) + if ((WIN32_run_mode == _WIN_SQUID_RUN_MODE_INTERACTIVE) && (opt_no_daemon)) { +#else if (opt_no_daemon) { +#endif /* we have to init fdstat here. */ fd_open(0, FD_LOG, "stdin"); fd_open(1, FD_LOG, "stdout");