? q Index: include/config.h =================================================================== RCS file: /cvsroot/squid/squid3/include/config.h,v retrieving revision 1.8 diff -u -w -p -r1.8 config.h --- include/config.h 23 Jan 2003 00:36:47 -0000 1.8 +++ include/config.h 24 Apr 2003 06:24:29 -0000 @@ -110,9 +110,11 @@ #elif defined(__CYGWIN32__) || defined(__CYGWIN__) #define _SQUID_CYGWIN_ +#define _SQUID_WIN32_ #elif defined(WIN32) || defined(WINNT) || defined(__WIN32__) || defined(__WIN32) #define _SQUID_MSWIN_ +#define _SQUID_WIN32_ #elif defined(__APPLE__) #define _SQUID_APPLE_ Index: lib/rfc1123.c =================================================================== RCS file: /cvsroot/squid/squid3/lib/rfc1123.c,v retrieving revision 1.32 diff -u -w -p -r1.32 rfc1123.c --- lib/rfc1123.c 3 Feb 2003 21:33:15 -0000 1.32 +++ lib/rfc1123.c 24 Apr 2003 06:24:29 -0000 @@ -270,7 +270,7 @@ parse_rfc1123(const char *str) */ if (tm->tm_isdst > 0) dst = -3600; -#if defined ( _timezone) || defined(_SQUID_CYGWIN_) || defined(_SQUID_MSWIN_) +#if defined ( _timezone) || defined(_SQUID_WIN32_) t -= (_timezone + dst); #else t -= (timezone + dst); Index: src/cache_cf.cc =================================================================== RCS file: /cvsroot/squid/squid3/src/cache_cf.cc,v retrieving revision 1.439 diff -u -w -p -r1.439 cache_cf.cc --- src/cache_cf.cc 17 Apr 2003 15:25:43 -0000 1.439 +++ src/cache_cf.cc 24 Apr 2003 06:24:30 -0000 @@ -294,7 +294,7 @@ parseConfigFile(const char *file_name) fatalf("Unable to open configuration file: %s: %s", file_name, xstrerror()); -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +#ifdef _SQUID_WIN32_ setmode(fileno(fp), O_TEXT); @@ -3043,7 +3043,7 @@ strtok_again: return (NULL); } -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +#ifdef _SQUID_WIN32_ setmode(fileno(wordFile), O_TEXT); #endif Index: src/cache_diff.cc =================================================================== RCS file: /cvsroot/squid/squid3/src/cache_diff.cc,v retrieving revision 1.18 diff -u -w -p -r1.18 cache_diff.cc --- src/cache_diff.cc 21 Feb 2003 22:50:06 -0000 1.18 +++ src/cache_diff.cc 24 Apr 2003 06:24:30 -0000 @@ -153,7 +153,7 @@ cacheIndexAddLog(CacheIndex * idx, const return 0; } -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +#ifdef _SQUID_WIN32_ setmode(fileno(file), O_BINARY); #endif Index: src/cf_gen.cc =================================================================== RCS file: /cvsroot/squid/squid3/src/cf_gen.cc,v retrieving revision 1.50 diff -u -w -p -r1.50 cf_gen.cc --- src/cf_gen.cc 21 Feb 2003 22:50:07 -0000 1.50 +++ src/cf_gen.cc 24 Apr 2003 06:24:31 -0000 @@ -66,7 +66,7 @@ #if HAVE_ASSERT_H #include #endif -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +#ifdef _SQUID_WIN32_ #include #endif #if HAVE_FCNTL_H @@ -178,7 +178,7 @@ main(int argc, char *argv[]) exit(1); } -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +#ifdef _SQUID_WIN32_ setmode(fileno(fp), O_TEXT); #endif @@ -404,7 +404,7 @@ main(int argc, char *argv[]) exit(1); } -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +#ifdef _SQUID_WIN32_ setmode(fileno(fp), O_TEXT); #endif @@ -438,7 +438,7 @@ main(int argc, char *argv[]) exit(1); } -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +#ifdef _SQUID_WIN32_ setmode(fileno(fp), O_TEXT); #endif Index: src/client.cc =================================================================== RCS file: /cvsroot/squid/squid3/src/client.cc,v retrieving revision 1.105 diff -u -w -p -r1.105 client.cc --- src/client.cc 21 Feb 2003 22:50:07 -0000 1.105 +++ src/client.cc 24 Apr 2003 06:24:31 -0000 @@ -283,7 +283,7 @@ main(int argc, char *argv[]) exit(-1); } -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +#ifdef _SQUID_WIN32_ setmode(put_fd, O_BINARY); #endif Index: src/comm.cc =================================================================== RCS file: /cvsroot/squid/squid3/src/comm.cc,v retrieving revision 1.373 diff -u -w -p -r1.373 comm.cc --- src/comm.cc 20 Apr 2003 05:28:58 -0000 1.373 +++ src/comm.cc 24 Apr 2003 06:24:32 -0000 @@ -1961,7 +1961,7 @@ commSetNonBlocking(int fd) int flags; int dummy = 0; #endif -#if defined (_SQUID_CYGWIN_) || defined (_SQUID_MSWIN_) +#ifdef _SQUID_WIN32_ int nonblocking = TRUE; @@ -1985,7 +1985,7 @@ commSetNonBlocking(int fd) } #endif -#if defined (_SQUID_CYGWIN_) || defined (_SQUID_MSWIN_) +#ifdef _SQUID_WIN32_ } Index: src/debug.cc =================================================================== RCS file: /cvsroot/squid/squid3/src/debug.cc,v retrieving revision 1.89 diff -u -w -p -r1.89 debug.cc --- src/debug.cc 21 Feb 2003 22:50:07 -0000 1.89 +++ src/debug.cc 24 Apr 2003 06:24:32 -0000 @@ -224,7 +224,7 @@ debugOpenLog(const char *logfile) { debug_log = stderr; } -#if defined(_SQUID_CYGWIN_)||defined(_SQUID_MSWIN_) +#ifdef _SQUID_WIN32_ setmode(fileno(debug_log), O_TEXT); #endif Index: src/defines.h =================================================================== RCS file: /cvsroot/squid/squid3/src/defines.h,v retrieving revision 1.113 diff -u -w -p -r1.113 defines.h --- src/defines.h 20 Apr 2003 05:28:58 -0000 1.113 +++ src/defines.h 24 Apr 2003 06:24:33 -0000 @@ -312,7 +312,7 @@ #define HTTP_REQBUF_SZ 4096 /* CygWin & Windows NT Port */ -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +#ifdef _SQUID_WIN32_ #define _WIN_SQUID_SERVICE_CONTROL_STOP SERVICE_CONTROL_STOP #define _WIN_SQUID_SERVICE_CONTROL_SHUTDOWN SERVICE_CONTROL_SHUTDOWN #define _WIN_SQUID_SERVICE_CONTROL_INTERROGATE SERVICE_CONTROL_INTERROGATE Index: src/disk.cc =================================================================== RCS file: /cvsroot/squid/squid3/src/disk.cc,v retrieving revision 1.164 diff -u -w -p -r1.164 disk.cc --- src/disk.cc 21 Feb 2003 22:50:08 -0000 1.164 +++ src/disk.cc 24 Apr 2003 06:24:33 -0000 @@ -39,7 +39,7 @@ static PF diskHandleRead; static PF diskHandleWrite; -#if defined(_SQUID_MSWIN_) || defined(_SQUID_OS2_) || defined(_SQUID_CYGWIN_) +#if defined(_SQUID_WIN32_) || defined(_SQUID_OS2_) static int diskWriteIsComplete(int fd) { @@ -106,7 +106,7 @@ file_close(int fd) } if (F->flags.write_daemon) { -#if defined(_SQUID_MSWIN_) || defined(_SQUID_OS2_) || defined(_SQUID_CYGWIN_) +#if defined(_SQUID_WIN32_) || defined(_SQUID_OS2_) /* * on some operating systems, you can not delete or rename * open files, so we won't allow delayed close. Index: src/dns_internal.cc =================================================================== RCS file: /cvsroot/squid/squid3/src/dns_internal.cc,v retrieving revision 1.58 diff -u -w -p -r1.58 dns_internal.cc --- src/dns_internal.cc 22 Apr 2003 15:06:09 -0000 1.58 +++ src/dns_internal.cc 24 Apr 2003 06:24:33 -0000 @@ -42,7 +42,7 @@ using external DNS process. */ #ifndef USE_DNSSERVERS -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +#ifdef _SQUID_WIN32_ #include "squid_windows.h" #endif #ifndef _PATH_RESOLV_CONF @@ -99,7 +99,7 @@ static void idnsParseNameservers(void); #ifndef _SQUID_MSWIN_ static void idnsParseResolvConf(void); #endif -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +#ifdef _SQUID_WIN32_ static void idnsParseWIN32Registry(void); #endif static void idnsSendQuery(idns_query * q); @@ -217,7 +217,7 @@ idnsParseResolvConf(void) #endif -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +#ifdef _SQUID_WIN32_ static void idnsParseWIN32Registry(void) { @@ -798,7 +798,7 @@ idnsInit(void) idnsParseResolvConf(); #endif -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +#ifdef _SQUID_WIN32_ if (0 == nns) idnsParseWIN32Registry(); @@ -807,7 +807,7 @@ idnsInit(void) if (0 == nns) fatal("Could not find any nameservers.\n" -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +#ifdef _SQUID_WIN32_ " Please check your TCP-IP settings or /etc/resolv.conf file\n" #else " Please check your /etc/resolv.conf file\n" Index: src/enums.h =================================================================== RCS file: /cvsroot/squid/squid3/src/enums.h,v retrieving revision 1.230 diff -u -w -p -r1.230 enums.h --- src/enums.h 10 Mar 2003 04:56:38 -0000 1.230 +++ src/enums.h 24 Apr 2003 06:24:34 -0000 @@ -708,7 +708,7 @@ typedef enum { /* CygWin & Windows NT Port */ -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +#ifdef _SQUID_WIN32_ /* * Supported Windows OS types codes */ Index: src/globals.h =================================================================== RCS file: /cvsroot/squid/squid3/src/globals.h,v retrieving revision 1.123 diff -u -w -p -r1.123 globals.h --- src/globals.h 22 Apr 2003 15:06:09 -0000 1.123 +++ src/globals.h 24 Apr 2003 06:24:34 -0000 @@ -160,7 +160,7 @@ extern int incoming_sockets_accepted; #ifdef _SQUID_MSWIN_ extern unsigned int WIN32_Socks_initialized; /* 0 */ #endif -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +#ifdef _SQUID_WIN32_ extern unsigned int WIN32_OS_version; /* 0 */ extern char *WIN32_OS_string; /* NULL */ extern char *WIN32_Service_name; /* NULL */ Index: src/main.cc =================================================================== RCS file: /cvsroot/squid/squid3/src/main.cc,v retrieving revision 1.372 diff -u -w -p -r1.372 main.cc --- src/main.cc 22 Apr 2003 15:06:10 -0000 1.372 +++ src/main.cc 24 Apr 2003 06:24:34 -0000 @@ -607,7 +607,7 @@ mainInitialize(void) version_string, CONFIG_HOST_TYPE); -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +#ifdef _SQUID_WIN32_ if (WIN32_run_mode == _WIN_SQUID_RUN_MODE_SERVICE) { debug(1, 0) ("Running as %s Windows System Service on %s\n", WIN32_Service_name, WIN32_OS_string); @@ -764,7 +764,7 @@ main(int argc, char **argv) int errcount = 0; int n; /* # of GC'd objects */ mode_t oldmask; -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +#ifdef _SQUID_WIN32_ int WIN32_init_err; #endif @@ -779,7 +779,7 @@ main(int argc, char **argv) if (FD_SETSIZE < Squid_MaxFD) Squid_MaxFD = FD_SETSIZE; -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +#ifdef _SQUID_WIN32_ if ((WIN32_init_err = WIN32_Subsystem_Init())) return WIN32_init_err; Index: src/mime.cc =================================================================== RCS file: /cvsroot/squid/squid3/src/mime.cc,v retrieving revision 1.111 diff -u -w -p -r1.111 mime.cc --- src/mime.cc 21 Feb 2003 22:50:10 -0000 1.111 +++ src/mime.cc 24 Apr 2003 06:24:34 -0000 @@ -421,7 +421,7 @@ mimeInit(char *filename) return; } -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +#ifdef _SQUID_WIN32_ setmode(fileno(fp), O_TEXT); #endif Index: src/pinger.cc =================================================================== RCS file: /cvsroot/squid/squid3/src/pinger.cc,v retrieving revision 1.51 diff -u -w -p -r1.51 pinger.cc --- src/pinger.cc 23 Feb 2003 00:08:04 -0000 1.51 +++ src/pinger.cc 24 Apr 2003 06:24:35 -0000 @@ -42,7 +42,7 @@ to use the native Windows port definitions. */ -#if !defined(_SQUID_MSWIN_) && !defined(_SQUID_CYGWIN_) +#ifndef _SQUID_WIN32_ #include #include @@ -54,7 +54,7 @@ static int socket_from_squid = 0; static int socket_to_squid = 1; -#else /* _SQUID_MSWIN_ or _SQUID_CYGWIN_ */ +#else /* _SQUID_WIN32_ */ #ifdef _SQUID_MSWIN_ Index: src/protos.h =================================================================== RCS file: /cvsroot/squid/squid3/src/protos.h,v retrieving revision 1.476 diff -u -w -p -r1.476 protos.h --- src/protos.h 21 Apr 2003 12:52:40 -0000 1.476 +++ src/protos.h 24 Apr 2003 06:24:35 -0000 @@ -1069,7 +1069,7 @@ SQUIDCEXTERN int varyEvaluateMatch(Store /* CygWin & Windows NT Port */ /* win32.c */ -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +#ifdef _SQUID_WIN32_ #ifdef USE_WIN32_SERVICE SQUIDCEXTERN int WIN32_Subsystem_Init(int *, char ***); #else @@ -1081,7 +1081,7 @@ SQUIDCEXTERN void WIN32_Exit(void); SQUIDCEXTERN void WIN32_SetServiceCommandLine(void); SQUIDCEXTERN void WIN32_InstallService(void); SQUIDCEXTERN void WIN32_RemoveService(void); -#endif +#endif /* _SQUID_WIN32_ */ #ifdef _SQUID_MSWIN_ SQUIDCEXTERN int WIN32_getrusage(int, struct rusage *); Index: src/squid.h =================================================================== RCS file: /cvsroot/squid/squid3/src/squid.h,v retrieving revision 1.233 diff -u -w -p -r1.233 squid.h --- src/squid.h 20 Apr 2003 05:29:00 -0000 1.233 +++ src/squid.h 24 Apr 2003 06:24:36 -0000 @@ -146,7 +146,7 @@ #if HAVE_LIMITS_H #include #endif -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +#ifdef _SQUID_WIN32_ #include #endif Index: src/stat.cc =================================================================== RCS file: /cvsroot/squid/squid3/src/stat.cc,v retrieving revision 1.373 diff -u -w -p -r1.373 stat.cc --- src/stat.cc 22 Apr 2003 15:06:10 -0000 1.373 +++ src/stat.cc 24 Apr 2003 06:24:36 -0000 @@ -455,7 +455,7 @@ info_get(StoreEntry * sentry) storeAppendPrintf(sentry, "Squid Object Cache: Version %s\n", version_string); -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +#ifdef _SQUID_WIN32_ if (WIN32_run_mode == _WIN_SQUID_RUN_MODE_SERVICE) { storeAppendPrintf(sentry,"\nRunning as %s Windows System Service on %s\n", Index: src/tools.cc =================================================================== RCS file: /cvsroot/squid/squid3/src/tools.cc,v retrieving revision 1.234 diff -u -w -p -r1.234 tools.cc --- src/tools.cc 20 Apr 2003 05:29:00 -0000 1.234 +++ src/tools.cc 24 Apr 2003 06:24:37 -0000 @@ -1170,7 +1170,7 @@ parseEtcHosts(void) return; } -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +#ifdef _SQUID_WIN32_ setmode(fileno(fp), O_TEXT); #endif Index: src/fs/ufs/store_dir_ufs.cc =================================================================== RCS file: /cvsroot/squid/squid3/src/fs/ufs/store_dir_ufs.cc,v retrieving revision 1.57 diff -u -w -p -r1.57 store_dir_ufs.cc --- src/fs/ufs/store_dir_ufs.cc 6 Mar 2003 06:21:41 -0000 1.57 +++ src/fs/ufs/store_dir_ufs.cc 24 Apr 2003 06:24:38 -0000 @@ -773,7 +773,7 @@ UFSSwapDir::closeTmpSwapLog() char *new_path = xstrdup(logFile(".new")); int fd; file_close(swaplog_fd); -#if defined (_SQUID_OS2_) || defined (_SQUID_CYGWIN_) || defined(_SQUID_MSWIN_) +#if defined (_SQUID_OS2_) || defined (_SQUID_WIN32_) if (::unlink(swaplog_path) < 0) { debug(50, 0) ("%s: %s\n", swaplog_path, xstrerror()); @@ -1020,7 +1020,7 @@ UFSSwapDir::writeCleanDone() /* rename */ if (state->fd >= 0) { -#if defined(_SQUID_OS2_) || defined (_SQUID_CYGWIN_) || defined(_SQUID_MSWIN_) +#if defined(_SQUID_OS2_) || defined (_SQUID_WIN32_) file_close(state->fd); state->fd = -1;