]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Changed _SQUID_MSWIN_ to _SQUID_WINDOWS_ everywhere.
authorFrancesco Chemolli <kinkie@squid-cache.org>
Sat, 28 Jan 2012 17:24:17 +0000 (18:24 +0100)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Sat, 28 Jan 2012 17:24:17 +0000 (18:24 +0100)
13 files changed:
src/debug.cc
src/defines.h
src/dns_internal.cc
src/dnsserver.cc
src/globals.h
src/icmp/Icmp4.h
src/icmp/IcmpPinger.cc
src/icmp/IcmpSquid.cc
src/icmp/pinger.cc
src/protos.h
src/squid-old.h
src/ssl/certificate_db.cc
src/ssl/certificate_db.h

index a2eb7d2c4f3794d9102da41f1a790dbdae193a5f..b30e637e2645211b5de9993b85415079ec81b6ac 100644 (file)
@@ -64,7 +64,7 @@ static void _db_print_syslog(const char *format, va_list args);
 static void _db_print_stderr(const char *format, va_list args);
 static void _db_print_file(const char *format, va_list args);
 
-#if _SQUID_MSWIN_
+#if _SQUID_WINDOWS_
 SQUIDCEXTERN LPCRITICAL_SECTION dbg_mutex;
 typedef BOOL (WINAPI * PFInitializeCriticalSectionAndSpinCount) (LPCRITICAL_SECTION, DWORD);
 #endif
@@ -78,7 +78,7 @@ _db_print(const char *format,...)
     va_list args2;
     va_list args3;
 
-#if _SQUID_MSWIN_
+#if _SQUID_WINDOWS_
     /* Multiple WIN32 threads may call this simultaneously */
 
     if (!dbg_mutex) {
@@ -131,7 +131,7 @@ _db_print(const char *format,...)
     _db_print_syslog(format, args3);
 #endif
 
-#if _SQUID_MSWIN_
+#if _SQUID_WINDOWS_
     LeaveCriticalSection(dbg_mutex);
 #endif
 
@@ -487,7 +487,7 @@ _db_rotate_log(void)
         i--;
         snprintf(from, MAXPATHLEN, "%s.%d", debug_log_file, i - 1);
         snprintf(to, MAXPATHLEN, "%s.%d", debug_log_file, i);
-#if _SQUID_MSWIN_
+#if _SQUID_WINDOWS_
         remove
         (to);
 #endif
@@ -498,14 +498,14 @@ _db_rotate_log(void)
      * You can't rename open files on Microsoft "operating systems"
      * so we close before renaming.
      */
-#if _SQUID_MSWIN_
+#if _SQUID_WINDOWS_
     if (debug_log != stderr)
         fclose(debug_log);
 #endif
     /* Rotate the current log to .0 */
     if (Debug::rotateNumber > 0) {
         snprintf(to, MAXPATHLEN, "%s.%d", debug_log_file, 0);
-#if _SQUID_MSWIN_
+#if _SQUID_WINDOWS_
         remove
         (to);
 #endif
index 5d9a81d0d4253dd226ea5b936265d15ad3dbe597..89428e7a11253ffc418e5df01df81a30e9fc596f 100644 (file)
 /*
  * Max number of ICP messages to receive per call to icpHandleUdp
  */
-#if _SQUID_MSWIN_
+#if _SQUID_WINDOWS_
 #define INCOMING_ICP_MAX 1
 #else
 #define INCOMING_ICP_MAX 15
 /*
  * Max number of DNS messages to receive per call to DNS read handler
  */
-#if _SQUID_MSWIN_
+#if _SQUID_WINDOWS_
 #define INCOMING_DNS_MAX 1
 #else
 #define INCOMING_DNS_MAX 15
  * Max number of HTTP connections to accept per call to httpAccept
  * and PER HTTP PORT
  */
-#if _SQUID_MSWIN_
+#if _SQUID_WINDOWS_
 #define INCOMING_HTTP_MAX 1
 #else
 #define INCOMING_HTTP_MAX 10
index 2aca1f59d78d418ac66652a9912495c906d4ea21..ee9613a52ee87bacad616a8849b39f54aa88e5f8 100644 (file)
@@ -224,7 +224,7 @@ static void idnsAddPathComponent(const char *buf);
 static void idnsFreeNameservers(void);
 static void idnsFreeSearchpath(void);
 static void idnsParseNameservers(void);
-#if !_SQUID_MSWIN_
+#if !_SQUID_WINDOWS_
 static void idnsParseResolvConf(void);
 #endif
 #if _SQUID_WINDOWS_
@@ -356,7 +356,7 @@ idnsParseNameservers(void)
     }
 }
 
