]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Compat: Shuffle type portability definitions and includes into libcompat
authorAmos Jeffries <amosjeffries@squid-cache.org>
Sat, 20 Mar 2010 07:09:43 +0000 (01:09 -0600)
committerAmos Jeffries <amosjeffries@squid-cache.org>
Sat, 20 Mar 2010 07:09:43 +0000 (01:09 -0600)
30 files changed:
acinclude.m4
compat/GnuRegex.h
compat/Makefile.am
compat/assert.cc
compat/compat.h
compat/os/mswin.h
compat/os/next.h
compat/types.h [moved from include/squid_types.h with 59% similarity]
helpers/log_daemon/file/log_file_daemon.cc
include/config.h
include/md5.h
include/squid_endian.h
lib/getfullhostname.c
lib/util.c
lib/xusleep.c
src/DiskIO/DiskThreads/aiops.cc
src/DiskIO/DiskThreads/aiops_win32.cc
src/dnsserver.cc
src/icmp/Icmp4.h
src/icmp/IcmpConfig.h
src/ip/IpAddress.cc
src/ip/IpAddress.h
src/ip/IpIntercept.cc
src/recv-announce.cc
src/squid.h
test-suite/pconn-banger.c
test-suite/tcp-banger2.c
test-suite/tcp-banger3.c
tools/cachemgr.cc
tools/squidclient.cc

