]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Portability: cleanup includes for sys/time.h and sys/resource.h
authorAmos Jeffries <squid3@treenet.co.nz>
Fri, 27 Sep 2013 16:06:15 +0000 (10:06 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 27 Sep 2013 16:06:15 +0000 (10:06 -0600)
These two include files are order-dependent on several operating systems
and as such are provided by Squid libcompat headers. There is no need for
code to include them specially and several HAVE_SYS_TIME_H macros were
missing which breaks the build on systems where the file is missing.

compat/os/mswindows.h
helpers/basic_auth/MSNT/msntauth.cc
helpers/external_acl/LDAP_group/ext_ldap_group_acl.cc
helpers/negotiate_auth/wrapper/negotiate_wrapper.cc
src/mgr/CountersAction.h
src/mgr/InfoAction.h
src/mgr/IntervalAction.h
src/win32.h

index 95edff63e5a2ea5203ea66323f14ec34839538a4..99c97f5bcfdf953e198981c57aa7488557cc70dc 100644 (file)
@@ -802,6 +802,10 @@ WSASocket(int a, int t, int p, LPWSAPROTOCOL_INFO i, GROUP g, DWORD f)
 #define open       _open /* Needed in win32lib.c */
 #endif /* #ifdef __cplusplus */
 
+/* provide missing definitions from resoruce.h */
+/* NP: sys/resource.h and sys/time.h are apparently order-dependant. */
+#if HAVE_SYS_TIME_H
+#endif
 #if HAVE_SYS_RESOURCE_H
 #include <sys/resource.h>
 #else
index b6b844d742235a61cb88cf89fbf437d4eaffbf94..49adc2bf397a026271ec3c85f2fc9ce1d0378989 100644 (file)
@@ -37,7 +37,6 @@
 #include <signal.h>
 #include <syslog.h>
 #include <string.h>
-#include <sys/time.h>
 
 #include "msntauth.h"
 
index 30394da72940a784efe6cd32e82515d5857a3468..28d97ee372f0210230a1900cdad03971d170a1c5 100644 (file)
@@ -89,10 +89,6 @@ PFldap_start_tls_s Win32_ldap_start_tls_s;
 
 #endif
 
-#if defined(LDAP_OPT_NETWORK_TIMEOUT)
-#include <sys/time.h>
-#endif
-
 #define PROGRAM_NAME "ext_ldap_group_acl"
 #define PROGRAM_VERSION "2.17"
 
index 7be404e7721e236269944e38e9b6660567d5a6d8..0d1d2dd2cc83100fdaf9c11cfdc892bc8ec0d48a 100644 (file)
@@ -46,9 +46,6 @@
 #if HAVE_TIME_H
 #include <time.h>
 #endif
-#if HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
 #if HAVE_ERRNO_H
 #include <errno.h>
 #endif
index e4d9013707a5a3be6ff4f2c9d1419e2253060b79..b8cbcba208f365df3cf21051b6e32524d1b4cc5d 100644 (file)
@@ -7,7 +7,6 @@
 #define SQUID_MGR_COUNTERS_ACTION_H
 
 #include "mgr/Action.h"
-#include <sys/time.h>
 
 namespace Mgr
 {
index e48e94c546935d5fe02797bdf351efffd68b8d71..f5cdc6097be0e4d5ae3ac90c3b46f00720922f4f 100644 (file)
@@ -8,7 +8,6 @@
 
 #include "mgr/Action.h"
 #include "StoreStats.h"
-#include <sys/time.h>
 
 namespace Mgr
 {
index 95e0771c94eaa1f7185917ad372def56ffec95f9..68c207eb3da837bccb7f1c5c5c885bb91883c635 100644 (file)
@@ -7,7 +7,6 @@
 #define SQUID_MGR_INTERVAL_ACTION_H
 
 #include "mgr/Action.h"
-#include <sys/time.h>
 
 namespace Mgr
 {
index b32c8c5bf9f99eae1246ba15654df8cc0f0df398..022011aecadf1aa8a03777a2598bf77b9232249f 100644 (file)
 
 #if _SQUID_WINDOWS_
 
-#if HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#if HAVE_SYS_RESOURCE_H
-#include <sys/resource.h>
-#endif
-
 void WIN32_ExceptionHandlerInit(void);
 
 int Win32__WSAFDIsSet(int fd, fd_set* set);