]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
From Guido (with additions by me):
authorhno <>
Thu, 24 Apr 2003 12:35:03 +0000 (12:35 +0000)
committerhno <>
Thu, 24 Apr 2003 12:35:03 +0000 (12:35 +0000)
  - new _SQUID_WIN32_ define instead of (_SQUID_CYGWIN_) ||
    (_SQUID_MSWIN_)

21 files changed:
include/config.h
lib/rfc1123.c
src/cache_cf.cc
src/cache_diff.cc
src/cf_gen.cc
src/client.cc
src/comm.cc
src/debug.cc
src/defines.h
src/disk.cc
src/dns_internal.cc
src/enums.h
src/fs/ufs/store_dir_ufs.cc
src/globals.h
src/main.cc
src/mime.cc
src/pinger.cc
src/protos.h
src/squid.h
src/stat.cc
src/tools.cc

index 78db763474f25ea11cefcf80bcf7e3fd5462a3c7..bf91ebbec6ded45356ab7c1a85e6756e6300dea1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: config.h,v 1.8 2003/01/23 00:36:47 robertc Exp $
+ * $Id: config.h,v 1.9 2003/04/24 06:35:03 hno Exp $
  *
  * AUTHOR: Duane Wessels
  *
 
 #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 42263ecad71f606f596fbe06fd47df61a9aa1871..2b7503e92b7001be94e37fb877f98f3cf7755581 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: rfc1123.c,v 1.32 2003/02/03 21:33:15 robertc Exp $
+ * $Id: rfc1123.c,v 1.33 2003/04/24 06:35:04 hno Exp $
  *
  * DEBUG: 
  * AUTHOR: Harvest Derived
@@ -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 7c3039e9c7731c18448ce193bbb3f66dd39d01eb..d9129be2591deda5fc109275f3184d5da8b0e84b 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cache_cf.cc,v 1.439 2003/04/17 15:25:43 hno Exp $
+ * $Id: cache_cf.cc,v 1.440 2003/04/24 06:35:04 hno Exp $
  *
  * DEBUG: section 3     Configuration File Parsing
  * AUTHOR: Harvest Derived
@@ -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 00ba8800b0eefa40941dd409a3dac3385ec36f5e..38b2ea01ce3f675d556fb92f2f1312d197d8d388 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cache_diff.cc,v 1.18 2003/02/21 22:50:06 robertc Exp $
+ * $Id: cache_diff.cc,v 1.19 2003/04/24 06:35:08 hno Exp $
  *
  * AUTHOR: Alex Rousskov
  *
@@ -153,7 +153,7 @@ cacheIndexAddLog(CacheIndex * idx, const char *fname)
         return 0;
     }
 
-#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)
+#ifdef _SQUID_WIN32_
     setmode(fileno(file), O_BINARY);
 
 #endif
index 592d5c436466ce1bbcf139bc88fb428b8cad38ed..078e0259b05c7ef27f08761e7409ea24012adf69 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cf_gen.cc,v 1.50 2003/02/21 22:50:07 robertc Exp $
+ * $Id: cf_gen.cc,v 1.51 2003/04/24 06:35:08 hno Exp $
  *
  * DEBUG: none          Generate squid.conf.default and cf_parser.h
  * AUTHOR: Max Okumoto
@@ -66,7 +66,7 @@
 #if HAVE_ASSERT_H
 #include <assert.h>
 #endif
-#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)
+#ifdef _SQUID_WIN32_
 #include <io.h>
 #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 04936efb3d0058b4974ee3eba13c6e87445c0852..bb8ae35ba37d5c57c89e246fc3cc210bd5a93285 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client.cc,v 1.105 2003/02/21 22:50:07 robertc Exp $
+ * $Id: client.cc,v 1.106 2003/04/24 06:35:08 hno Exp $
  *
  * DEBUG: section 0     WWW Client
  * AUTHOR: Harvest Derived
@@ -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 044b82f3115c540a7cd8c05f6fc86aae6509ebb7..4a270de0b77dd4f4c8b33a653f534935f630366d 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: comm.cc,v 1.373 2003/04/20 05:28:58 robertc Exp $
+ * $Id: comm.cc,v 1.374 2003/04/24 06:35:08 hno Exp $
  *
  * DEBUG: section 5     Socket Functions
  * AUTHOR: Harvest Derived
@@ -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 37498b74d88df936e3266ecf0f9dcecf87f60454..f21175c4d1401ecef4ef2e0a2def62f0d9cfbcb1 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: debug.cc,v 1.89 2003/02/21 22:50:07 robertc Exp $
+ * $Id: debug.cc,v 1.90 2003/04/24 06:35:08 hno Exp $
  *
  * DEBUG: section 0     Debug Routines
  * AUTHOR: Harvest Derived
@@ -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 4e21e71b83ff2d143a1b1171c59e21b71dd65d89..ba50b834f5409cf51ddfa20ca1cb8c9f2cd8e4a4 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: defines.h,v 1.113 2003/04/20 05:28:58 robertc Exp $
+ * $Id: defines.h,v 1.114 2003/04/24 06:35:08 hno Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
 #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 815f220b3bca1d5ac3aa434bcbb030b3f38dd132..80572a5338ba1f3fe8484b861a354e90232a5ee8 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: disk.cc,v 1.164 2003/02/21 22:50:08 robertc Exp $