index 5d262fc91074f4ba2c1d72c4ed05bd7b2bd09bba..41fc0c77c42849b17bf18687440645959f77b678 100644 (file)
@@ -4,13 +4,18 @@ AC_DEFUN([SQUID_DEFAULT_INCLUDES],[[
 /* What a mess.. many systems have added the (now standard) bit types
  * in their own ways, so we need to scan a wide variety of headers to
  * find them..
- * IMPORTANT: Keep include/squid_types.h syncronised with this list
+ * IMPORTANT: Keep compat/types.h syncronised with this list
  */
 #if HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif  
-#if STDC_HEADERS
+#if HAVE_LINUX_TYPES_H
+#include <linux/types.h>
+#endif  
+#if HAVE_STDLIB_H
 #include <stdlib.h>
+#endif
+#if HAVE_STDDEF_H
 #include <stddef.h>
 #endif
 #if HAVE_INTTYPES_H
index b805f99f6a2e5e938cf0e1e5b9b6472e036bdf25..6bcb99ea166e6eca66b9821934567b3a4607540f 100644 (file)
@@ -48,13 +48,6 @@ extern "C" {
     /* POSIX says that <sys/types.h> must be included (by the caller) before
      * <regex.h>.  */
 
-#ifdef VMS
-    /* VMS doesn't have `size_t' in <sys/types.h>, even though POSIX says it
-     * should be there.  */
-#include <stddef.h>
-#endif
-
-
     /* The following bits are used to determine the regexp syntax we
      * recognize.  The set/not-set meanings are chosen so that Emacs syntax
      * remains the value 0.  The bits are given in alphabetical order, and
index 4d4f697c293d33390a9ccce0a4666b1e4b88a778..77c1fc31dcfdcf302d23d67550c9ac3b1177e6ee 100644 (file)
@@ -19,6 +19,7 @@ libcompat_la_SOURCES = \
        fdsetsize.h \
        osdetect.h \
        stdvarargs.h \
+       types.h \
        valgrind.h \
        \
        os/aix.h \
index b1e06e331533a6c396363df3e50e29915e637e0a..65bcbbb0f5d6339cf107781d9e7cec5be239f875 100644 (file)
@@ -36,9 +36,6 @@
 #if HAVE_STDIO_H
 #include <stdio.h>
 #endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
 
 #if 0
 #include "compat/assert.h"
index 160029171180cda5f86a060f0fa4ce7f462c08e1..a4d20698df8517103e6611d9cdb6bda455807102 100644 (file)
@@ -42,7 +42,7 @@
 /** On linux this must be defined to get PRId64 and friends */
 #define __STDC_FORMAT_MACROS
 
-#include "squid_types.h"
+#include "compat/types.h"
 
 /*****************************************************/
 /* per-OS hacks. One file per OS.                    */
index 2c3944ab13ea44a8cf8197d2862054cc8804fbdd..669ee7e0d1e08cb099b885e11076aa497c28b67e 100644 (file)
 
 #if defined(_MSC_VER) /* Microsoft C Compiler ONLY */
 
-typedef unsigned char uint8_t;
-typedef unsigned short uint16_t;
-typedef unsigned int uint32_t;
-typedef unsigned __int64 uint64_t;
-
-typedef long pid_t;
-
 #if defined __USE_FILE_OFFSET64
-typedef int64_t off_t;
 typedef uint64_t ino_t;
-
 #else
-typedef long off_t;
 typedef unsigned long ino_t;
-
 #endif
 
 #define INT64_MAX _I64_MAX
@@ -222,7 +211,6 @@ struct timezone {
 #define FD_SETSIZE SQUID_MAXFD
 #endif
 
-#include <stddef.h>
 #include <process.h>
 #include <errno.h>
 #if defined(_MSC_VER) /* Microsoft C Compiler ONLY */
@@ -245,7 +233,6 @@ struct timezone {
 #pragma warning (pop)
 #endif
 #include <io.h>
-#include <stdlib.h>
 
 typedef char * caddr_t;
 
index c275574b764b566dcd808de2a0b7accc0f9bb7ca..c023d95798f3940f4e07e652704a975512f770a6 100644 (file)
 
 /*
  * WAS: lots of special wrappers labeled only 'protect NEXTSTEP'
- * I'm assuming its an incomplete definition problem on that OS.
- * Or a missing safety wrapper by the looks of the _SQUID_NETDB_H_
+ * I'm assuming its an incomplete definition problem on that OS
+ * or a missing safety wrapper by the looks of the original hack.
  *
  * Anyway, this file is included before all general non-type headers.
  * doing the include here for Next and undefining HAVE_NETDB_H will
  * save us from including it again in general.
  */
-// All the hacks included this first without safety wrapping, then netdb.h.
-#include <netinet/in_systm.h>
 #if HAVE_NETDB_H
 #include <netdb.h>
 #endif
 #undef HAVE_NETDB_H
 #define HAVE_NETDB_H 0
 
-
 #endif /* _SQUID_NEXT_ */
 #endif /* SQUID_OS_NEXT_H */
similarity index 59%
rename from include/squid_types.h
rename to compat/types.h
index 0b4a60529e8ffb5a3eff8df756e2572d434574b2..eb3eb95bd3489cc5bd60d70c598062690a408f73 100644 (file)
@@ -1,6 +1,8 @@
+#ifndef SQUID_CONFIG_H
+#include "config.h"
+#endif
+
 /*
- * $Id$
- *
  * * * * * * * * Legal stuff * * * * * * *
  *
  * (C) 2000 Francesco Chemolli <kinkie@kame.usr.dsi.unimi.it>
@@ -49,7 +51,7 @@
  * from system locations or various attempts. This is just a convenience
  * header to include which takes care of proper preprocessor stuff
  *
- * This file is only intended to be included via config.h, do
+ * This file is only intended to be included via compat/compat.h, do
  * not include directly.
  */
 
 #if HAVE_LINUX_TYPES_H
 #include <linux/types.h>
 #endif
-#if STDC_HEADERS
+#if HAVE_STDLIB_H
 #include <stdlib.h>
+#endif
+#if HAVE_STDDEF_H
 #include <stddef.h>
 #endif
 #if HAVE_INTTYPES_H
 #include <netinet/in_systm.h>
 #endif
 
+
+/******************************************************/
+/* Typedefs for missing entries on a system           */
+/******************************************************/
+
+
 /*
  * ISO C99 Standard printf() macros for 64 bit integers
  * On some 64 bit platform, HP Tru64 is one, for printf must be used
 #endif
 #endif
 
+/* int64_t */
+#ifndef HAVE_INT64_T
+#if HAVE___INT64
+typedef __int64 int64_t;
+#elif HAVE_LONG && SIZEOF_LONG == 8
+typedef long int64_t;
+#elif HAVE_LONG_LONG && SIZEOF_LONG_LONG == 8
+typedef long long int64_t;
+#else
+#error NO 64 bit signed type available
+#endif
+#endif
+
+/* u_int64_t */
+#ifndef HAVE_U_INT64_T
+#if HAVE_UINT64_T
+typedef uint64_t u_int64_t;
+#else
+typedef unsigned int64_t u_int64_t;
+#endif
+#endif
+
+/* int32_t */
+#ifndef HAVE_INT32_T
+#if HAVE_INT && SIZEOF_INT == 4
+typedef int int32_t;
+#elif HAVE_LONG && SIZEOF_LONG == 4
+typedef long int32_t;
+#else
+#error NO 32 bit signed type available
+#endif
+#endif
+
+/* u_int32_t */
+#ifndef HAVE_U_INT32_T
+#if HAVE_UINT32_T
+typedef uint32_t u_int32_t;
+#else
+typedef unsigned int32_t u_int32_t;
+#endif
+#endif
+
+/* int16_t */
+#ifndef HAVE_INT16_T
+#if HAVE_SHORT && SIZEOF_SHORT == 2
+typedef short int16_t;
+#elif HAVE_INT && SIZEOF_INT == 2
+typedef int int16_t;
+#else
+#error NO 16 bit signed type available
+#endif
+#endif
+
+/* u_int16_t */
+#ifndef HAVE_U_INT16_T
+#if HAVE_UINT16_T
+typedef uint16_t u_int16_t;
+#else
+typedef unsigned int16_t u_int16_t;
+#endif
+#endif
+
+/* int8_t */
+#ifndef HAVE_INT8_T
+#if HAVE_CHAR && SIZEOF_CHAR == 1
+typedef char int8_t;
+#else
+#error NO 8 bit signed type available
+#endif
+#endif
+
+/* u_int8_t */
+#ifndef HAVE_U_INT8_T
+#if HAVE_UINT8_T
+typedef uint8_t u_int8_t;
+#else
+typedef unsigned char u_int8_t;
+#endif
+#endif
+
+#ifndef HAVE_PID_T
+#if defined(_MSC_VER) /* Microsoft C Compiler ONLY */
+typedef long pid_t;
+#else
+typedef int pid_t;
+#endif
+#endif
+
+#ifndef HAVE_SIZE_T
+typedef unsigned int size_t;
+#endif
+
+#ifndef HAVE_SSIZE_T
+typedef int ssize_t;
+#endif
+
+#ifndef HAVE_OFF_T
+#if defined(_MSC_VER) /* Microsoft C Compiler ONLY */
+#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
+typedef int64_t off_t;
+#else
+typedef long off_t;
+#endif
+#else
+typedef int off_t;
+#endif
+#endif
+
+#ifndef HAVE_MODE_T
+typedef unsigned short mode_t;
+#endif
+
+#ifndef HAVE_FD_MASK
+typedef unsigned long fd_mask;
+#endif
+
+#ifndef HAVE_SOCKLEN_T
+typedef int socklen_t;
+#endif
+
+#ifndef HAVE_MTYP_T
+typedef long mtyp_t;
+#endif
+
 #endif /* SQUID_TYPES_H */
index 3e86312385e6c7de7c3ded669e7f05771bd05fc7..24a7af31c846087592bc11e0ec36d640d069dc81 100644 (file)
@@ -3,9 +3,6 @@
 #if HAVE_STDIO_H
 #include <stdio.h>
 #endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
index 215a22a05223cfc4f5faf721efa7e2484d28bc6e..5a5d751bc2a0be09a586a520d7c4ecac1b1439ca 100644 (file)
 #endif
 #endif
 
-
-/* Typedefs for missing entries on a system */
-
-/* int8_t */
-#ifndef HAVE_INT8_T
-#if HAVE_CHAR && SIZEOF_CHAR == 1
-typedef char int8_t;
-#else
-#error NO 8 bit signed type available
-#endif
-#endif
-
-/* u_int8_t */
-#ifndef HAVE_U_INT8_T
-#if HAVE_UINT8_T
-typedef uint8_t u_int8_t;
-#else
-typedef unsigned char u_int8_t;
-#endif
-#endif
-
-/* int16_t */
-#ifndef HAVE_INT16_T
-#if HAVE_SHORT && SIZEOF_SHORT == 2
-typedef short int16_t;
-#elif HAVE_INT && SIZEOF_INT == 2
-typedef int int16_t;
-#else
-#error NO 16 bit signed type available
-#endif
-#endif
-
-/* u_int16_t */
-#ifndef HAVE_U_INT16_T
-#if HAVE_UINT16_T
-typedef uint16_t u_int16_t;
-#else
-typedef unsigned int16_t u_int16_t;
-#endif
-#endif
-
-/* int32_t */
-#ifndef HAVE_INT32_T
-#if HAVE_INT && SIZEOF_INT == 4
-typedef int int32_t;
-#elif HAVE_LONG && SIZEOF_LONG == 4
-typedef long int32_t;
-#else
-#error NO 32 bit signed type available
-#endif
-#endif
-
-/* u_int32_t */
-#ifndef HAVE_U_INT32_T
-#if HAVE_UINT32_T
-typedef uint32_t u_int32_t;
-#else
-typedef unsigned int32_t u_int32_t;
-#endif
-#endif
-
-/* int64_t */
-#ifndef HAVE_INT64_T
-#if HAVE___INT64
-typedef __int64 int64_t;
-#elif HAVE_LONG && SIZEOF_LONG == 8
-typedef long int64_t;
-#elif HAVE_LONG_LONG && SIZEOF_LONG_LONG == 8
-typedef long long int64_t;
-#else
-#error NO 64 bit signed type available
-#endif
-#endif
-
-/* u_int64_t */
-#ifndef HAVE_U_INT64_T
-#if HAVE_UINT64_T
-typedef uint64_t u_int64_t;
-#else
-typedef unsigned int64_t u_int64_t;
-#endif
-#endif
-
-
-#ifndef HAVE_PID_T
-typedef int pid_t;
-#endif
-
-#ifndef HAVE_SIZE_T
-typedef unsigned int size_t;
-#endif
-
-#ifndef HAVE_SSIZE_T
-typedef int ssize_t;
-#endif
-
-#ifndef HAVE_OFF_T
-typedef int off_t;
-#endif
-
-#ifndef HAVE_MODE_T
-typedef unsigned short mode_t;
-#endif
-
-#ifndef HAVE_FD_MASK
-typedef unsigned long fd_mask;
-#endif
-
-#ifndef HAVE_SOCKLEN_T
-typedef int socklen_t;
-#endif
-
-#ifndef HAVE_MTYP_T
-typedef long mtyp_t;
-#endif
-
 #if !defined(CACHEMGR_HOSTNAME)
 #define CACHEMGR_HOSTNAME ""
 #else
index 3f82a424ea467b1d5747d4f80530c322bb0c684b..bd2ae36304014687fd990a793c0c84e6cab3ef4b 100644 (file)
@@ -34,8 +34,6 @@
  *
  */
 
-#include "squid_types.h"
-
 typedef struct SquidMD5Context {
     uint32_t buf[4];
     uint32_t bytes[2];
index e0e92c70a1859f543912a6ac4f98c65536140781..8c05237cf25a6364d6a7437c04e0d360719b45ed 100644 (file)
@@ -56,7 +56,6 @@
  */
 
 #include "config.h"
-#include "squid_types.h"
 
 /*
  * Some systems define bswap_16() and bswap_32() in <byteswap.h>
index b7480b2673c2b118756b7c923e975253324754dd..5348ad7ec11e2a8b3951bdc9d63ea9bf7ca42cc5 100644 (file)
  */
 #include "getfullhostname.h"
 
-#if 0 /* we SHOULD NOT need ALL these here. */
-#if HAVE_LIBC_H
-#include <libc.h>
-#endif
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
-#if HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#if HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#if HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#if HAVE_ARPA_INET_H
-#include <arpa/inet.h>
-#endif
-
-#endif /* 0 */
-
 
 #if HAVE_UNISTD_H
 /* for gethostname() function */
 #include <unistd.h>
 #endif
-#if HAVE_NETDB_H && !defined(_SQUID_NETDB_H_)  /* protect on NEXTSTEP */
-#define _SQUID_NETDB_H_
+#if HAVE_NETDB_H
 /* for gethostbyname() */
 #include <netdb.h>
 #endif
@@ -78,7 +46,7 @@
 /* for RFC 2181 constants */
 #include "rfc2181.h"
 
-/* for xstrncpy() - may need breakign out of there. */
+/* for xstrncpy() - may need breaking out of there. */
 #include "util.h"
 
 /**
index 2cee8433b823f9f7ab0eeaf830165d4cc653630c..e856c2e795eecb0115d3b34a268075b8257f3ce0 100644 (file)
@@ -41,9 +41,6 @@
 #if HAVE_STDIO_H
 #include <stdio.h>
 #endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
 #if HAVE_STRING_H
 #include <string.h>
 #endif
index f32e2c8db73340f4ac08473b75d328b258d4cf03..91d88dedc5fd7343c90b734c7a70e88d219372fd 100644 (file)
@@ -2,21 +2,14 @@
 #include "profiling.h"
 #include "xusleep.h"
 
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
 #if HAVE_SYS_TIME_H
 #include <sys/time.h>
 #endif
-#if HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#endif
-
 
-/*
+/**
  * xusleep, as usleep but accepts longer pauses
  */
 int
index 25ecbb349efc8811cd9e703a7a2c5b9641f50213..6008e7b9f091078785539b9ff8f7fae49171cee5 100644 (file)
@@ -40,7 +40,6 @@
 #include "DiskThreads.h"
 
 #include       <stdio.h>
-#include       <sys/types.h>
 #include       <sys/stat.h>
 #include       <fcntl.h>
 #include       <pthread.h>
index a699361efad5439d399bd13a1b462adaef919715..0440a92a7a48747646e84f3e0dabdef34384181d 100644 (file)
 
 #include "squid.h"
 #include "squid_windows.h"
+#include "CommIO.h"
 #include "DiskThreads.h"
+#include "SquidTime.h"
+#include "Store.h"
 
 #include       <stdio.h>
-#include       <sys/types.h>
 #include       <sys/stat.h>
 #include       <fcntl.h>
 #include       <errno.h>
 #include       <dirent.h>
 #include       <signal.h>
-#include "CommIO.h"
-#include "SquidTime.h"
-#include "Store.h"
 
 #define RIDICULOUS_LENGTH      4096
 
index d112d59ce22666882f0d2e8edc7ef51d55940268..2cf4ec5613c357675be6487863fd2095c0f66b6e 100644 (file)
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
 #if HAVE_STDIO_H
 #include <stdio.h>
 #endif
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
 #if HAVE_CTYPE_H
 #include <ctype.h>
 #endif
@@ -64,8 +58,7 @@
 #if HAVE_MEMORY_H
 #include <memory.h>
 #endif
-#if HAVE_NETDB_H && !defined(_SQUID_NETDB_H_)  /* protect NEXTSTEP */
-#define _SQUID_NETDB_H_
+#if HAVE_NETDB_H
 #include <netdb.h>
 #endif
 #if HAVE_PWD_H
 #ifdef HAVE_CRYPT_H
 #include <crypt.h>
 #endif
-#if HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#endif
 #if HAVE_GETOPT_H
 #include <getopt.h>
 #endif
index 101d563f27ae1c81b878dedd2d5f4da6cfe339a9..83b20da66523a3bbb79c99dbaca964b9b7793024 100644 (file)
@@ -37,9 +37,6 @@
 #include "config.h"
 #include "Icmp.h"
 
-#if HAVE_NETINET_IN_SYSTM_H
-#include <netinet/in_systm.h>
-#endif
 #if HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
index 7ba504c7c583206e4b679cf650dd0abf6be14b3a..19ad075e183eca5bb3786771260d9d6e7f7299a0 100644 (file)
 
 #include "config.h"
 
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-
 /**
  * Squid pinger Configuration settings
  *
index 5e17d8404295d9ef304aed01bc68e9ef3766bccb..1aa2f047be326631e22599917ed8551a7cc2bad0 100644 (file)
 #if HAVE_ASSERT_H
 #include <assert.h>
 #endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
 #if HAVE_STRING_H
 #include <string.h>
 #endif
 #if HAVE_ARPA_INET_H
-#include <arpa/inet.h>  /* inet_ntoa() */
+/* for inet_ntoa() */
+#include <arpa/inet.h>
 #endif
 
 #ifdef INET6
index acb74ab67d80a5e55b6022cc3e1969b8c0147402..d631b108c825fba54a060f338286044efaf027e6 100644 (file)
 #ifdef _SQUID_MSWIN_
 #include <ws2tcpip.h>
 #endif
-#if HAVE_NETDB_H && !defined(_SQUID_NETDB_H_)   /* protect NEXTSTEP */
-#define _SQUID_NETDB_H_
-#ifdef _SQUID_NEXT_
-#include <netinet/in_systm.h>
-#endif
+#if HAVE_NETDB_H
 #include <netdb.h>
 #endif
 
index 385e1c90d442ff4fb67ae787485bece60f386078..651a988ac21b27c6729cfd6ce04192c848b05a8b 100644 (file)
@@ -73,7 +73,6 @@
 #endif /* IPF_TRANSPARENT required headers */
 
 #if PF_TRANSPARENT
-#include <sys/types.h>
 #include <sys/socket.h>
 #include <sys/ioctl.h>
 #include <sys/fcntl.h>
@@ -88,7 +87,6 @@
 #endif /* PF_TRANSPARENT required headers */
 
 #if LINUX_NETFILTER
-#include <linux/types.h>
 #include <linux/netfilter_ipv4.h>
 #endif
 
index 29819b4ef083b9077fee4f2c126f72b14edac468..2ba3c407f3acb42dcab76f54356f9d8b79e52f4c 100644 (file)
@@ -1,4 +1,3 @@
-
 /*
  * $Id$
  *
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
  *
  */
+#include "config.h"
 
 #include <stdio.h>
 #include <fcntl.h>
-#include <stdlib.h>
 #include <string.h>
-#include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
@@ -45,8 +43,6 @@
 #include <unistd.h>
 #include <signal.h>
 
-#include "config.h"
-
 #define RECV_BUF_SIZE 8192
 
 /*
index dea358caa50eb2955f424a345d92998ec5256b46..7c6a3ab576ded87107d9067c8ff752ded1267fb9 100644 (file)
@@ -43,15 +43,9 @@ using namespace Squid;
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
 #if HAVE_STDIO_H
 #include <stdio.h>
 #endif
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
 #if HAVE_CTYPE_H
 #include <ctype.h>
 #endif
@@ -72,11 +66,7 @@ using namespace Squid;
 #if HAVE_MEMORY_H
 #include <memory.h>
 #endif
-#if HAVE_NETDB_H && !defined(_SQUID_NETDB_H_)  /* protect NEXTSTEP */
-#define _SQUID_NETDB_H_
-#ifdef _SQUID_NEXT_
-#include <netinet/in_systm.h>
-#endif
+#if HAVE_NETDB_H
 #include <netdb.h>
 #endif
 #if HAVE_PATHS_H
@@ -133,9 +123,6 @@ using namespace Squid;
 #if HAVE_BSTRING_H
 #include <bstring.h>
 #endif
-#if HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#endif
 #if HAVE_GETOPT_H
 #include <getopt.h>
 #endif
index ca9a72274a56f43f3da815698cd0afa778afc8fe..fccd83cb0c764f08d730e4e392b4379d766497d4 100644 (file)
@@ -35,9 +35,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
 #if HAVE_STDIO_H
 #include <stdio.h>
 #endif
 #ifdef HAVE_BSTRING_H
 #include <bstring.h>
 #endif
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#if HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#endif
 #if HAVE_SIGNAL_H
 #include <signal.h>
 #endif
index aff3fbfc04ca396abd1fe5bede555a739bbe0cbb..e6acd1a02d76a89f9e5b547867a9563181549094 100644 (file)
@@ -36,9 +36,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
 #if HAVE_STDIO_H
 #include <stdio.h>
 #endif
 #ifdef HAVE_STRINGS_H
 #include <strings.h>
 #endif
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#if HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#endif
 #if HAVE_SIGNAL_H
 #include <signal.h>
 #endif
index d3ac5b21a2687437b0b83016b2e0f537e8544cbe..cb15886fb18df0e620c58da38023bf89217d3502 100644 (file)
@@ -34,9 +34,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
 #if HAVE_STDIO_H
 #include <stdio.h>
 #endif
 #ifdef HAVE_STRINGS_H
 #include <strings.h>
 #endif
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#if HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#endif
 #if HAVE_SIGNAL_H
 #include <signal.h>
 #endif
index 9a0efc49eb15c28f3a3770243dc94892d55d4824..a4d0b715232357456a2402e25cfdc6d57c8df0c6 100644 (file)
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
 #if HAVE_STDIO_H
 #include <stdio.h>
 #endif
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
 #if HAVE_CTYPE_H
 #include <ctype.h>
 #endif
@@ -65,8 +59,7 @@
 #if HAVE_MEMORY_H
 #include <memory.h>
 #endif
-#if HAVE_NETDB_H && !defined(_SQUID_NETDB_H_)  /* protect NEXTSTEP */
-#define _SQUID_NETDB_H_
+#if HAVE_NETDB_H
 #include <netdb.h>
 #endif
 #if HAVE_PWD_H
 #if HAVE_CRYPT_H
 #include <crypt.h>
 #endif
-#if HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#endif
 #if HAVE_FNMATCH_H
 extern "C" {
 #include <fnmatch.h>
index 25325c6f7d71f636e9c79d8bd4676ae43294d9be..a7fe5005b69bd5c9f244eae59c2ea032af099250 100644 (file)
@@ -46,12 +46,6 @@ using namespace Squid;
 #if HAVE_STDIO_H
 #include <stdio.h>
 #endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
 #if HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
@@ -61,8 +55,7 @@ using namespace Squid;
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#if HAVE_NETDB_H && !defined(_SQUID_NETDB_H_)  /* protect NEXTSTEP */
-#define _SQUID_NETDB_H_
+#if HAVE_NETDB_H
 #include <netdb.h>
 #endif
 #if HAVE_SIGNAL_H
@@ -84,8 +77,6 @@ using namespace Squid;
 #include <getopt.h>
 #endif
 
-#include "squid_types.h"
-
 #include "util.h"
 #include "ip/IpAddress.h"