--------------------- PatchSet 7863 Date: 2006/05/22 18:31:46 Author: serassio Branch: nt Tag: (none) Log: Use _SQUID_WIN32_ instead of both _SQUID_MSWIN_ and _SQUID_CYGWIN_ Members: helpers/basic_auth/win32_locallogon/NT_auth.c:1.1.36.1->1.1.36.2 helpers/basic_auth/win32_locallogon/valid.c:1.1.36.1->1.1.36.2 include/config.h:1.8.8.3->1.8.8.4 lib/rfc1123.c:1.8.8.1->1.8.8.2 src/acl.c:1.64.2.3->1.64.2.4 src/cache_cf.c:1.61.2.3->1.61.2.4 src/cache_diff.c:1.8.8.1->1.8.8.2 src/cf_gen.c:1.15.8.1->1.15.8.2 src/client.c:1.14.8.1->1.14.8.2 src/comm.c:1.29.8.2->1.29.8.3 src/debug.c:1.11.8.1->1.11.8.2 src/defines.h:1.27.2.3->1.27.2.4 src/disk.c:1.13->1.13.8.1 src/dns_internal.c:1.19.8.2->1.19.8.3 src/enums.h:1.45.2.3->1.45.2.4 src/globals.h:1.22.2.1->1.22.2.2 src/main.c:1.45.2.2->1.45.2.3 src/mime.c:1.15.8.1->1.15.8.2 src/pinger.c:1.6.8.1->1.6.8.2 src/protos.h:1.74.2.4->1.74.2.5 src/squid.h:1.24.6.3->1.24.6.4 src/stat.c:1.26.6.2->1.26.6.3 src/tools.c:1.31.8.1->1.31.8.2 src/win32.c:1.7.8.1->1.7.8.2 src/fs/awin32/store_dir_aufs.c:1.1.88.1->1.1.88.2 src/fs/ufs/store_dir_ufs.c:1.33.8.2->1.33.8.3 Index: squid/helpers/basic_auth/win32_locallogon/NT_auth.c =================================================================== RCS file: /cvsroot/squid-sf//squid/helpers/basic_auth/win32_locallogon/Attic/NT_auth.c,v retrieving revision 1.1.36.1 retrieving revision 1.1.36.2 diff -u -r1.1.36.1 -r1.1.36.2 --- squid/helpers/basic_auth/win32_locallogon/NT_auth.c 16 May 2006 21:05:57 -0000 1.1.36.1 +++ squid/helpers/basic_auth/win32_locallogon/NT_auth.c 22 May 2006 18:31:46 -0000 1.1.36.2 @@ -30,7 +30,7 @@ #include "util.h" /* Check if we try to compile on a Windows Platform */ -#if defined(_SQUID_CYGWIN_) || defined(_SQUID_MSWIN_) +#ifdef _SQUID_WIN32_ #include "valid.h" Index: squid/helpers/basic_auth/win32_locallogon/valid.c =================================================================== RCS file: /cvsroot/squid-sf//squid/helpers/basic_auth/win32_locallogon/Attic/valid.c,v retrieving revision 1.1.36.1 retrieving revision 1.1.36.2 diff -u -r1.1.36.1 -r1.1.36.2 --- squid/helpers/basic_auth/win32_locallogon/valid.c 16 May 2006 21:05:57 -0000 1.1.36.1 +++ squid/helpers/basic_auth/win32_locallogon/valid.c 22 May 2006 18:31:46 -0000 1.1.36.2 @@ -29,7 +29,7 @@ #include "util.h" /* Check if we try to compile on a Windows Platform */ -#if defined(_SQUID_CYGWIN_) || defined(_SQUID_MSWIN_) +#ifdef _SQUID_WIN32_ #if defined(_SQUID_CYGWIN_) #include Index: squid/include/config.h =================================================================== RCS file: /cvsroot/squid-sf//squid/include/config.h,v retrieving revision 1.8.8.3 retrieving revision 1.8.8.4 diff -u -r1.8.8.3 -r1.8.8.4 --- squid/include/config.h 21 May 2006 12:29:09 -0000 1.8.8.3 +++ squid/include/config.h 22 May 2006 18:31:47 -0000 1.8.8.4 @@ -109,9 +109,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_ #include "squid_mswin.h" #elif defined(__APPLE__) Index: squid/lib/rfc1123.c =================================================================== RCS file: /cvsroot/squid-sf//squid/lib/rfc1123.c,v retrieving revision 1.8.8.1 retrieving revision 1.8.8.2 diff -u -r1.8.8.1 -r1.8.8.2 --- squid/lib/rfc1123.c 16 May 2006 21:05:58 -0000 1.8.8.1 +++ squid/lib/rfc1123.c 22 May 2006 18:31:47 -0000 1.8.8.2 @@ -1,6 +1,6 @@ /* - * $Id: rfc1123.c,v 1.8.8.1 2006/05/16 21:05:58 serassio Exp $ + * $Id: rfc1123.c,v 1.8.8.2 2006/05/22 18:31:47 serassio Exp $ * * DEBUG: * AUTHOR: Harvest Derived @@ -240,7 +240,7 @@ */ 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: squid/src/acl.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/acl.c,v retrieving revision 1.64.2.3 retrieving revision 1.64.2.4 diff -u -r1.64.2.3 -r1.64.2.4 --- squid/src/acl.c 22 May 2006 18:05:46 -0000 1.64.2.3 +++ squid/src/acl.c 22 May 2006 18:31:47 -0000 1.64.2.4 @@ -1,6 +1,6 @@ /* - * $Id: acl.c,v 1.64.2.3 2006/05/22 18:05:46 serassio Exp $ + * $Id: acl.c,v 1.64.2.4 2006/05/22 18:31:47 serassio Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -3033,7 +3033,7 @@ * Solaris code by R. Gancarz */ -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +#ifdef _SQUID_WIN32_ #ifdef _SQUID_CYGWIN_ #include #endif @@ -3349,7 +3349,7 @@ debug(28, 3) ("aclMatchArp: '%s' %s\n", inet_ntoa(c), splayLastResult ? "NOT found" : "found"); return (0 == splayLastResult); -#elif defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +#elif defined(_SQUID_WIN32_) DWORD dwNetTable = 0; DWORD ipNetTableLen = 0; @@ -3449,7 +3449,7 @@ return (d1[4] > d2[4]) ? 1 : -1; if (d1[5] != d2[5]) return (d1[5] > d2[5]) ? 1 : -1; -#elif defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +#elif defined(_SQUID_WIN32_) const unsigned char *d1 = a; const unsigned char *d2 = b; if (d1[0] != d2[0]) Index: squid/src/cache_cf.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/cache_cf.c,v retrieving revision 1.61.2.3 retrieving revision 1.61.2.4 diff -u -r1.61.2.3 -r1.61.2.4 --- squid/src/cache_cf.c 19 May 2006 16:00:14 -0000 1.61.2.3 +++ squid/src/cache_cf.c 22 May 2006 18:31:47 -0000 1.61.2.4 @@ -1,6 +1,6 @@ /* - * $Id: cache_cf.c,v 1.61.2.3 2006/05/19 16:00:14 serassio Exp $ + * $Id: cache_cf.c,v 1.61.2.4 2006/05/22 18:31:47 serassio Exp $ * * DEBUG: section 3 Configuration File Parsing * AUTHOR: Harvest Derived @@ -285,7 +285,7 @@ if ((fp = fopen(file_name, "r")) == NULL) 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); #endif cfg_filename = file_name; @@ -2915,7 +2915,7 @@ debug(28, 0) ("strtokFile: %s not found\n", fn); return (NULL); } -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +#ifdef _SQUID_WIN32_ setmode(fileno(wordFile), O_TEXT); #endif fromFile = 1; Index: squid/src/cache_diff.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/cache_diff.c,v retrieving revision 1.8.8.1 retrieving revision 1.8.8.2 diff -u -r1.8.8.1 -r1.8.8.2 --- squid/src/cache_diff.c 16 May 2006 21:06:02 -0000 1.8.8.1 +++ squid/src/cache_diff.c 22 May 2006 18:31:48 -0000 1.8.8.2 @@ -1,6 +1,6 @@ /* - * $Id: cache_diff.c,v 1.8.8.1 2006/05/16 21:06:02 serassio Exp $ + * $Id: cache_diff.c,v 1.8.8.2 2006/05/22 18:31:48 serassio Exp $ * * AUTHOR: Alex Rousskov * @@ -137,7 +137,7 @@ fprintf(stderr, "cannot open %s: %s\n", fname, strerror(errno)); return 0; } -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +#ifdef _SQUID_WIN32_ setmode(fileno(file), O_BINARY); #endif scanned_count = cacheIndexScan(idx, fname, file); Index: squid/src/cf_gen.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/cf_gen.c,v retrieving revision 1.15.8.1 retrieving revision 1.15.8.2 diff -u -r1.15.8.1 -r1.15.8.2 --- squid/src/cf_gen.c 16 May 2006 21:06:02 -0000 1.15.8.1 +++ squid/src/cf_gen.c 22 May 2006 18:31:48 -0000 1.15.8.2 @@ -1,6 +1,6 @@ /* - * $Id: cf_gen.c,v 1.15.8.1 2006/05/16 21:06:02 serassio Exp $ + * $Id: cf_gen.c,v 1.15.8.2 2006/05/22 18:31:48 serassio Exp $ * * DEBUG: none Generate squid.conf.default and cf_parser.h * AUTHOR: Max Okumoto @@ -134,7 +134,7 @@ perror(input_filename); exit(1); } -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +#ifdef _SQUID_WIN32_ setmode(fileno(fp), O_TEXT); #endif state = sSTART; @@ -321,7 +321,7 @@ perror(output_filename); exit(1); } -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +#ifdef _SQUID_WIN32_ setmode(fileno(fp), O_TEXT); #endif fprintf(fp, @@ -346,7 +346,7 @@ perror(conf_filename); exit(1); } -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +#ifdef _SQUID_WIN32_ setmode(fileno(fp), O_TEXT); #endif gen_conf(entries, fp); Index: squid/src/client.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/Attic/client.c,v retrieving revision 1.14.8.1 retrieving revision 1.14.8.2 diff -u -r1.14.8.1 -r1.14.8.2 --- squid/src/client.c 16 May 2006 21:06:02 -0000 1.14.8.1 +++ squid/src/client.c 22 May 2006 18:31:48 -0000 1.14.8.2 @@ -1,6 +1,6 @@ /* - * $Id: client.c,v 1.14.8.1 2006/05/16 21:06:02 serassio Exp $ + * $Id: client.c,v 1.14.8.2 2006/05/22 18:31:48 serassio Exp $ * * DEBUG: section 0 WWW Client * AUTHOR: Harvest Derived @@ -232,7 +232,7 @@ xstrerror()); exit(-1); } -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +#ifdef _SQUID_WIN32_ setmode(put_fd, O_BINARY); #endif fstat(put_fd, &sb); Index: squid/src/comm.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/comm.c,v retrieving revision 1.29.8.2 retrieving revision 1.29.8.3 diff -u -r1.29.8.2 -r1.29.8.3 --- squid/src/comm.c 18 May 2006 18:34:20 -0000 1.29.8.2 +++ squid/src/comm.c 22 May 2006 18:31:48 -0000 1.29.8.3 @@ -1,6 +1,6 @@ /* - * $Id: comm.c,v 1.29.8.2 2006/05/18 18:34:20 serassio Exp $ + * $Id: comm.c,v 1.29.8.3 2006/05/22 18:31:48 serassio Exp $ * * DEBUG: section 5 Socket Functions * AUTHOR: Harvest Derived @@ -884,7 +884,7 @@ int flags; int dummy = 0; #endif -#if defined (_SQUID_CYGWIN_) || defined (_SQUID_MSWIN_) +#ifdef _SQUID_WIN32_ int nonblocking = TRUE; #ifdef _SQUID_CYGWIN_ if (fd_table[fd].type != FD_PIPE) { Index: squid/src/debug.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/debug.c,v retrieving revision 1.11.8.1 retrieving revision 1.11.8.2 diff -u -r1.11.8.1 -r1.11.8.2 --- squid/src/debug.c 16 May 2006 21:06:03 -0000 1.11.8.1 +++ squid/src/debug.c 22 May 2006 18:31:48 -0000 1.11.8.2 @@ -1,6 +1,6 @@ /* - * $Id: debug.c,v 1.11.8.1 2006/05/16 21:06:03 serassio Exp $ + * $Id: debug.c,v 1.11.8.2 2006/05/22 18:31:48 serassio Exp $ * * DEBUG: section 0 Debug Routines * AUTHOR: Harvest Derived @@ -214,7 +214,7 @@ fflush(stderr); debug_log = stderr; } -#if defined(_SQUID_CYGWIN_)||defined(_SQUID_MSWIN_) +#ifdef _SQUID_WIN32_ setmode(fileno(debug_log), O_TEXT); #endif } Index: squid/src/defines.h =================================================================== RCS file: /cvsroot/squid-sf//squid/src/defines.h,v retrieving revision 1.27.2.3 retrieving revision 1.27.2.4 diff -u -r1.27.2.3 -r1.27.2.4 --- squid/src/defines.h 21 May 2006 07:17:22 -0000 1.27.2.3 +++ squid/src/defines.h 22 May 2006 18:31:48 -0000 1.27.2.4 @@ -1,6 +1,6 @@ /* - * $Id: defines.h,v 1.27.2.3 2006/05/21 07:17:22 serassio Exp $ + * $Id: defines.h,v 1.27.2.4 2006/05/22 18:31:48 serassio Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -311,8 +311,8 @@ #define O_BINARY 0 #endif -/* CygWin & Windows NT Port */ -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +/* Windows Port */ +#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: squid/src/disk.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/disk.c,v retrieving revision 1.13 retrieving revision 1.13.8.1 diff -u -r1.13 -r1.13.8.1 --- squid/src/disk.c 28 Apr 2006 11:10:52 -0000 1.13 +++ squid/src/disk.c 22 May 2006 18:31:48 -0000 1.13.8.1 @@ -1,6 +1,6 @@ /* - * $Id: disk.c,v 1.13 2006/04/28 11:10:52 squidadm Exp $ + * $Id: disk.c,v 1.13.8.1 2006/05/22 18:31:48 serassio Exp $ * * DEBUG: section 6 Disk I/O Routines * AUTHOR: Harvest Derived @@ -38,7 +38,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) { @@ -91,7 +91,7 @@ read_callback(-1, F->read_data); } 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: squid/src/dns_internal.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/dns_internal.c,v retrieving revision 1.19.8.2 retrieving revision 1.19.8.3 diff -u -r1.19.8.2 -r1.19.8.3 --- squid/src/dns_internal.c 18 May 2006 18:34:20 -0000 1.19.8.2 +++ squid/src/dns_internal.c 22 May 2006 18:31:48 -0000 1.19.8.3 @@ -1,6 +1,6 @@ /* - * $Id: dns_internal.c,v 1.19.8.2 2006/05/18 18:34:20 serassio Exp $ + * $Id: dns_internal.c,v 1.19.8.3 2006/05/22 18:31:48 serassio Exp $ * * DEBUG: section 78 DNS lookups; interacts with lib/rfc1035.c * AUTHOR: Duane Wessels @@ -49,7 +49,7 @@ #include #endif -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +#ifdef _SQUID_WIN32_ #include #endif #ifndef _PATH_RESCONF @@ -141,7 +141,7 @@ #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 idnsCacheQuery(idns_query * q); @@ -291,7 +291,7 @@ } #endif -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +#ifdef _SQUID_WIN32_ static void idnsParseWIN32Registry(void) { @@ -810,13 +810,13 @@ if (0 == nns) idnsParseResolvConf(); #endif -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +#ifdef _SQUID_WIN32_ if (0 == nns) idnsParseWIN32Registry(); #endif if (0 == nns) { debug(78, 1) ("Warning: Could not find any nameservers. Trying to use localhost\n"); -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +#ifdef _SQUID_WIN32_ debug(78, 1) ("Please check your TCP-IP settings or /etc/resolv.conf file\n"); #else debug(78, 1) ("Please check your /etc/resolv.conf file\n"); Index: squid/src/enums.h =================================================================== RCS file: /cvsroot/squid-sf//squid/src/enums.h,v retrieving revision 1.45.2.3 retrieving revision 1.45.2.4 diff -u -r1.45.2.3 -r1.45.2.4 --- squid/src/enums.h 22 May 2006 18:05:47 -0000 1.45.2.3 +++ squid/src/enums.h 22 May 2006 18:31:49 -0000 1.45.2.4 @@ -1,6 +1,6 @@ /* - * $Id: enums.h,v 1.45.2.3 2006/05/22 18:05:47 serassio Exp $ + * $Id: enums.h,v 1.45.2.4 2006/05/22 18:31:49 serassio Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -741,8 +741,8 @@ VARY_CANCEL }; -/* CygWin & Windows NT Port */ -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +/* Windows Port */ +#ifdef _SQUID_WIN32_ /* * Supported Windows OS types codes */ Index: squid/src/globals.h =================================================================== RCS file: /cvsroot/squid-sf//squid/src/globals.h,v retrieving revision 1.22.2.1 retrieving revision 1.22.2.2 diff -u -r1.22.2.1 -r1.22.2.2 --- squid/src/globals.h 16 May 2006 21:06:03 -0000 1.22.2.1 +++ squid/src/globals.h 22 May 2006 18:31:49 -0000 1.22.2.2 @@ -1,6 +1,6 @@ /* - * $Id: globals.h,v 1.22.2.1 2006/05/16 21:06:03 serassio Exp $ + * $Id: globals.h,v 1.22.2.2 2006/05/22 18:31:49 serassio Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -158,7 +158,7 @@ extern RemovalPolicy *mem_policy; extern hash_table *proxy_auth_username_cache; /* NULL */ extern int incoming_sockets_accepted; -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +#ifdef _SQUID_WIN32_ extern unsigned int WIN32_Socks_initialized; /* 0 */ extern unsigned int WIN32_OS_version; /* 0 */ extern char *WIN32_OS_string; /* NULL */ Index: squid/src/main.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/main.c,v retrieving revision 1.45.2.2 retrieving revision 1.45.2.3 diff -u -r1.45.2.2 -r1.45.2.3 --- squid/src/main.c 18 May 2006 18:34:20 -0000 1.45.2.2 +++ squid/src/main.c 22 May 2006 18:31:49 -0000 1.45.2.3 @@ -1,6 +1,6 @@ /* - * $Id: main.c,v 1.45.2.2 2006/05/18 18:34:20 serassio Exp $ + * $Id: main.c,v 1.45.2.3 2006/05/22 18:31:49 serassio Exp $ * * DEBUG: section 1 Startup and Main Loop * AUTHOR: Harvest Derived @@ -35,7 +35,7 @@ #include "squid.h" -#if defined(USE_WIN32_SERVICE) && (defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)) +#if defined(USE_WIN32_SERVICE) && defined(_SQUID_WIN32_) #include #include static int opt_install_service = FALSE; @@ -49,7 +49,7 @@ /* for error reporting from xmalloc and friends */ extern void (*failure_notify) (const char *); -#if defined(USE_WIN32_SERVICE) && (defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)) +#if defined(USE_WIN32_SERVICE) && defined(_SQUID_WIN32_) static int opt_no_daemon = 1; #else static int opt_no_daemon = 0; @@ -98,7 +98,7 @@ usage(void) { fprintf(stderr, -#if defined(USE_WIN32_SERVICE) && (defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)) +#if defined(USE_WIN32_SERVICE) && defined(_SQUID_WIN32_) "Usage: %s [-dhirvzCDFRVYX] [-s | -l facility] [-f config-file] [-[au] port] [-k signal] [-n name] [-O CommandLine]\n" #else "Usage: %s [-dhvzCDFNRVYX] [-s | -l facility] [-f config-file] [-[au] port] [-k signal]\n" @@ -108,13 +108,13 @@ " -f file Use given config-file instead of\n" " %s\n" " -h Print help message.\n" -#if defined(USE_WIN32_SERVICE) && (defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)) +#if defined(USE_WIN32_SERVICE) && defined(_SQUID_WIN32_) " -i Installs as a Windows Service (see -n option).\n" #endif " -k reconfigure|rotate|shutdown|interrupt|kill|debug|check|parse\n" " Parse configuration file, then send signal to \n" " running copy (except -k parse) and exit.\n" -#if defined(USE_WIN32_SERVICE) && (defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)) +#if defined(USE_WIN32_SERVICE) && defined(_SQUID_WIN32_) " -n name Specify Windows Service name to use for service operations\n" " default is: " _WIN_SQUID_DEFAULT_SERVICE_NAME ".\n" " -r Removes a Windows Service (see -n option).\n" @@ -127,7 +127,7 @@ " -C Do not catch fatal signals.\n" " -D Disable initial DNS tests.\n" " -F Don't serve any requests until store is rebuilt.\n" -#if !(defined(USE_WIN32_SERVICE) && (defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_))) +#if !(defined(USE_WIN32_SERVICE) && defined(_SQUID_WIN32_) " -N No daemon mode.\n" #else " -O options\n" @@ -148,7 +148,7 @@ extern char *optarg; int c; -#if defined(USE_WIN32_SERVICE) && (defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)) +#if defined(USE_WIN32_SERVICE) && defined(_SQUID_WIN32_) while ((c = getopt(argc, argv, "CDFO:RSVYXa:d:f:hik:m::n:rsl:u:vz?")) != -1) { #else while ((c = getopt(argc, argv, "CDFNRSVYXa:d:f:hk:m::sl:u:vz?")) != -1) { @@ -163,7 +163,7 @@ case 'F': opt_foreground_rebuild = 1; break; -#if !(defined(USE_WIN32_SERVICE) && (defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_))) +#if !(defined(USE_WIN32_SERVICE) && defined(_SQUID_WIN_)) case 'N': opt_no_daemon = 1; break; @@ -209,7 +209,7 @@ case 'h': usage(); break; -#if defined(USE_WIN32_SERVICE) && (defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)) +#if defined(USE_WIN32_SERVICE) && defined(_SQUID_WIN32_) case 'i': opt_install_service = TRUE; break; @@ -261,7 +261,7 @@ fatal("Need to configure --enable-xmalloc-debug-trace to use -m option"); #endif } -#if defined(USE_WIN32_SERVICE) && (defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)) +#if defined(USE_WIN32_SERVICE) && defined(_SQUID_WIN32_) case 'n': xfree(WIN32_Service_name); WIN32_Service_name = xstrdup(optarg); @@ -288,7 +288,7 @@ break; case 'v': printf("Squid Cache: Version %s\nconfigure options: %s\n", version_string, SQUID_CONFIGURE_OPTIONS); -#if defined(USE_WIN32_SERVICE) && (defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)) +#if defined(USE_WIN32_SERVICE) && defined(_SQUID_WIN32_) printf("Compiled as Windows System Service.\n"); #endif exit(0); @@ -583,7 +583,7 @@ debug(1, 0) ("Starting Squid Cache version %s for %s...\n", 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); debug(1, 0) ("Service command line is: %s\n", WIN32_Service_Command_Line); @@ -688,7 +688,7 @@ configured_once = 1; } -#if defined(USE_WIN32_SERVICE) && (defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)) +#if defined(USE_WIN32_SERVICE) && defined(_SQUID_WIN32_) /* When USE_WIN32_SERVICE is defined, the main function is placed in win32.c */ void WINAPI SquidMain(int argc, char **argv) @@ -709,7 +709,7 @@ if (FD_SETSIZE < Squid_MaxFD) Squid_MaxFD = FD_SETSIZE; -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +#ifdef _SQUID_WIN32_ #ifdef USE_WIN32_SERVICE if (WIN32_Subsystem_Init(&argc, &argv)) return; @@ -760,12 +760,12 @@ squid_start = current_time; failure_notify = fatal_dump; -#if defined(USE_WIN32_SERVICE) && (defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)) +#if defined(USE_WIN32_SERVICE) && defined(_SQUID_WIN32_) WIN32_svcstatusupdate(SERVICE_START_PENDING, 10000); #endif mainParseOptions(argc, argv); -#if defined(USE_WIN32_SERVICE) && (defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)) +#if defined(USE_WIN32_SERVICE) && defined(_SQUID_WIN32_) if (opt_install_service) { WIN32_InstallService(); return; @@ -798,7 +798,7 @@ parse_err = parseConfigFile(ConfigFile); if (opt_parse_cfg_only) -#if defined(USE_WIN32_SERVICE) && (defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)) +#if defined(USE_WIN32_SERVICE) && defined(_SQUID_WIN32_) return; #else return parse_err; @@ -837,7 +837,7 @@ setEffectiveUser(); debug(0, 0) ("Creating Swap Directories\n"); storeCreateSwapDirectories(); -#if defined(USE_WIN32_SERVICE) && (defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)) +#if defined(USE_WIN32_SERVICE) && defined(_SQUID_WIN32_) return; #else return 0; @@ -857,12 +857,12 @@ fd_open(1, FD_LOG, "stdout"); fd_open(2, FD_LOG, "stderr"); } -#if defined(USE_WIN32_SERVICE) && (defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)) +#if defined(USE_WIN32_SERVICE) && defined(_SQUID_WIN32_) WIN32_svcstatusupdate(SERVICE_START_PENDING, 10000); #endif mainInitialize(); -#if defined(USE_WIN32_SERVICE) && (defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)) +#if defined(USE_WIN32_SERVICE) && defined(_SQUID_WIN32_) WIN32_svcstatusupdate(SERVICE_RUNNING, 0); #endif @@ -887,7 +887,7 @@ (int) wait); do_shutdown = 0; shutting_down = 1; -#if defined(USE_WIN32_SERVICE) && (defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)) +#if defined(USE_WIN32_SERVICE) && defined(_SQUID_WIN32_) WIN32_svcstatusupdate(SERVICE_STOP_PENDING, (wait + 1) * 1000); #endif serverConnectionsClose(); @@ -923,7 +923,7 @@ } } /* NOTREACHED */ -#if defined(USE_WIN32_SERVICE) && (defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)) +#if defined(USE_WIN32_SERVICE) && defined(_SQUID_WIN32_) return; #else return 0; @@ -937,7 +937,7 @@ debug_log = stderr; pid = readPidFile(); if (pid > 1) { -#if defined(USE_WIN32_SERVICE) && (defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)) +#if defined(USE_WIN32_SERVICE) && defined(_SQUID_WIN32_) if (opt_signal_service) WIN32_sendSignal(opt_send_signal); else { @@ -1136,7 +1136,7 @@ static void SquidShutdown(void *unused) { -#if defined(USE_WIN32_SERVICE) && (defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)) +#if defined(USE_WIN32_SERVICE) && defined(_SQUID_WIN32_) WIN32_svcstatusupdate(SERVICE_STOP_PENDING, 10000); #endif debug(1, 1) ("Shutting down...\n"); @@ -1167,7 +1167,7 @@ #if USE_UNLINKD unlinkdClose(); #endif -#if defined(USE_WIN32_SERVICE) && (defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)) +#if defined(USE_WIN32_SERVICE) && defined(_SQUID_WIN32_) WIN32_svcstatusupdate(SERVICE_STOP_PENDING, 10000); #endif storeDirSync(); /* Flush pending object writes/unlinks */ Index: squid/src/mime.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/mime.c,v retrieving revision 1.15.8.1 retrieving revision 1.15.8.2 diff -u -r1.15.8.1 -r1.15.8.2 --- squid/src/mime.c 16 May 2006 21:06:04 -0000 1.15.8.1 +++ squid/src/mime.c 22 May 2006 18:31:49 -0000 1.15.8.2 @@ -1,6 +1,6 @@ /* - * $Id: mime.c,v 1.15.8.1 2006/05/16 21:06:04 serassio Exp $ + * $Id: mime.c,v 1.15.8.2 2006/05/22 18:31:49 serassio Exp $ * * DEBUG: section 25 MIME Parsing * AUTHOR: Harvest Derived @@ -302,7 +302,7 @@ debug(25, 1) ("mimeInit: %s: %s\n", filename, xstrerror()); return; } -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +#ifdef _SQUID_WIN32_ setmode(fileno(fp), O_TEXT); #endif mimeFreeMemory(); Index: squid/src/pinger.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/pinger.c,v retrieving revision 1.6.8.1 retrieving revision 1.6.8.2 diff -u -r1.6.8.1 -r1.6.8.2 --- squid/src/pinger.c 16 May 2006 21:06:04 -0000 1.6.8.1 +++ squid/src/pinger.c 22 May 2006 18:31:49 -0000 1.6.8.2 @@ -1,6 +1,6 @@ /* - * $Id: pinger.c,v 1.6.8.1 2006/05/16 21:06:04 serassio Exp $ + * $Id: pinger.c,v 1.6.8.2 2006/05/22 18:31:49 serassio Exp $ * * DEBUG: section 42 ICMP Pinger program * AUTHOR: Duane Wessels @@ -42,7 +42,7 @@ to use the native Windows port definitions. */ -#if !defined(_SQUID_MSWIN_) && !defined(_SQUID_CYGWIN_) +#if !defined(_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: squid/src/protos.h =================================================================== RCS file: /cvsroot/squid-sf//squid/src/protos.h,v retrieving revision 1.74.2.4 retrieving revision 1.74.2.5 diff -u -r1.74.2.4 -r1.74.2.5 --- squid/src/protos.h 21 May 2006 07:17:22 -0000 1.74.2.4 +++ squid/src/protos.h 22 May 2006 18:31:49 -0000 1.74.2.5 @@ -1,6 +1,6 @@ /* - * $Id: protos.h,v 1.74.2.4 2006/05/21 07:17:22 serassio Exp $ + * $Id: protos.h,v 1.74.2.5 2006/05/22 18:31:49 serassio Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -1356,7 +1356,7 @@ /* CygWin & Windows NT Port */ /* win32.c */ -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +#ifdef _SQUID_WIN32_ #ifdef USE_WIN32_SERVICE extern int WIN32_Subsystem_Init(int *, char ***); #else Index: squid/src/squid.h =================================================================== RCS file: /cvsroot/squid-sf//squid/src/squid.h,v retrieving revision 1.24.6.3 retrieving revision 1.24.6.4 diff -u -r1.24.6.3 -r1.24.6.4 --- squid/src/squid.h 21 May 2006 12:23:54 -0000 1.24.6.3 +++ squid/src/squid.h 22 May 2006 18:31:49 -0000 1.24.6.4 @@ -1,6 +1,6 @@ /* - * $Id: squid.h,v 1.24.6.3 2006/05/21 12:23:54 serassio Exp $ + * $Id: squid.h,v 1.24.6.4 2006/05/22 18:31:49 serassio Exp $ * * AUTHOR: Duane Wessels * @@ -214,7 +214,7 @@ #if HAVE_LIMITS_H #include #endif -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +#ifdef _SQUID_WIN32_ #include #endif Index: squid/src/stat.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/stat.c,v retrieving revision 1.26.6.2 retrieving revision 1.26.6.3 diff -u -r1.26.6.2 -r1.26.6.3 --- squid/src/stat.c 18 May 2006 18:34:20 -0000 1.26.6.2 +++ squid/src/stat.c 22 May 2006 18:31:49 -0000 1.26.6.3 @@ -1,6 +1,6 @@ /* - * $Id: stat.c,v 1.26.6.2 2006/05/18 18:34:20 serassio Exp $ + * $Id: stat.c,v 1.26.6.3 2006/05/22 18:31:49 serassio Exp $ * * DEBUG: section 18 Cache Manager Statistics * AUTHOR: Harvest Derived @@ -502,7 +502,7 @@ runtime = 1.0; 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", WIN32_Service_name, WIN32_OS_string); Index: squid/src/tools.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/tools.c,v retrieving revision 1.31.8.1 retrieving revision 1.31.8.2 diff -u -r1.31.8.1 -r1.31.8.2 --- squid/src/tools.c 16 May 2006 21:06:06 -0000 1.31.8.1 +++ squid/src/tools.c 22 May 2006 18:31:50 -0000 1.31.8.2 @@ -1,6 +1,6 @@ /* - * $Id: tools.c,v 1.31.8.1 2006/05/16 21:06:06 serassio Exp $ + * $Id: tools.c,v 1.31.8.2 2006/05/22 18:31:50 serassio Exp $ * * DEBUG: section 21 Misc Functions * AUTHOR: Harvest Derived @@ -1008,7 +1008,7 @@ xrename(const char *from, const char *to) { debug(21, 2) ("xrename: renaming %s to %s\n", from, to); -#if defined(_SQUID_OS2_) || defined(_SQUID_CYGWIN_) || defined(_SQUID_MSWIN_) +#if defined(_SQUID_OS2_) || defined(_SQUID_WIN32_) remove(to); #endif if (0 == rename(from, to)) @@ -1064,7 +1064,7 @@ Config.etcHostsPath, xstrerror()); return; } -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +#ifdef _SQUID_WIN32_ setmode(fileno(fp), O_TEXT); #endif while (fgets(buf, 1024, fp)) { /* for each line */ Index: squid/src/win32.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/win32.c,v retrieving revision 1.7.8.1 retrieving revision 1.7.8.2 diff -u -r1.7.8.1 -r1.7.8.2 --- squid/src/win32.c 16 May 2006 21:06:06 -0000 1.7.8.1 +++ squid/src/win32.c 22 May 2006 18:31:50 -0000 1.7.8.2 @@ -41,7 +41,7 @@ #include "squid.h" /* This code compiles only CygWin & Windows NT Port */ -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) +##ifdef _SQUID_WIN32_ #include #ifdef _SQUID_MSWIN_ #if HAVE_WIN32_PSAPI Index: squid/src/fs/awin32/store_dir_aufs.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/fs/awin32/Attic/store_dir_aufs.c,v retrieving revision 1.1.88.1 retrieving revision 1.1.88.2 diff -u -r1.1.88.1 -r1.1.88.2 --- squid/src/fs/awin32/store_dir_aufs.c 16 May 2006 21:06:06 -0000 1.1.88.1 +++ squid/src/fs/awin32/store_dir_aufs.c 22 May 2006 18:31:50 -0000 1.1.88.2 @@ -1,6 +1,6 @@ /* - * $Id: store_dir_aufs.c,v 1.1.88.1 2006/05/16 21:06:06 serassio Exp $ + * $Id: store_dir_aufs.c,v 1.1.88.2 2006/05/22 18:31:50 serassio Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Duane Wessels @@ -1329,7 +1329,7 @@ fd = state->fd; /* 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; #endif Index: squid/src/fs/ufs/store_dir_ufs.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/fs/ufs/store_dir_ufs.c,v retrieving revision 1.33.8.2 retrieving revision 1.33.8.3 diff -u -r1.33.8.2 -r1.33.8.3 --- squid/src/fs/ufs/store_dir_ufs.c 18 May 2006 18:34:21 -0000 1.33.8.2 +++ squid/src/fs/ufs/store_dir_ufs.c 22 May 2006 18:31:50 -0000 1.33.8.3 @@ -1336,7 +1336,7 @@ fd = state->fd; /* 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; #endif