From: Amos Jeffries Date: Sat, 20 Mar 2010 07:09:43 +0000 (-0600) Subject: Compat: Shuffle type portability definitions and includes into libcompat X-Git-Tag: SQUID_3_2_0_1~349 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=489520a9e573ce88df00c139348a23a04f01e348;p=thirdparty%2Fsquid.git Compat: Shuffle type portability definitions and includes into libcompat --- diff --git a/acinclude.m4 b/acinclude.m4 index 5d262fc910..41fc0c77c4 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -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 #endif -#if STDC_HEADERS +#if HAVE_LINUX_TYPES_H +#include +#endif +#if HAVE_STDLIB_H #include +#endif +#if HAVE_STDDEF_H #include #endif #if HAVE_INTTYPES_H diff --git a/compat/GnuRegex.h b/compat/GnuRegex.h index b805f99f6a..6bcb99ea16 100644 --- a/compat/GnuRegex.h +++ b/compat/GnuRegex.h @@ -48,13 +48,6 @@ extern "C" { /* POSIX says that must be included (by the caller) before * . */ -#ifdef VMS - /* VMS doesn't have `size_t' in , even though POSIX says it - * should be there. */ -#include -#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 diff --git a/compat/Makefile.am b/compat/Makefile.am index 4d4f697c29..77c1fc31dc 100644 --- a/compat/Makefile.am +++ b/compat/Makefile.am @@ -19,6 +19,7 @@ libcompat_la_SOURCES = \ fdsetsize.h \ osdetect.h \ stdvarargs.h \ + types.h \ valgrind.h \ \ os/aix.h \ diff --git a/compat/assert.cc b/compat/assert.cc index b1e06e3315..65bcbbb0f5 100644 --- a/compat/assert.cc +++ b/compat/assert.cc @@ -36,9 +36,6 @@ #if HAVE_STDIO_H #include #endif -#if HAVE_STDLIB_H -#include -#endif #if 0 #include "compat/assert.h" diff --git a/compat/compat.h b/compat/compat.h index 1600291711..a4d20698df 100644 --- a/compat/compat.h +++ b/compat/compat.h @@ -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. */ diff --git a/compat/os/mswin.h b/compat/os/mswin.h index 2c3944ab13..669ee7e0d1 100644 --- a/compat/os/mswin.h +++ b/compat/os/mswin.h @@ -63,21 +63,10 @@ #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 #include #include #if defined(_MSC_VER) /* Microsoft C Compiler ONLY */ @@ -245,7 +233,6 @@ struct timezone { #pragma warning (pop) #endif #include -#include typedef char * caddr_t; diff --git a/compat/os/next.h b/compat/os/next.h index c275574b76..c023d95798 100644 --- a/compat/os/next.h +++ b/compat/os/next.h @@ -33,21 +33,18 @@ /* * 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 #if HAVE_NETDB_H #include #endif #undef HAVE_NETDB_H #define HAVE_NETDB_H 0 - #endif /* _SQUID_NEXT_ */ #endif /* SQUID_OS_NEXT_H */ diff --git a/include/squid_types.h b/compat/types.h similarity index 59% rename from include/squid_types.h rename to compat/types.h index 0b4a60529e..eb3eb95bd3 100644 --- a/include/squid_types.h +++ b/compat/types.h @@ -1,6 +1,8 @@ +#ifndef SQUID_CONFIG_H +#include "config.h" +#endif + /* - * $Id$ - * * * * * * * * * Legal stuff * * * * * * * * * (C) 2000 Francesco Chemolli @@ -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. */ @@ -63,8 +65,10 @@ #if HAVE_LINUX_TYPES_H #include #endif -#if STDC_HEADERS +#if HAVE_STDLIB_H #include +#endif +#if HAVE_STDDEF_H #include #endif #if HAVE_INTTYPES_H @@ -81,6 +85,12 @@ #include #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 @@ -106,4 +116,128 @@ #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 */ diff --git a/helpers/log_daemon/file/log_file_daemon.cc b/helpers/log_daemon/file/log_file_daemon.cc index 3e86312385..24a7af31c8 100644 --- a/helpers/log_daemon/file/log_file_daemon.cc +++ b/helpers/log_daemon/file/log_file_daemon.cc @@ -3,9 +3,6 @@ #if HAVE_STDIO_H #include #endif -#if HAVE_STDLIB_H -#include -#endif #if HAVE_UNISTD_H #include #endif diff --git a/include/config.h b/include/config.h index 215a22a052..5a5d751bc2 100644 --- a/include/config.h +++ b/include/config.h @@ -63,122 +63,6 @@ #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 diff --git a/include/md5.h b/include/md5.h index 3f82a424ea..bd2ae36304 100644 --- a/include/md5.h +++ b/include/md5.h @@ -34,8 +34,6 @@ * */ -#include "squid_types.h" - typedef struct SquidMD5Context { uint32_t buf[4]; uint32_t bytes[2]; diff --git a/include/squid_endian.h b/include/squid_endian.h index e0e92c70a1..8c05237cf2 100644 --- a/include/squid_endian.h +++ b/include/squid_endian.h @@ -56,7 +56,6 @@ */ #include "config.h" -#include "squid_types.h" /* * Some systems define bswap_16() and bswap_32() in diff --git a/lib/getfullhostname.c b/lib/getfullhostname.c index b7480b2673..5348ad7ec1 100644 --- a/lib/getfullhostname.c +++ b/lib/getfullhostname.c @@ -33,44 +33,12 @@ */ #include "getfullhostname.h" -#if 0 /* we SHOULD NOT need ALL these here. */ -#if HAVE_LIBC_H -#include -#endif -#if HAVE_STDIO_H -#include -#endif -#if HAVE_STDLIB_H -#include -#endif -#if HAVE_STRING_H -#include -#endif -#if HAVE_SYS_PARAM_H -#include -#endif -#if HAVE_SYS_TYPES_H -#include -#endif -#if HAVE_SYS_SOCKET_H -#include -#endif -#if HAVE_NETINET_IN_H -#include -#endif -#if HAVE_ARPA_INET_H -#include -#endif - -#endif /* 0 */ - #if HAVE_UNISTD_H /* for gethostname() function */ #include #endif -#if HAVE_NETDB_H && !defined(_SQUID_NETDB_H_) /* protect on NEXTSTEP */ -#define _SQUID_NETDB_H_ +#if HAVE_NETDB_H /* for gethostbyname() */ #include #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" /** diff --git a/lib/util.c b/lib/util.c index 2cee8433b8..e856c2e795 100644 --- a/lib/util.c +++ b/lib/util.c @@ -41,9 +41,6 @@ #if HAVE_STDIO_H #include #endif -#if HAVE_STDLIB_H -#include -#endif #if HAVE_STRING_H #include #endif diff --git a/lib/xusleep.c b/lib/xusleep.c index f32e2c8db7..91d88dedc5 100644 --- a/lib/xusleep.c +++ b/lib/xusleep.c @@ -2,21 +2,14 @@ #include "profiling.h" #include "xusleep.h" -#if HAVE_STDLIB_H -#include -#endif #if HAVE_UNISTD_H #include #endif #if HAVE_SYS_TIME_H #include #endif -#if HAVE_SYS_SELECT_H -#include -#endif - -/* +/** * xusleep, as usleep but accepts longer pauses */ int diff --git a/src/DiskIO/DiskThreads/aiops.cc b/src/DiskIO/DiskThreads/aiops.cc index 25ecbb349e..6008e7b9f0 100644 --- a/src/DiskIO/DiskThreads/aiops.cc +++ b/src/DiskIO/DiskThreads/aiops.cc @@ -40,7 +40,6 @@ #include "DiskThreads.h" #include -#include #include #include #include diff --git a/src/DiskIO/DiskThreads/aiops_win32.cc b/src/DiskIO/DiskThreads/aiops_win32.cc index a699361efa..0440a92a7a 100644 --- a/src/DiskIO/DiskThreads/aiops_win32.cc +++ b/src/DiskIO/DiskThreads/aiops_win32.cc @@ -36,18 +36,17 @@ #include "squid.h" #include "squid_windows.h" +#include "CommIO.h" #include "DiskThreads.h" +#include "SquidTime.h" +#include "Store.h" #include -#include #include #include #include #include #include -#include "CommIO.h" -#include "SquidTime.h" -#include "Store.h" #define RIDICULOUS_LENGTH 4096 diff --git a/src/dnsserver.cc b/src/dnsserver.cc index d112d59ce2..2cf4ec5613 100644 --- a/src/dnsserver.cc +++ b/src/dnsserver.cc @@ -35,15 +35,9 @@ #if HAVE_UNISTD_H #include #endif -#if HAVE_STDLIB_H -#include -#endif #if HAVE_STDIO_H #include #endif -#if HAVE_SYS_TYPES_H -#include -#endif #if HAVE_CTYPE_H #include #endif @@ -64,8 +58,7 @@ #if HAVE_MEMORY_H #include #endif -#if HAVE_NETDB_H && !defined(_SQUID_NETDB_H_) /* protect NEXTSTEP */ -#define _SQUID_NETDB_H_ +#if HAVE_NETDB_H #include #endif #if HAVE_PWD_H @@ -122,9 +115,6 @@ #ifdef HAVE_CRYPT_H #include #endif -#if HAVE_SYS_SELECT_H -#include -#endif #if HAVE_GETOPT_H #include #endif diff --git a/src/icmp/Icmp4.h b/src/icmp/Icmp4.h index 101d563f27..83b20da665 100644 --- a/src/icmp/Icmp4.h +++ b/src/icmp/Icmp4.h @@ -37,9 +37,6 @@ #include "config.h" #include "Icmp.h" -#if HAVE_NETINET_IN_SYSTM_H -#include -#endif #if HAVE_NETINET_IN_H #include #endif diff --git a/src/icmp/IcmpConfig.h b/src/icmp/IcmpConfig.h index 7ba504c7c5..19ad075e18 100644 --- a/src/icmp/IcmpConfig.h +++ b/src/icmp/IcmpConfig.h @@ -39,10 +39,6 @@ #include "config.h" -#if HAVE_STDLIB_H -#include -#endif - /** * Squid pinger Configuration settings * diff --git a/src/ip/IpAddress.cc b/src/ip/IpAddress.cc index 5e17d84042..1aa2f047be 100644 --- a/src/ip/IpAddress.cc +++ b/src/ip/IpAddress.cc @@ -43,14 +43,12 @@ #if HAVE_ASSERT_H #include #endif -#if HAVE_STDLIB_H -#include -#endif #if HAVE_STRING_H #include #endif #if HAVE_ARPA_INET_H -#include /* inet_ntoa() */ +/* for inet_ntoa() */ +#include #endif #ifdef INET6 diff --git a/src/ip/IpAddress.h b/src/ip/IpAddress.h index acb74ab67d..d631b108c8 100644 --- a/src/ip/IpAddress.h +++ b/src/ip/IpAddress.h @@ -51,11 +51,7 @@ #ifdef _SQUID_MSWIN_ #include #endif -#if HAVE_NETDB_H && !defined(_SQUID_NETDB_H_) /* protect NEXTSTEP */ -#define _SQUID_NETDB_H_ -#ifdef _SQUID_NEXT_ -#include -#endif +#if HAVE_NETDB_H #include #endif diff --git a/src/ip/IpIntercept.cc b/src/ip/IpIntercept.cc index 385e1c90d4..651a988ac2 100644 --- a/src/ip/IpIntercept.cc +++ b/src/ip/IpIntercept.cc @@ -73,7 +73,6 @@ #endif /* IPF_TRANSPARENT required headers */ #if PF_TRANSPARENT -#include #include #include #include @@ -88,7 +87,6 @@ #endif /* PF_TRANSPARENT required headers */ #if LINUX_NETFILTER -#include #include #endif diff --git a/src/recv-announce.cc b/src/recv-announce.cc index 29819b4ef0..2ba3c407f3 100644 --- a/src/recv-announce.cc +++ b/src/recv-announce.cc @@ -1,4 +1,3 @@ - /* * $Id$ * @@ -32,12 +31,11 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. * */ +#include "config.h" #include #include -#include #include -#include #include #include #include @@ -45,8 +43,6 @@ #include #include -#include "config.h" - #define RECV_BUF_SIZE 8192 /* diff --git a/src/squid.h b/src/squid.h index dea358caa5..7c6a3ab576 100644 --- a/src/squid.h +++ b/src/squid.h @@ -43,15 +43,9 @@ using namespace Squid; #if HAVE_UNISTD_H #include #endif -#if HAVE_STDLIB_H -#include -#endif #if HAVE_STDIO_H #include #endif -#if HAVE_SYS_TYPES_H -#include -#endif #if HAVE_CTYPE_H #include #endif @@ -72,11 +66,7 @@ using namespace Squid; #if HAVE_MEMORY_H #include #endif -#if HAVE_NETDB_H && !defined(_SQUID_NETDB_H_) /* protect NEXTSTEP */ -#define _SQUID_NETDB_H_ -#ifdef _SQUID_NEXT_ -#include -#endif +#if HAVE_NETDB_H #include #endif #if HAVE_PATHS_H @@ -133,9 +123,6 @@ using namespace Squid; #if HAVE_BSTRING_H #include #endif -#if HAVE_SYS_SELECT_H -#include -#endif #if HAVE_GETOPT_H #include #endif diff --git a/test-suite/pconn-banger.c b/test-suite/pconn-banger.c index ca9a72274a..fccd83cb0c 100644 --- a/test-suite/pconn-banger.c +++ b/test-suite/pconn-banger.c @@ -35,9 +35,6 @@ #if HAVE_UNISTD_H #include #endif -#if HAVE_STDLIB_H -#include -#endif #if HAVE_STDIO_H #include #endif @@ -53,12 +50,6 @@ #ifdef HAVE_BSTRING_H #include #endif -#if HAVE_SYS_TYPES_H -#include -#endif -#if HAVE_SYS_SELECT_H -#include -#endif #if HAVE_SIGNAL_H #include #endif diff --git a/test-suite/tcp-banger2.c b/test-suite/tcp-banger2.c index aff3fbfc04..e6acd1a02d 100644 --- a/test-suite/tcp-banger2.c +++ b/test-suite/tcp-banger2.c @@ -36,9 +36,6 @@ #if HAVE_UNISTD_H #include #endif -#if HAVE_STDLIB_H -#include -#endif #if HAVE_STDIO_H #include #endif @@ -51,12 +48,6 @@ #ifdef HAVE_STRINGS_H #include #endif -#if HAVE_SYS_TYPES_H -#include -#endif -#if HAVE_SYS_SELECT_H -#include -#endif #if HAVE_SIGNAL_H #include #endif diff --git a/test-suite/tcp-banger3.c b/test-suite/tcp-banger3.c index d3ac5b21a2..cb15886fb1 100644 --- a/test-suite/tcp-banger3.c +++ b/test-suite/tcp-banger3.c @@ -34,9 +34,6 @@ #if HAVE_UNISTD_H #include #endif -#if HAVE_STDLIB_H -#include -#endif #if HAVE_STDIO_H #include #endif @@ -49,12 +46,6 @@ #ifdef HAVE_STRINGS_H #include #endif -#if HAVE_SYS_TYPES_H -#include -#endif -#if HAVE_SYS_SELECT_H -#include -#endif #if HAVE_SIGNAL_H #include #endif diff --git a/tools/cachemgr.cc b/tools/cachemgr.cc index 9a0efc49eb..a4d0b71523 100644 --- a/tools/cachemgr.cc +++ b/tools/cachemgr.cc @@ -36,15 +36,9 @@ #if HAVE_UNISTD_H #include #endif -#if HAVE_STDLIB_H -#include -#endif #if HAVE_STDIO_H #include #endif -#if HAVE_SYS_TYPES_H -#include -#endif #if HAVE_CTYPE_H #include #endif @@ -65,8 +59,7 @@ #if HAVE_MEMORY_H #include #endif -#if HAVE_NETDB_H && !defined(_SQUID_NETDB_H_) /* protect NEXTSTEP */ -#define _SQUID_NETDB_H_ +#if HAVE_NETDB_H #include #endif #if HAVE_PWD_H @@ -120,9 +113,6 @@ #if HAVE_CRYPT_H #include #endif -#if HAVE_SYS_SELECT_H -#include -#endif #if HAVE_FNMATCH_H extern "C" { #include diff --git a/tools/squidclient.cc b/tools/squidclient.cc index 25325c6f7d..a7fe5005b6 100644 --- a/tools/squidclient.cc +++ b/tools/squidclient.cc @@ -46,12 +46,6 @@ using namespace Squid; #if HAVE_STDIO_H #include #endif -#if HAVE_STDLIB_H -#include -#endif -#if HAVE_SYS_TYPES_H -#include -#endif #if HAVE_SYS_SOCKET_H #include #endif @@ -61,8 +55,7 @@ using namespace Squid; #if HAVE_UNISTD_H #include #endif -#if HAVE_NETDB_H && !defined(_SQUID_NETDB_H_) /* protect NEXTSTEP */ -#define _SQUID_NETDB_H_ +#if HAVE_NETDB_H #include #endif #if HAVE_SIGNAL_H @@ -84,8 +77,6 @@ using namespace Squid; #include #endif -#include "squid_types.h" - #include "util.h" #include "ip/IpAddress.h"