+ * $Id: disk.cc,v 1.165 2003/04/24 06:35:08 hno Exp $
  *
  * DEBUG: section 6     Disk I/O Routines
  * AUTHOR: Harvest Derived
@@ -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 0cddc36865442a67aec191768f2640eca5f1c2f8..20bf511861f9e65b5386de21f93dda7b5a914873 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: dns_internal.cc,v 1.58 2003/04/22 15:06:09 hno Exp $
+ * $Id: dns_internal.cc,v 1.59 2003/04/24 06:35:09 hno Exp $
  *
  * DEBUG: section 78    DNS lookups; interacts with lib/rfc1035.c
  * AUTHOR: Duane Wessels
@@ -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 5584377290388464955f3917c2c35288e1e8b5c0..f8d5ae6f85c5e327abd3d39b09c0740b7fa32e2f 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: enums.h,v 1.230 2003/03/10 04:56:38 robertc Exp $
+ * $Id: enums.h,v 1.231 2003/04/24 06:35:09 hno Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -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 480c4684c5bdabdd72d9896adf12b81063496607..74b82e524d8dfbbeada26126dee91771ea31cea6 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_dir_ufs.cc,v 1.57 2003/03/06 06:21:41 robertc Exp $
+ * $Id: store_dir_ufs.cc,v 1.58 2003/04/24 06:35:10 hno Exp $
  *
  * DEBUG: section 47    Store Directory Routines
  * AUTHOR: Duane Wessels
@@ -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;
 
index 1a7b503b906d5f9beea57ec66945dfa870bbfeae..e0366070c54fcbc6de4ec98e18664d42f27a38c4 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: globals.h,v 1.123 2003/04/22 15:06:09 hno Exp $
+ * $Id: globals.h,v 1.124 2003/04/24 06:35:09 hno Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -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 f935236603bfee5db5e62061a6311cce1ba3d24d..99eef498061628499598ed7904542cb9b995e68d 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: main.cc,v 1.372 2003/04/22 15:06:10 hno Exp $
+ * $Id: main.cc,v 1.373 2003/04/24 06:35:09 hno Exp $
  *
  * DEBUG: section 1     Startup and Main Loop
  * AUTHOR: Harvest Derived
@@ -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 66a592edb7ddaa02a7a1e239569f56f19005bb19..acee3acd17ef3f6bed9ae949546810890b3a0ce9 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: mime.cc,v 1.111 2003/02/21 22:50:10 robertc Exp $
+ * $Id: mime.cc,v 1.112 2003/04/24 06:35:09 hno Exp $
  *
  * DEBUG: section 25    MIME Parsing
  * AUTHOR: Harvest Derived
@@ -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 dbc1c3c8943d2c0ff361de409b6a222022844092..68800b9a5ccf314004cc28b17b9f8b967e3b717e 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: pinger.cc,v 1.51 2003/02/23 00:08:04 robertc Exp $
+ * $Id: pinger.cc,v 1.52 2003/04/24 06:35:09 hno 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_)
+#ifndef _SQUID_WIN32_
 
 #include <netinet/in_systm.h>
 #include <netinet/in.h>
@@ -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 5ab1b704b05b848a764be55a320f0c0b2857ccb5..9fff7822e13c7b448bb67231be830c8bcfea3074 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: protos.h,v 1.476 2003/04/21 12:52:40 hno Exp $
+ * $Id: protos.h,v 1.477 2003/04/24 06:35:09 hno Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -1069,7 +1069,7 @@ SQUIDCEXTERN int varyEvaluateMatch(StoreEntry * entry, request_t * req);
 
 /* 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 abc6bf1bc4bff54e42f8512da0dab8643be150fd..cb668974ff94f9c466ac23018b4f1e80e29ff4b1 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: squid.h,v 1.233 2003/04/20 05:29:00 robertc Exp $
+ * $Id: squid.h,v 1.234 2003/04/24 06:35:09 hno Exp $
  *
  * AUTHOR: Duane Wessels
  *
 #if HAVE_LIMITS_H
 #include <limits.h>
 #endif
-#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)
+#ifdef _SQUID_WIN32_
 #include <io.h>
 #endif
 
index b8945481a279195d1dc4d667dca84cf60bafbdbf..3fb08e74bf8871c231bbca1edc231aa5db7ba9da 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: stat.cc,v 1.373 2003/04/22 15:06:10 hno Exp $
+ * $Id: stat.cc,v 1.374 2003/04/24 06:35:09 hno Exp $
  *
  * DEBUG: section 18    Cache Manager Statistics
  * AUTHOR: Harvest Derived
@@ -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 94db68d3355f2da532807aa3f2f4587d55ff3caf..38d2052723d60831a6762bbd2120b6a28b45254f 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: tools.cc,v 1.234 2003/04/20 05:29:00 robertc Exp $
+ * $Id: tools.cc,v 1.235 2003/04/24 06:35:09 hno Exp $
  *
  * DEBUG: section 21    Misc Functions
  * AUTHOR: Harvest Derived
@@ -1170,7 +1170,7 @@ parseEtcHosts(void)
         return;
     }
 
-#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)
+#ifdef _SQUID_WIN32_
     setmode(fileno(fp), O_TEXT);
 
 #endif