]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Windows: simplify abstraction layer header files
authorAmos Jeffries <squid3@treenet.co.nz>
Mon, 8 Oct 2012 08:40:01 +0000 (02:40 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 8 Oct 2012 08:40:01 +0000 (02:40 -0600)
Merge compat/os/windows.h, compat/os/mswin.h, and include/squid_windows.h
into a single compat/os/mswindows.h pulled in via the compat.h.

Also, rename compat/mswin.cc to match the new header .h name.

12 files changed:
compat/Makefile.am
compat/mswindows.cc [moved from compat/mswin.cc with 99% similarity]
compat/os/mswindows.h [moved from compat/os/mswin.h with 97% similarity]
compat/os/windows.h [deleted file]
include/squid_windows.h [deleted file]
src/DiskIO/AIO/aio_win32.h
src/DiskIO/DiskThreads/aiops_win32.cc
src/WinSvc.cc
src/dns_internal.cc
src/eui/Eui48.cc
src/main.cc
src/win32.cc

index a3e3ff257aca6a9263fd8cdf63f4a3a2015d34e1..bbd27cb3bc2ecd78f0afe8043e51bfadc0b9c7dd 100644 (file)
@@ -62,8 +62,8 @@ libcompat_squid_a_SOURCES = \
        os/hpux.h \
        os/linux.h \
        os/macosx.h \
-       os/mswin.h \
-       mswin.cc \
+       os/mswindows.h \
+       mswindows.cc \
        os/netbsd.h \
        os/next.h \
        os/openbsd.h \
@@ -72,8 +72,7 @@ libcompat_squid_a_SOURCES = \
        os/qnx.h \
        os/sgi.h \
        os/solaris.h \
-       os/sunos.h \
-       os/windows.h
+       os/sunos.h
 
 libcompat_squid_a_LIBADD= $(LIBOBJS)
 
similarity index 99%
rename from compat/mswin.cc
rename to compat/mswindows.cc
index a731792e042ea6b4e8f875dde9f5ab6e7db264aa..bb057492dd3adaf815ebdffcb7f020e84eae44c4 100644 (file)
@@ -46,7 +46,6 @@
 #include <assert.h>
 #include <stdio.h>
 #include <fcntl.h>
-#include "squid_windows.h"
 #include <string.h>
 #include <sys/timeb.h>
 #if HAVE_WIN32_PSAPI
similarity index 97%
rename from compat/os/mswin.h
rename to compat/os/mswindows.h
index 4cc1b0d0aa15a6643305c41cb5a8b938bedbcfa6..6edc67b6b58a8e8c9cdeb58e1bf935515a964c74 100644 (file)
@@ -29,8 +29,8 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
  *
  */
-#ifndef SQUID_OS_MSWIN_H
-#define SQUID_OS_MSWIN_H
+#ifndef SQUID_OS_MSWINDOWS_H
+#define SQUID_OS_MSWINDOWS_H
 
 #if _SQUID_WINDOWS_
 
@@ -771,5 +771,21 @@ SQUIDCEXTERN size_t getpagesize(void);
 #define PRINTF_FORMAT_ARG3
 #endif
 
+/* XXX: the logic around this is a bit warped:
+ *   we #define ACL unconditionally at the top of this file,
+ *   then #undef ACL unconditionally hafway down,
+ *   then here re-define ACL to the same value as at the top,
+ *   then include windows.h and #undef ACL again.
+ */
+#ifndef ACL
+#define ACL WindowsACL
+#define _MSWIN_ACL_WAS_NOT_DEFINED 1
+#endif
+#include <windows.h>
+#if _MSWIN_ACL_WAS_NOT_DEFINED
+#undef ACL
+#undef _MSWIN_ACL_WAS_NOT_DEFINED
+#endif
+
 #endif /* _SQUID_WINDOWS_ */
-#endif /* SQUID_OS_MSWIN_H */
+#endif /* SQUID_OS_MSWINDOWS_H */
diff --git a/compat/os/windows.h b/compat/os/windows.h
deleted file mode 100644 (file)
index 6215255..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * AUTHOR: Guido Serassio <serassio@squid-cache.org>
- *
- * SQUID Web Proxy Cache          http://www.squid-cache.org/
- * ----------------------------------------------------------
- *
- *  Squid is the result of efforts by numerous individuals from
- *  the Internet community; see the CONTRIBUTORS file for full
- *  details.   Many organizations have provided support for Squid's
- *  development; see the SPONSORS file for full details.  Squid is
- *  Copyrighted (C) 2001 by the Regents of the University of
- *  California; see the COPYRIGHT file for full details.  Squid
- *  incorporates software developed and/or copyrighted by other
- *  sources; see the CREDITS file for full details.
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
- *
- */
-#ifndef SQUID_OS_WINDOWS_H
-#define SQUID_OS_WINDOWS_H
-
-#if _SQUID_WINDOWS_
-
-#ifndef ACL
-#define ACL WindowsACL
-#define _MSWIN_ACL_WAS_NOT_DEFINED 1
-#endif
-#include <windows.h>
-#if _MSWIN_ACL_WAS_NOT_DEFINED
-#undef ACL
-#undef _MSWIN_ACL_WAS_NOT_DEFINED
-#endif
-
-#endif /* _SQUID_WINDOWS_ */
-#endif /* SQUID_OS_WINDOWS_H */
diff --git a/include/squid_windows.h b/include/squid_windows.h
deleted file mode 100644 (file)
index 558afcd..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * AUTHOR: Guido Serassio <serassio@squid-cache.org>
- *
- * SQUID Web Proxy Cache          http://www.squid-cache.org/
- * ----------------------------------------------------------
- *
- *  Squid is the result of efforts by numerous individuals from
- *  the Internet community; see the CONTRIBUTORS file for full
- *  details.   Many organizations have provided support for Squid's
- *  development; see the SPONSORS file for full details.  Squid is
- *  Copyrighted (C) 2001 by the Regents of the University of
- *  California; see the COPYRIGHT file for full details.  Squid
- *  incorporates software developed and/or copyrighted by other
- *  sources; see the CREDITS file for full details.
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
- *
- */
-#ifndef _INC_SQUID_WINDOWS_H
-#define _INC_SQUID_WINDOWS_H
-
-#if _SQUID_WINDOWS_
-
-#ifndef ACL
-#define ACL WindowsACL
-#define _MSWIN_ACL_WAS_NOT_DEFINED 1
-#endif
-#include <windows.h>
-#if _MSWIN_ACL_WAS_NOT_DEFINED
-#undef ACL
-#undef _MSWIN_ACL_WAS_NOT_DEFINED
-#endif
-
-#endif /* _SQUID_WINDOWS_ */
-#endif /* _INC_SQUID_WINDOWS_H */
index fb05246277e60e81843e93945cf00720356fc772..e829520bc284f97b04878ac7e31eb04d7f670394 100644 (file)
 
 #if USE_DISKIO_AIO
 
-#if _SQUID_CYGWIN_
-#include "squid_windows.h"
-#endif
-
 #ifndef off64_t
 typedef int64_t        off64_t;
 #endif
index 9523acbef2b8ea898ef1ad0d87ce9614f74a33b4..1c322a5940f2469c71d878ef041203308a388059 100644 (file)
@@ -33,7 +33,6 @@
  */
 
 #include "squid.h"
-#include "squid_windows.h"
 #include "DiskIO/DiskThreads/CommIO.h"
 #include "DiskThreads.h"
 #include "SquidConfig.h"
index cac66d5d183eba9f862240ecd778ca3b3c063590..8f023fa71bce7f06fe54e4ac3e1994eba417f5cd 100644 (file)
@@ -33,7 +33,6 @@
 
 #include "squid.h"
 #include "protos.h"
-#include "squid_windows.h"
 
 #if _SQUID_WINDOWS_
 #ifndef _MSWSOCK_
index 7af69c14555cbde97b8c956ee40069fc0ae80b63..fbb87044264f502285e79fd0eb519e7dfb31fda3 100644 (file)
@@ -72,7 +72,6 @@
  */
 #if !USE_DNSHELPER
 #if _SQUID_WINDOWS_
-#include "squid_windows.h"
 #define REG_TCPIP_PARA_INTERFACES "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Interfaces"
 #define REG_TCPIP_PARA "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters"
 #define REG_VXD_MSTCP "SYSTEM\\CurrentControlSet\\Services\\VxD\\MSTCP"
index 57694d8192c4976eab415008fda81e2e705a715d..a96561a74961cde33d199324ba29f19b85ddda46 100644 (file)
@@ -44,9 +44,6 @@
 #if HAVE_ERRNO_H
 #include <errno.h>
 #endif
-#if _SQUID_CYGWIN_
-#include <squid_windows.h>
-#endif
 
 /* START Legacy includes pattern */
 /* TODO: clean this up so we dont have per-OS requirements.
index 5468467d8fc3cb0c0d9788ba2b3aaa69068b3d9e..544fe2838ce06e4e2458df4db0cee21c7f7efa1d 100644 (file)
 #endif
 
 #if USE_WIN32_SERVICE
-#include "squid_windows.h"
 #include <process.h>
 
 static int opt_install_service = FALSE;
@@ -162,7 +161,6 @@ static int opt_signal_service = FALSE;
 static int opt_command_line = FALSE;
 void WIN32_svcstatusupdate(DWORD, DWORD);
 void WINAPI WIN32_svcHandler(DWORD);
-
 #endif
 
 #if !defined(SQUID_BUILD_INFO)
index 1fe62cf779082387e9e9554a476a18df600518c8..451afb9eb0a2f2d821f30dc8817ea8d75802dd24 100644 (file)
@@ -32,7 +32,6 @@
  */
 
 #include "squid.h"
-#include "squid_windows.h"
 #include "win32.h"
 
 #if _SQUID_WINDOWS_