-#if !_SQUID_MSWIN_
+#if !_SQUID_WINDOWS_
 static void
 idnsParseResolvConf(void)
 {
@@ -1510,7 +1510,7 @@ dnsInit(void)
 
     assert(0 == nns);
     idnsParseNameservers();
-#if !_SQUID_MSWIN_
+#if !_SQUID_WINDOWS_
 
     if (0 == nns)
         idnsParseResolvConf();
index 6ad1771176328fe4c2c4ff34b7d9a2b0ced56811..b1f391ed29a3fca12e98c5ac1b89c0af3c651541 100644 (file)
@@ -494,7 +494,7 @@ main(int argc, char *argv[])
         }
     }
 
-#if _SQUID_MSWIN_
+#if _SQUID_WINDOWS_
     {
         WSADATA wsaData;
 
@@ -508,7 +508,7 @@ main(int argc, char *argv[])
         memset(request, '\0', REQ_SZ);
 
         if (fgets(request, REQ_SZ, stdin) == NULL) {
-#if _SQUID_MSWIN_
+#if _SQUID_WINDOWS_
             WSACleanup();
 #endif
             exit(1);
index 4165e0090cebbdb9083a440fdb3d2ee6b0c157b6..62eb01e9328d97875dea5b63134965af30bc170c 100644 (file)
@@ -133,7 +133,7 @@ extern "C" {
     extern int64_t store_maxobjsize;   /* -1 */
     extern hash_table *proxy_auth_username_cache;      /* NULL */
     extern int incoming_sockets_accepted;
-#if _SQUID_MSWIN_
+#if _SQUID_WINDOWS_
 
     extern unsigned int WIN32_Socks_initialized;       /* 0 */
 #endif
index 60ea6eb1a58c9f1d2c563189fb58522e1e28c69f..b732ce9b80580ed6f5c1c236abbba61447be987d 100644 (file)
@@ -86,7 +86,7 @@
 #if _SQUID_WINDOWS_
 #include "fde.h"
 
-#if _SQUID_MSWIN_
+#if _SQUID_WINDOWS_
 
 #if HAVE_WINSOCK2_H
 #include <winsock2.h>
@@ -126,7 +126,7 @@ typedef struct icmphdr {
     uint32_t timestamp;        /* not part of ICMP, but we need it */
 } icmphdr;
 
-#endif  /* _SQUID_MSWIN_ */
+#endif  /* _SQUID_WINDOWS_ */
 
 #ifndef ICMP_ECHO
 #define ICMP_ECHO 8
index 6d1c66c7219de77f8da698c6b9f4340aae1dbee8..085a8d2cf1bb3b26ebcc4509a6fb7e0bdfa20834 100644 (file)
@@ -56,7 +56,7 @@ IcmpPinger::~IcmpPinger()
     Close();
 }
 
-#if _SQUID_MSWIN_
+#if _SQUID_WINDOWS_
 void
 Win32SockCleanup(void)
 {
@@ -68,7 +68,7 @@ Win32SockCleanup(void)
 int
 IcmpPinger::Open(void)
 {
-#if _SQUID_MSWIN_
+#if _SQUID_WINDOWS_
 
     WSADATA wsaData;
     WSAPROTOCOL_INFO wpi;
@@ -150,7 +150,7 @@ IcmpPinger::Open(void)
 
     return icmp_sock;
 
-#else /* !_SQUID_MSWIN_ */
+#else /* !_SQUID_WINDOWS_ */
 
     /* non-windows apps use stdin/out pipes as the squid channel(s) */
     socket_from_squid = 0; // use STDIN macro ??
@@ -162,7 +162,7 @@ IcmpPinger::Open(void)
 void
 IcmpPinger::Close(void)
 {
-#if _SQUID_MSWIN_
+#if _SQUID_WINDOWS_
 
     shutdown(icmp_sock, SD_BOTH);
     close(icmp_sock);
index 46f9e5e80033b1733f930cd827b7ddbbe5736483..3af7efcb2c3405bc1e452022cb66d5a15f41bed1 100644 (file)
@@ -260,11 +260,11 @@ IcmpSquid::Open(void)
     if (localhost.SetIPv4())
         SendEcho(localhost, S_ICMP_ECHO, "localhost");
 
-#if _SQUID_MSWIN_
+#if _SQUID_WINDOWS_
 
     debugs(37, 4, HERE << "Pinger handle: 0x" << std::hex << hIpc << std::dec << ", PID: " << pid);
 
-#endif /* _SQUID_MSWIN_ */
+#endif /* _SQUID_WINDOWS_ */
     return icmp_sock;
 #else /* USE_ICMP */
     return -1;
@@ -281,7 +281,7 @@ IcmpSquid::Close(void)
 
     debugs(37, 1, HERE << "Closing Pinger socket on FD " << icmp_sock);
 
-#if _SQUID_MSWIN_
+#if _SQUID_WINDOWS_
 
     send(icmp_sock, (const void *) "$shutdown\n", 10, 0);
 
@@ -289,7 +289,7 @@ IcmpSquid::Close(void)
 
     comm_close(icmp_sock);
 
-#if _SQUID_MSWIN_
+#if _SQUID_WINDOWS_
 
     if (hIpc) {
         if (WaitForSingleObject(hIpc, 12000) != WAIT_OBJECT_0) {
index 1bbefdd12265101fedd0c6704fdc863be5871973..e2f58ba807de4cf9d37d07a5bce5f23c952035fc 100644 (file)
@@ -72,7 +72,7 @@
 #include "Icmp6.h"
 #include "IcmpPinger.h"
 
-#if _SQUID_MSWIN_
+#if _SQUID_WINDOWS_
 
 #if HAVE_WINSOCK2_H
 #include <winsock2.h>
@@ -106,7 +106,7 @@ Win32__WSAFDIsSet(int fd, fd_set FAR * set)
 /* non-windows use STDOUT for feedback to squid */
 #define LINK_TO_SQUID  1
 
-#endif /* _SQUID_MSWIN_ */
+#endif /* _SQUID_WINDOWS_ */
 
 // ICMP Engines are declared global here so they can call each other easily.
 IcmpPinger control;
index f6b849cae6e30332af46b6898e85ce9802a06548..aef3e05f3cbcf8f4ece6c7a1e8da3c15437a9c10 100644 (file)
@@ -673,7 +673,7 @@ SQUIDCEXTERN void WIN32_InstallService(void);
 SQUIDCEXTERN void WIN32_RemoveService(void);
 SQUIDCEXTERN int SquidMain(int, char **);
 #endif /* _SQUID_WINDOWS_ */
-#if _SQUID_MSWIN_
+#if _SQUID_WINDOWS_
 
 SQUIDCEXTERN int WIN32_pipe(int[2]);
 
index a5ccf4953ebbf976bea656ca0910b92197ca6c43..a8814ca1dd8a0d890924647fbc80cd0ae8c1be0d 100644 (file)
@@ -34,7 +34,7 @@
 
 #include "squid.h"
 
-#if _SQUID_MSWIN_
+#if _SQUID_WINDOWS_
 /** \cond AUTODOCS-IGNORE */
 using namespace Squid;
 /** \endcond */
index 7acf4178a4d799d58f9e4d78967a93e812dbbf73..66f75d0ddb993aa026b4169b9f023584baf1b59c 100644 (file)
@@ -27,7 +27,7 @@
 
 Ssl::Lock::Lock(std::string const &aFilename) :
         filename(aFilename),
-#if _SQUID_MSWIN_
+#if _SQUID_WINDOWS_
         hFile(INVALID_HANDLE_VALUE)
 #else
         fd(-1)
@@ -37,7 +37,7 @@ Ssl::Lock::Lock(std::string const &aFilename) :
 
 bool Ssl::Lock::locked() const
 {
-#if _SQUID_MSWIN_
+#if _SQUID_WINDOWS_
     return hFile != INVALID_HANDLE_VALUE;
 #else
     return fd != -1;
@@ -47,7 +47,7 @@ bool Ssl::Lock::locked() const
 void Ssl::Lock::lock()
 {
 
-#if _SQUID_MSWIN_
+#if _SQUID_WINDOWS_
     hFile = CreateFile(TEXT(filename.c_str()), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
     if (hFile == INVALID_HANDLE_VALUE)
 #else
@@ -57,7 +57,7 @@ void Ssl::Lock::lock()
         throw std::runtime_error("Failed to open file " + filename);
 
 
-#if _SQUID_MSWIN_
+#if _SQUID_WINDOWS_
     if (!LockFile(hFile, 0, 0, 1, 0))
 #else
     if (flock(fd, LOCK_EX) != 0)
@@ -67,7 +67,7 @@ void Ssl::Lock::lock()
 
 void Ssl::Lock::unlock()
 {
-#if _SQUID_MSWIN_
+#if _SQUID_WINDOWS_
     if (hFile != INVALID_HANDLE_VALUE) {
         UnlockFile(hFile, 0, 0, 1, 0);
         CloseHandle(hFile);
index 30352514313104e440999a20a7cf2ea1699e3582..3ea344928bcc92fafc97b4933b08fb22fd48cc71 100644 (file)
@@ -28,7 +28,7 @@ public:
     const char *name() const { return filename.c_str(); }
 private:
     std::string filename;
-#if _SQUID_MSWIN_
+#if _SQUID_WINDOWS_
     HANDLE hFile; ///< Windows file handle.
 #else
     int fd; ///< Linux file descriptor.