]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Cleanup: un-wrap C++ header includes
authorAmos Jeffries <squid3@treenet.co.nz>
Fri, 21 Feb 2014 10:46:19 +0000 (03:46 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 21 Feb 2014 10:46:19 +0000 (03:46 -0700)
Coding guideline is now that standard C++ headers are not to be
wrapped in HAVE_ macros.

* Remove HAVE_ macros for currently wrapped C++ headers.
  Includes removing autoconf checks.

* Replace C includes with C++ includes where possible

Also, <cstdio> / <stdio.h> has issues on 64-bit systems and a
portable fixed version is provided by libcompat via squid.h
It should not be included anywhere in the Squid sources.

216 files changed:
compat/compat_shared.h
compat/mswindows.cc
compat/stdio.h
compat/stdvarargs.h
compat/strnstr.cc
compat/testPreCompiler.cc
compat/xstrerror.cc
configure.ac
contrib/rredir.c
helpers/basic_auth/LDAP/basic_ldap_auth.cc
helpers/basic_auth/MSNT/allowusers.cc
helpers/basic_auth/MSNT/confload.cc
helpers/basic_auth/MSNT/denyusers.cc
helpers/basic_auth/MSNT/msntauth.cc
helpers/basic_auth/MSNT/usersfile.cc
helpers/basic_auth/NCSA/basic_ncsa_auth.cc
helpers/basic_auth/NCSA/crypt_md5.cc
helpers/basic_auth/NIS/basic_nis_auth.cc
helpers/basic_auth/NIS/nis_support.cc
helpers/basic_auth/PAM/basic_pam_auth.cc
helpers/basic_auth/RADIUS/basic_radius_auth.cc
helpers/basic_auth/RADIUS/radius-util.cc
helpers/basic_auth/SASL/basic_sasl_auth.cc
helpers/basic_auth/SMB/basic_smb_auth.cc
helpers/basic_auth/SSPI/basic_sspi_auth.cc
helpers/basic_auth/SSPI/valid.h
helpers/basic_auth/fake/fake.cc
helpers/basic_auth/getpwnam/basic_getpwnam_auth.cc
helpers/digest_auth/LDAP/digest_common.h
helpers/digest_auth/eDirectory/digest_common.h
helpers/digest_auth/file/digest_common.h
helpers/external_acl/AD_group/ext_ad_group_acl.cc
helpers/external_acl/LDAP_group/ext_ldap_group_acl.cc
helpers/external_acl/LM_group/ext_lm_group_acl.cc
helpers/external_acl/eDirectory_userip/ext_edirectory_userip_acl.cc
helpers/external_acl/file_userip/ext_file_userip_acl.cc
helpers/external_acl/kerberos_ldap_group/kerberos_ldap_group.cc
helpers/external_acl/kerberos_ldap_group/support.h
helpers/external_acl/kerberos_ldap_group/support_log.cc
helpers/external_acl/session/ext_session_acl.cc
helpers/external_acl/time_quota/ext_time_quota_acl.cc
helpers/external_acl/unix_group/check_group.cc
helpers/log_daemon/file/log_file_daemon.cc
helpers/negotiate_auth/kerberos/negotiate_kerberos.h
helpers/negotiate_auth/kerberos/negotiate_kerberos_auth.cc
helpers/negotiate_auth/kerberos/negotiate_kerberos_auth_test.cc
helpers/negotiate_auth/wrapper/negotiate_wrapper.cc
helpers/ntlm_auth/fake/ntlm_fake_auth.cc
helpers/ntlm_auth/smb_lm/ntlm_smb_lm_auth.cc
helpers/url_rewrite/fake/fake.cc
include/Range.h
include/util.h
lib/MemPool.cc
lib/MemPoolChunked.cc
lib/MemPoolMalloc.cc
lib/Splay.cc
lib/base64.c
lib/getopt.c
lib/hash.cc
lib/heap.c
lib/html_quote.c
lib/iso3307.c
lib/libTrie/test/trie-c.c
lib/libTrie/test/trie.cc
lib/malloc_trace.cc
lib/md5-test.c
lib/ntlmauth/ntlmauth.cc
lib/profiler/Profiler.cc
lib/radix.c
lib/rfc1035.c
lib/rfc1123.c
lib/rfc1738.c
lib/rfc3596.c
lib/rfcnb/std-includes.h
lib/smblib/smb-errors.c
lib/smblib/std-defines.h
lib/snmplib/asn1.c
lib/snmplib/coexistance.c
lib/snmplib/mib.c
lib/snmplib/parse.c
lib/snmplib/snmp_api.c
lib/snmplib/snmp_api_error.c
lib/snmplib/snmp_error.c
lib/snmplib/snmp_msg.c
lib/snmplib/snmp_pdu.c
lib/snmplib/snmp_vars.c
lib/snmplib/snmplib_debug.c
lib/tests/testRFC1035.cc
lib/tests/testRFC1738.cc
lib/util.c
src/ConfigParser.h
src/CpuAffinitySet.cc
src/Debug.h
src/DiskIO/DiskDaemon/diskd.cc
src/DiskIO/DiskThreads/aiops.cc
src/DiskIO/DiskThreads/aiops_win32.cc
src/ETag.cc
src/FadingCounter.cc
src/Generic.h
src/HelperChildConfig.cc
src/HelperReply.h
src/HttpHdrCc.cc
src/HttpHdrSc.cc
src/HttpHeaderTools.h
src/Mem.h
src/MemBlob.cc
src/Notes.h
src/Packer.h
src/SBuf.cc
src/SBuf.h
src/SBufStream.h
src/SquidString.h
src/SquidTime.h
src/StatHist.cc
src/Store.h
src/StoreEntryStream.h
src/String.cc
src/Transients.cc
src/acl/Acl.h
src/acl/Gadgets.h
src/acl/HttpStatus.cc
src/adaptation/ecap/ServiceRep.cc
src/anyp/PortCfg.cc
src/anyp/ProtocolType.h
src/anyp/ProtocolVersion.h
src/anyp/UriScheme.h
src/base/LruMap.h
src/base/RefCount.h
src/cache_cf.cc
src/carp.cc
src/cbdata.cc
src/client_side.cc
src/comm.cc
src/comm/Connection.h
src/comm/ModDevPoll.cc
src/comm/Write.cc
src/esi/Expression.cc
src/eui/Eui48.h
src/eui/Eui64.h
src/event.cc
src/fatal.cc
src/fs/ufs/RebuildState.cc
src/fs/ufs/UFSSwapDir.cc
src/fs/ufs/UFSSwapLogParser.h
src/globals.h
src/icmp/pinger.cc
src/int.cc
src/ip/Address.cc
src/ip/Address.h
src/ip/Intercept.cc
src/ip/QosConfig.h
src/ip/testAddress.cc
src/ipc/Kid.cc
src/ipc/StartListening.h
src/ipc/TypedMsgHdr.cc
src/ipc/mem/Page.cc
src/ipc/mem/Page.h
src/log/TcpLogger.h
src/mem.cc
src/peer_sourcehash.cc
src/peer_userhash.cc
src/recv-announce.cc
src/repl/heap/store_heap_replacement.cc
src/snmp/Pdu.cc
src/snmp/Var.cc
src/ssl/ErrorDetail.cc
src/ssl/ErrorDetailManager.h
src/ssl/certificate_db.cc
src/ssl/certificate_db.h
src/ssl/context_storage.cc
src/ssl/context_storage.h
src/ssl/crtd_message.cc
src/ssl/crtd_message.h
src/ssl/gadgets.h
src/ssl/ssl_crtd.cc
src/store.cc
src/store_digest.cc
src/store_dir.cc
src/tests/SBufFindTest.h
src/tests/stub_HelperChildConfig.cc
src/tests/stub_debug.cc
src/tests/stub_store_rebuild.cc
src/tests/testACLMaxUserIP.cc
src/tests/testAuth.cc
src/tests/testBoilerplate.cc
src/tests/testDiskIO.cc
src/tests/testHttpRequestMethod.cc
src/tests/testRock.cc
src/tests/testStoreEntryStream.cc
src/tests/testURL.cc
src/tests/testUfs.cc
src/tests/testUriScheme.cc
src/tunnel.cc
src/ufsdump.cc
test-suite/MemPoolTest.cc
test-suite/VirtualDeleteOperator.cc
test-suite/hash.c
test-suite/mem_hdr_test.cc
test-suite/mem_node_test.cc
test-suite/membanger.c
test-suite/pconn-banger.c
test-suite/splay.cc
test-suite/syntheticoperators.cc
test-suite/tcp-banger2.c
test-suite/tcp-banger3.c
tools/cachemgr.cc
tools/purge/conffile.cc
tools/purge/conffile.hh
tools/purge/convert.cc
tools/purge/copyout.cc
tools/purge/purge.cc
tools/purge/signal.cc
tools/purge/signal.hh
tools/purge/socket.cc
tools/purge/squid-tlv.cc
tools/squidclient/squidclient.cc

index a24043b31059694e308bc8279ddfc79034fa5485..39b16cf976c28a0351682ed6901e989fcfa8a569 100644 (file)
@@ -171,9 +171,13 @@ max(A const & lhs, A const & rhs)
  * Signalling flags are apparently not always provided.
  * TODO find out if these can be moved into specific OS portability files.
  */
+#if defined(__cplusplus)
+#include <csignal>
+#else
 #if HAVE_SIGNAL_H
 #include <signal.h>
 #endif
+#endif
 #ifndef SA_RESTART
 #define SA_RESTART 0
 #endif
index 3d9833394c9d604cb6513e44a36237d78ab503b9..d9359b595dcc9bf820b4c09f8d571840d142f1a2 100644 (file)
 #define sys_nerr _sys_nerr
 
 #undef assert
-#include <assert.h>
-#include <stdio.h>
+#include <cassert>
+#include <cstring>
 #include <fcntl.h>
-#include <string.h>
 #include <sys/timeb.h>
 #if HAVE_WIN32_PSAPI
 #include <psapi.h>
index a474d21f5531dcd1bc6c099e76584e0476762d2d..c111cc762ce216e5c04f3f389898c1207c33b68c 100644 (file)
@@ -15,7 +15,7 @@
 
 // Import the stdio.h definitions first to do the state setup
 #if HAVE_STDIO_H
-#include<stdio.h>
+#include <stdio.h>
 #endif
 
 // Check for the buggy case
@@ -46,7 +46,7 @@ inline FILE * tmpfile(void) { return tmpfile64(); }
 #endif /* __USE_FILE_OFFSET64 && !__REDIRECT */
 
 // Finally import the <cstdio> stuff we actually use
-#if HAVE_CSTDIO && defined(__cplusplus)
+#if defined(__cplusplus)
 #include <cstdio>
 #endif
 
index dc8f6c182b8d8b3e009778af19f00a46969ea939..c890c74d3f0417df7a7d5679eae586cd93de2075 100644 (file)
@@ -6,7 +6,7 @@
  * We provide a clean set of wrappers for the various operations
  * Depending on what is available and needed.
  */
-#if HAVE_CSTDARG && defined(__cplusplus)
+#if defined(__cplusplus)
 #include <cstdarg>
 
 #else
@@ -18,7 +18,7 @@
 #define VA_SHIFT(v,t) ;         /* no-op for ANSI */
 #define VA_END va_end(ap)
 
-#else
+#else /* !HAVE_STDARG_H */
 #if HAVE_VARARGS_H
 #include <varargs.h>
 #undef HAVE_STDARGS
@@ -27,7 +27,7 @@
 #define VA_SHIFT(v,t) v = va_arg(ap,t)
 #define VA_END va_end(ap)
 
-#else
+#else /* !HAVE_VARARGS_H*/
 #error XX **NO VARARGS ** XX
 #endif /* HAVE_VARARGS_H */
 #endif /* HAVE_STDARG_H */
index 3551a3df723002633789fae20888f4b6e5c0189b..779f5de08d54a816ac263d3cbee3e64c7a4a83b9 100644 (file)
@@ -59,9 +59,7 @@
 #if HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
+#include <cstring>
 
 /**
  * Find the first occurrence of find in s, where the search is limited to the
index d131a12814ab59a002f9408959731d5b106d2d77..35aa00ebd5ca9234c4949b315a3021e133b633ba 100644 (file)
@@ -1,9 +1,7 @@
 #define SQUID_UNIT_TEST 1
 #include "squid.h"
 
-#if HAVE_ASSERT_H
-#include <assert.h>
-#endif
+#include <cassert>
 
 #include "testPreCompiler.h"
 
index 0db14307cce18a23fb8b8de71c7dddd493c83b16..f7752658ce5b3369694a413d6ce54d9be4668362 100644 (file)
@@ -1,9 +1,7 @@
 #include "squid.h"
 #include "compat/xstrerror.h"
 
-#if HAVE_STRING_H
-#include <string.h>
-#endif
+#include <cstring>
 
 #if _SQUID_WINDOWS_
 static struct _wsaerrtext {
index 15687a4eb55107c18261d20f4ed37ac2ec97a204..33180cb9808f5db9a9bf815d454b2681dc2bd9de 100644 (file)
@@ -2161,18 +2161,11 @@ AC_HEADER_DIRENT
 AC_HEADER_STDC
 
 AC_CHECK_HEADERS( \
-  algorithm \
   arpa/inet.h \
   arpa/nameser.h \
   assert.h \
   bstring.h \
-  cassert \
   crypt.h \
-  cstdarg \
-  cstdio \
-  cstdlib \
-  cstring \
-  list \
   ctype.h \
   errno.h \
   execinfo.h \
@@ -2182,11 +2175,6 @@ AC_CHECK_HEADERS( \
   glob.h \
   gnumalloc.h \
   grp.h \
-  iosfwd \
-  iomanip \
-  iostream \
-  fstream \
-  climits \
   ip_compat.h \
   ip_fil_compat.h \
   ip_fil.h \
@@ -2195,16 +2183,13 @@ AC_CHECK_HEADERS( \
   lber.h \
   ldap.h \
   libc.h \
-  limits \
   limits.h \
   linux/posix_types.h \
   linux/types.h \
   machine/byte_swap.h \
   malloc.h \
-  map \
   math.h \
   memory.h \
-  memory \
   mount.h \
   netdb.h \
   netinet/in.h \
@@ -2218,7 +2203,6 @@ AC_CHECK_HEADERS( \
   netinet/tcp.h \
   openssl/engine.h \
   openssl/txt_db.h \
-  ostream \
   paths.h \
   poll.h \
   pwd.h \
@@ -2227,14 +2211,11 @@ AC_CHECK_HEADERS( \
   sched.h \
   siginfo.h \
   signal.h \
-  sstream \
   stdarg.h \
   stdbool.h \
   stddef.h \
-  stdexcept \
   stdio.h \
   stdlib.h \
-  string \
   string.h \
   strings.h \
   sys/bitypes.h \
index 9dfcc855f1a3e0f05450b9f241e321992f05895e..4017191fc3367eed5ab322695b54f71eb0f7d88a 100644 (file)
@@ -35,7 +35,6 @@
  * - initial version (Richard Huveneers <Richard.Huveneers@hekkihek.hacom.nl>)
  */
 
-#include <stdio.h>
 #include <unistd.h>
 #include <string.h>
 #include <ctype.h>
index c580df076c0aca9b35655b6fa75e5b3adcaaa801..0b3fa13034e066ed91db4574d11c4b981acc388a 100644 (file)
@@ -89,9 +89,8 @@
 #include "rfc1738.h"
 #include "util.h"
 
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
+#include <cctype>
+#include <cstring>
 
 #if _SQUID_WINDOWS_ && !_SQUID_CYGWIN_
 #define snprintf _snprintf
index 32f09a4ca88edd9a1d06160e88edec7641943d11..b7bfab4e263603e08023cc2c708e204e2f2fb938 100644 (file)
  * The code originated from denyusers.c.
  */
 
-#include <stdlib.h>
+#include "msntauth.h"
+#include "usersfile.h"
+
+#include <cstdlib>
+#include <cstring>
 #include <unistd.h>
 #include <sys/types.h>
 #include <sys/param.h>
-#include <string.h>
-#include "msntauth.h"
-#include "usersfile.h"
 
 static usersfile AllowUsers;
 static int init = 0;
index 7a0e1f04df0f626e4e8813304420baec3c99bc18..cfcb1961f277a34b1480f7be2e6b7441fb576b09 100644 (file)
 /* Squid provides a number of portability overrides */
 #include "squid.h"
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include <cassert>
+#include <cerrno>
+#include <cstdlib>
+#include <cstring>
 #include <syslog.h>
-#include <errno.h>
 #include <sys/param.h>
 #include <netdb.h>
-#include <assert.h>
 
 #include "msntauth.h"
 #include "valid.h"
index c1d7cc00a7fe8d4c51ee0fbaa6379c0d761d827f..2142f29528a64684937d1258bf8803a3101d31a1 100644 (file)
@@ -9,15 +9,15 @@
  * have been explicitly denied by the system administrator.
  * Routines at the bottom also use the allowed user functions.
  */
+#include "msntauth.h"
+#include "usersfile.h"
 
-#include <stdlib.h>
+#include <cstdlib>
+#include <cstring>
+#include <ctime>
 #include <unistd.h>
-#include <time.h>
 #include <sys/types.h>
 #include <sys/param.h>
-#include <string.h>
-#include "msntauth.h"
-#include "usersfile.h"
 
 static usersfile DenyUsers;
 static int init = 0;
index 49adc2bf397a026271ec3c85f2fc9ce1d0378989..95eb7fe55d4eb5feb833fb350057c4c400fd0ea6 100644 (file)
 #include "rfc1738.h"
 #include "util.h"
 
-#include <stdio.h>
-#include <signal.h>
+#include <csignal>
+#include <cstring>
 #include <syslog.h>
-#include <string.h>
 
 #include "msntauth.h"
 
index 64271d13cb283f2e6046c4431ae3d7e18a8c5065..1b08f6ce1ce38cfd3b021d42b4f6d1c71832ea80 100644 (file)
 #include "squid.h"
 #include "util.h"
 
-#include <stdio.h>
-#include <string.h>
+#include <cctype>
+#include <cerrno>
+#include <cstring>
+#include <ctime>
 #include <syslog.h>
 #include <unistd.h>
 #include <sys/stat.h>
-#include <errno.h>
-#include <time.h>
-#include <ctype.h>
 #include <sys/param.h>
 #include <fcntl.h>
 
index c65330e8da5bde86e7fc65f20576d9aa39f65477..781e21d89aab10619cd85bff3f0a4ddd4a01daab 100644 (file)
 #include "rfc1738.h"
 #include "util.h"
 
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
+#include <cerrno>
+#include <cstring>
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
 #if HAVE_SYS_STAT_H
 #include <sys/stat.h>
 #endif
 #if HAVE_CRYPT_H
 #include <crypt.h>
 #endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
 
 static hash_table *hash = NULL;
 static HASHFREE my_free;
index 5390d746f458ba47aecf2a7a662e0ad984df4e65..7583f2785dc72d8f0283434c066dc3995c07e57e 100644 (file)
  *
  */
 #include "squid.h"
-
-#if HAVE_STRING_H
-#include <string.h>
-#endif
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-
 #include "crypt_md5.h"
 #include "md5.h"
 
+#include <cstring>
+
 static unsigned char itoa64[] =        /* 0 ... 63 => ascii - 64 */
     "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
 
index 9a0068dcfdae86e8128305a4eda1df8cd2157205..3ba4b19585b6182ce23419239883b7dd0b10ed0f 100644 (file)
@@ -9,18 +9,11 @@
 #include "rfc1738.h"
 #include "util.h"
 
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
+#include <cstdlib>
+#include <cstring>
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
 #if HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
index 01657199aef78c2cb82f9ccccbc55ac40d1e4cb0..133b043dae37db5d4204125f6e59f383c69d7434 100644 (file)
@@ -3,15 +3,8 @@
  */
 #include "squid.h"
 
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
+#include <cstdlib>
+#include <cstring>
 #if HAVE_SYSLOG_H
 #include <syslog.h>
 #endif
index 86fe23eb7126997628da9fa6155dd574b2f63ea8..2d353e80cd3904f8a8be2774ddbacd3ab3af473d 100644 (file)
 #include "rfc1738.h"
 #include "util.h"
 
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#if HAVE_ASSERT_H
-#include <assert.h>
-#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
-#if HAVE_SIGNAL_H
-#include <signal.h>
-#endif
-#if HAVE_TIME_H
-#include <time.h>
-#endif
+#include <cassert>
+#include <csignal>
+#include <cstring>
+#include <ctime>
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
index 4b8f7dac4e648805f057cbd11956f06b96ee96b9..b0936622942e3fb71c43751cfffb543232851134 100644 (file)
 #include "radius-util.h"
 #include "radius.h"
 
+#include <cctype>
+#include <cerrno>
+#include <cstring>
+#include <ctime>
 #if HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
 #if _SQUID_WINDOWS_
 #include <io.h>
 #endif
-#if HAVE_CTYPE_H
-#include <ctype.h>
-#endif
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
 #if HAVE_PWD_H
 #include <pwd.h>
 #endif
-#if HAVE_TIME_H
-#include <time.h>
-#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
 #if HAVE_GETOPT_H
 #include <getopt.h>
 #endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
 
 /* AYJ: helper input buffer may be a lot larger than this used to expect... */
 #define MAXPWNAM       254
index af060c60a2fa88afb023139829e42e27ffad2e16..142ab0864c990988ff627d0b45395bb12a841813 100644 (file)
@@ -37,35 +37,24 @@ char util_sccsid[] =
     "          2.1 Copyright 1997 Cistron Internet Services B.V.";
 
 #include "squid.h"
+#include "md5.h"
+#include "radius-util.h"
 
+#include <cctype>
+#include <csignal>
+#include <ctime>
 #if HAVE_SYS_SOCKET_H
-#include       <sys/socket.h>
+#include <sys/socket.h>
 #endif
 #if HAVE_NETINET_IN_H
-#include       <netinet/in.h>
-#endif
-
-#if HAVE_STDIO_H
-#include       <stdio.h>
+#include <netinet/in.h>
 #endif
 #if HAVE_NETDB_H
-#include       <netdb.h>
+#include <netdb.h>
 #endif
 #if HAVE_PWD_H
-#include       <pwd.h>
-#endif
-#if HAVE_TIME_H
-#include       <time.h>
+#include <pwd.h>
 #endif
-#if HAVE_CTYPE_H
-#include       <ctype.h>
-#endif
-#if HAVE_SIGNAL_H
-#include       <signal.h>
-#endif
-
-#include       "md5.h"
-#include       "radius-util.h"
 
 /*
  *     Check for valid IP address in standard dot notation.
index 46ae66e610c0a2cc899c0379bcdd54a3821baab8..95e47d4b3e3a335f0a0acc1728f81eca9f476c8c 100644 (file)
 #include "rfc1738.h"
 #include "util.h"
 
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
+#include <cerrno>
+#include <cstdlib>
+#include <cstring>
 #if HAVE_SASL_SASL_H
 #include <sasl/sasl.h>
 #else
index c89dc4ea30d38d8f5a03648b01d08f3dd96e664e..2c36e9b6412ba026fd9bd61a1a12612c42806c39 100644 (file)
 #include "rfc1738.h"
 #include "util.h"
 
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
+#include <cstring>
 
 #define NMB_UNICAST            1
 #define NMB_BROADCAST  2
index ce8c71bc88c8397bbea2532678760714435ab378..38905510b41c41838473db8dd72d105654a33c9b 100644 (file)
@@ -30,9 +30,6 @@
 #include "util.h"
 #include "valid.h"
 
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
 #if GETOPT_H
 #include <getopt.h>
 #endif
index 167d419790850c2c548d4c0704dc1088b37ab1f5..d47e1988d8d32a23cf7dbf5d9e5d0b7978491d93 100644 (file)
@@ -61,7 +61,6 @@ extern const char * errormsg;
 
 /* Debugging stuff */
 #if defined(__GNUC__)                  /* this is really a gcc-ism */
-#include <stdio.h>
 #include <unistd.h>
 static char *__foo;
 #define debug(X...) if (debug_enabled) { \
index 65a76be56b1cfe6778d44a33c3347803d7c0729c..d256a9d6af14d3ade03952ce121e5719eb280e45 100644 (file)
 #include "squid.h"
 #include "helpers/defines.h"
 
-#if HAVE_CSTRING
 #include <cstring>
-#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
 
 /**
  * options:
index bb501b0f7e7031697d3941e23f5303319ece7699..a33b68da18260650ff66871b70b63f02b099885a 100644 (file)
 #include "squid.h"
 #include "helpers/defines.h"
 #include "rfc1738.h"
-//#include "util.h"
 
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
+#include <cstdlib>
+#include <cstring>
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
 #if HAVE_CRYPT_H
 #include <crypt.h>
 #endif
index 8834eabd706b369e4ead9295e30f5a099f21dc05..1c288188ea199558afaa3415af45c872bd2c2d0a 100644 (file)
 #ifndef SQUID_DIGEST_COMMON_H_
 #define SQUID_DIGEST_COMMON_H_
 
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#if HAVE_CTYPE_H
-#include <ctype.h>
-#endif
+#include <cctype>
+#include <cstdlib>
+#include <cstring>
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
 #if HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
index 02ac4225c5ad5c6e5c926e35d2644fa7e8730344..bbad836a4c26eac4520b46e19e95766f0ccd87a2 100644 (file)
 #ifndef SQUID_DIGEST_COMMON_H_
 #define SQUID_DIGEST_COMMON_H_
 
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#if HAVE_CTYPE_H
-#include <ctype.h>
-#endif
+#include <cctype>
+#include <cstdlib>
+#include <cstring>
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
 #if HAVE_STRINGS_H
 #include <strings.h>
 #endif
index f7dfaa8e6b47b1091f6a6d428867b87df89f8eec..41258faa6a26f0b4cdaeb7213e7636e10db2f437 100644 (file)
 #include "rfc2617.h"
 #include "util.h"
 
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
+#include <cstring>
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
 #if HAVE_SYS_STAT_H
 #include <sys/stat.h>
 #endif
index c3d35847d1fca66474502a7da3689fe562bd105a..c3c2578624c24789da4976de642c1344daf25acb 100644 (file)
 int _wcsicmp(const wchar_t *, const wchar_t *);
 #endif
 
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#if HAVE_CTYPE_H
-#include <ctype.h>
-#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
+#undef assert
+#include <cassert>
+#include <cctype>
+#include <cstring>
 #if HAVE_GETOPT_H
 #include <getopt.h>
 #endif
-#undef assert
-#include <assert.h>
 #include <windows.h>
 #include <objbase.h>
 #include <initguid.h>
index 28d97ee372f0210230a1900cdad03971d170a1c5..e24007597c4a3245e61d10244b5afa95e7fbce40 100644 (file)
 
 #define LDAP_DEPRECATED 1
 
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
-#if HAVE_CTYPE_H
-#include <ctype.h>
-#endif
+#include <cctype>
+#include <cstring>
 
 #if _SQUID_WINDOWS_ && !_SQUID_CYGWIN_
 
index b0c4a64ca4c027016f1419b5f8dd877aa3868953..038f77e4e88385d3038303ca29a313c833b5f277 100644 (file)
 int _wcsicmp(const wchar_t *, const wchar_t *);
 #endif
 
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#if HAVE_CTYPE_H
-#include <ctype.h>
-#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
+#undef assert
+#include <cassert>
+#include <cctype>
+#include <cstring>
 #if HAVE_GETOPT_H
 #include <getopt.h>
 #endif
-#undef assert
-#include <assert.h>
 #include <windows.h>
 #include <lm.h>
 #include <ntsecapi.h>
index a38cc044b6d1a5b71015e5f860b09f9693f87533..9d186c63a4a48ddc8637e304d8f5ed52ced03205 100644 (file)
 #define EDUI_PROGRAM_VERSION           "2.1"
 
 /* System includes */
-#ifdef HAVE_STDIO_H
-#include <stdio.h>
-#endif
 #ifndef _GNU_SOURCE
 #define _GNU_SOURCE
 #endif
 #ifndef __USE_GNU
 #define __USE_GNU
 #endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-#ifdef HAVE_CTYPE_H
-#include <ctype.h>
-#endif
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#ifdef HAVE_SIGNAL_H
-#include <signal.h>
-#endif
+#include <cctype>
+#include <cerrno>
+#include <csignal>
+#include <cstdarg>
+#include <cstdlib>
+#include <cstring>
+#include <ctime>
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
 #ifdef HAVE_LDAP_H
 #include <ldap.h>
 #endif
-#ifdef HAVE_STDARG_H
-#include <stdarg.h>
-#endif
-#ifdef HAVE_TIME_H
-#include <time.h>
-#endif
 
 #ifdef HELPER_INPUT_BUFFER
 #define EDUI_MAXLEN            HELPER_INPUT_BUFFER
index d359d79b40bcd6c866deafabc7cd2be6e5744540..7780b7e05b0fabc7ebfa338646c2e7bb137eb548 100644 (file)
 #include "rfc1738.h"
 #include "util.h"
 
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
+#include <cstdlib>
+#include <cstring>
 #if HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
index 08bdb97d44e4650bb16bc48c650a8dbd6cdfae9a..73211d943cb885a96530572fdf62b182136d005f 100644 (file)
@@ -37,9 +37,7 @@
 #ifdef HAVE_LDAP
 
 #include "support.h"
-#ifdef HAVE_CTYPE_H
-#include <ctype.h>
-#endif
+#include <cctype>
 
 void
 init_args(struct main_args *margs)
@@ -420,8 +418,7 @@ strup(char *s)
 }
 
 #else
-#include <stdio.h>
-#include <stdlib.h>
+#include <cstdlib>
 int
 main(int argc, char *const argv[])
 {
index 12dbb70ec08755ba13a30aa60f3194272fe0a370..127b5340d60dda675fde2c434737f5a2baeef7e3 100644 (file)
@@ -24,9 +24,7 @@
 
 #define KERBEROS_LDAP_GROUP_VERSION "1.3.1sq"
 
-#if HAVE_STRING_H
-#include <string.h>
-#endif
+#include <cstring>
 
 #if HAVE_KRB5_H
 #if HAVE_BROKEN_SOLARIS_KRB5_H
index 56bcdab05e059ec24544426b2eb395c23598f6e9..f63ae400f3b0adbde912822ffe0ac91c0cc778ed 100644 (file)
@@ -27,9 +27,7 @@
 #ifdef HAVE_LDAP
 
 #include "support.h"
-#ifdef HAVE_TIME_H
-#include <time.h>
-#endif
+#include <ctime>
 
 const char *
 LogTime()
index f63a7b86ce87f0e20dbeaa5b7e85158a1c97bc61..d03a4d31981c68376bf97d3bce95e8883a87fa1f 100644 (file)
@@ -23,6 +23,9 @@
 #endif
 #include "helpers/defines.h"
 
+#include <cstdlib>
+#include <cstring>
+#include <ctime>
 #if HAVE_DB_H
 #include <db.h>
 #endif
 #if HAVE_GETOPT_H
 #include <getopt.h>
 #endif
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#include <time.h>
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
index 40f0c35aba573998a7c24de78249b145a76b1656..9b3ec249a85b3284dbe053eaf2daef0ef9c1ab5f 100644 (file)
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
  */
 
-#if HAVE_CONFIG_H
 #include "squid.h"
-#endif
 #include "helpers/defines.h"
 
+#include <cstdarg>
+#include <cstdlib>
+#include <cstring>
+#include <ctime>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <string.h>
-#include <time.h>
 #if HAVE_GETOPT_H
 #include <getopt.h>
 #endif
index 4c9508e1e10473e235f983cb36f6459d471c124a..bfd533145e13984e263bc00b17587eddb63971b8 100644 (file)
 #include "rfc1738.h"
 #include "util.h"
 
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
+#include <cctype>
+#include <cstring>
 #if HAVE_GRP_H
 #include <grp.h>
 #endif
@@ -73,9 +69,6 @@
 #if HAVE_PWD_H
 #include <pwd.h>
 #endif
-#if HAVE_CTYPE_H
-#include <ctype.h>
-#endif
 
 /*
  * Verify if user's primary group matches groupname
index 5c365891d3a07c8c146f7333ceb20d29ab8f655b..ce068d1f6701abe8fbb6f671da05c90f0958053e 100644 (file)
@@ -1,32 +1,21 @@
 #include "squid.h"
 
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
+#include <cassert>
+#include <cerrno>
+#include <csignal>
+#include <cstring>
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
 #if HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
-#if HAVE_ASSERT_H
-#include <assert.h>
-#endif
 #if HAVE_SYS_PARAM_H
 #include <sys/param.h>
 #endif
 #if HAVE_SYS_STAT_H
 #include <sys/stat.h>
 #endif
-#if HAVE_SIGNAL_H
-#include <signal.h>
-#endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
 #if HAVE_PATHS_H
 #include <paths.h>
 #endif
index 0743d81ecec122c17a7497a48d6d0f7b61d41705..0ecac334d63098e31704666a6ab29d18a6b041e2 100644 (file)
  * -----------------------------------------------------------------------------
  */
 
-#if HAVE_STRING_H
-#include <string.h>
-#endif
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
+#include <cstring>
+#include <ctime>
 #if HAVE_NETDB_H
 #include <netdb.h>
 #endif
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#if HAVE_TIME_H
-#include <time.h>
-#endif
 
 #include "base64.h"
 #include "util.h"
index 511e862458950fb18f7f47a51b57d052268b1e5a..d9fea871f24735ecd57cfb07b25d28e0567ac459 100644 (file)
@@ -492,8 +492,7 @@ cleanup:
     }
 }
 #else
-#include <stdio.h>
-#include <stdlib.h>
+#include <cstdlib>
 #ifndef MAX_AUTHTOKEN_LEN
 #define MAX_AUTHTOKEN_LEN   65535
 #endif
index 141ab82adf0444f70c2ad1d8c4b768e5acf1d43f..f5d358e2db10c7f725fdc2b116b855863f726fb8 100644 (file)
 
 #if HAVE_GSSAPI
 
-#if HAVE_STRING_H
-#include <string.h>
-#endif
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
+#include <cerrno>
+#include <cstring>
+#include <ctime>
 #if HAVE_NETDB_H
 #include <netdb.h>
 #endif
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#if HAVE_TIME_H
-#include <time.h>
-#endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
 
 #include "base64.h"
 #include "util.h"
@@ -238,7 +229,7 @@ main(int argc, char *argv[])
 }
 
 #else
-#include <stdlib.h>
+#include <cstdlib>
 int
 main(int argc, char *argv[])
 {
index 0d1d2dd2cc83100fdaf9c11cfdc892bc8ec0d48a..0f583c8b5579b9a47b1d13954cb558b34ba22328 100644 (file)
 #include "squid.h"
 #include "base64.h"
 
-#if HAVE_STRING_H
-#include <string.h>
-#endif
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
+#include <cerrno>
+#include <cstring>
+#include <cstdlib>
+#include <ctime>
 #if HAVE_NETDB_H
 #include <netdb.h>
 #endif
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#if HAVE_TIME_H
-#include <time.h>
-#endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
 
 #if !defined(HAVE_DECL_XMALLOC) || !HAVE_DECL_XMALLOC
 #define xmalloc malloc
index c8ec4de987ff1cd8dd56d8cd5bfef562e67a0121..f4a2fb3b6061f1e93b6b4c396a4ff8ee32b93df3 100644 (file)
 #include "helpers/defines.h"
 #include "ntlmauth/ntlmauth.h"
 #include "ntlmauth/support_bits.cci"
-//#include "util.h"
 
-#if HAVE_STRING_H
-#include <string.h>
-#endif
-#if HAVE_CTYPE_H
-#include <ctype.h>
-#endif
+#include <cctype>
+#include <cstring>
 #if HAVE_CRYPT_H
 #include <crypt.h>
 #endif
@@ -73,9 +68,6 @@
 #if HAVE_GETOPT_H
 #include <getopt.h>
 #endif
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
 #if HAVE_STDINT_H
 #include <stdint.h>
 #endif
index 015d381f371f6cb7e3477816379d5c0704b84fb0..d4172142d7009ea10ea188008aefc563311c7feb 100644 (file)
 #include "ntlmauth/support_bits.cci"
 #include "rfcnb/rfcnb.h"
 #include "smblib/smblib.h"
-//#include "util.h"
 
-#if HAVE_STRING_H
-#include <string.h>
-#endif
+#include <cassert>
+#include <cctype>
+#include <cerrno>
+#include <csignal>
+#include <cstdlib>
+#include <cstring>
+#include <ctime>
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#if HAVE_SIGNAL_H
-#include <signal.h>
-#endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
 #if HAVE_GETOPT_H
 #include <getopt.h>
 #endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
-#if HAVE_CTYPE_H
-#include <ctype.h>
-#endif
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#if HAVE_ASSERT_H
-#include <assert.h>
-#endif
-#if HAVE_TIME_H
-#include <time.h>
-#endif
 
 /************* CONFIGURATION ***************/
 
index d18053c40df7c6733f5f0f81d25cd8c0b636b7ca..e1016db78844553a61187230e641b329d97ff5fc 100644 (file)
 #include "squid.h"
 #include "helpers/defines.h"
 
-#if HAVE_CSTRING
 #include <cstring>
-#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
 
 /**
  * options:
index 0f690ed23c5c173a2f81642ad34b7d04ae9cb6aa..812f86c34f6e4aa7666f610f841b5db59c9b029a 100644 (file)
 #ifndef SQUID_RANGE_H
 #define SQUID_RANGE_H
 
-#if HAVE_IOSFWD
 #include <iosfwd>
-#endif
-#if HAVE_OSTREAM
 #include <ostream>
-#endif
 
 /* represents [start, end) */
 
index 08174754f4812f77287055096a9af8b4ee097e30..34198cb2b8d7d5140dcd7e6086f95e924276d0d4 100644 (file)
@@ -32,9 +32,6 @@
 #ifndef SQUID_UTIL_H
 #define SQUID_UTIL_H
 
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
 #if HAVE_TIME_H
 #include <time.h>
 #endif
index 82ee559c4d2e1654e1169b2dfcc87d674025d259..3ab20e431f6a3f3063405c886cdabd756035d51e 100644 (file)
@@ -32,9 +32,8 @@
  */
 
 #include "squid.h"
-#if HAVE_ASSERT_H
-#include <assert.h>
-#endif
+
+#include <cassert>
 
 #include "MemPool.h"
 #include "MemPoolChunked.h"
@@ -42,9 +41,7 @@
 
 #define FLUSH_LIMIT 1000       /* Flush memPool counters to memMeters after flush limit calls */
 
-#if HAVE_STRING_H
-#include <string.h>
-#endif
+#include <cstring>
 
 /*
  * XXX This is a boundary violation between lib and src.. would be good
index 7a12e6e662afc2aa5ea8e6979c680b41dba0cca5..14d8f2e2c790adc51daa131a50b5600da55d5dc4 100644 (file)
  */
 
 #include "squid.h"
-#if HAVE_ASSERT_H
-#include <assert.h>
-#endif
+
+#include <cassert>
 
 #include "MemPoolChunked.h"
 
 #define MEM_MAX_MMAP_CHUNKS 2048
 
-#if HAVE_STRING_H
-#include <string.h>
-#endif
+#include <cstring>
 
 /*
  * XXX This is a boundary violation between lib and src.. would be good
index bc5d369021bf59ede0038a288097de2dd1cbd670..f0fe52fe98aefd70d191b5a31ed6a245a7bae8a6 100644 (file)
  */
 
 #include "squid.h"
-#if HAVE_ASSERT_H
-#include <assert.h>
-#endif
-
 #include "MemPoolMalloc.h"
 
-#if HAVE_STRING_H
-#include <string.h>
-#endif
+#include <cassert>
+#include <cstring>
 
 /*
  * XXX This is a boundary violation between lib and src.. would be good
index 125eb26ac4a07f77dfa29d53650a620d0e7f52ec..220a2f9eee2d765c1f3f83d6206487eac4b01eb4 100644 (file)
@@ -5,12 +5,7 @@
 
 #include "squid.h"
 
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
+#include <cstdlib>
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
index 6fd2dea973efd313c46a671ea6b38657602067c0..70e7fb2ae67a9008486757376b0a5eda32fd48d9 100644 (file)
@@ -7,9 +7,6 @@
 #include "squid.h"
 #include "base64.h"
 
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
 #if HAVE_STDLIB_H
 #include <stdlib.h>
 #endif
index a4083f5fbe18342a60308e52a03007603d7661fd..6249719459d4b1ecd399d9cefb1d8743911f37b4 100644 (file)
@@ -33,7 +33,6 @@
 static char sccsid[] = "@(#)getopt.c   8.3 (Berkeley) 4/27/95";
 #endif /* LIBC_SCCS and not lint */
 
-#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
index 5cbc080e9cf165701964c3ee7e73ae8677351718..d764bdfc82c108c544ccfd6a326408e895c739ab 100644 (file)
 #include "hash.h"
 #include "profiler/Profiler.h"
 
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
+#include <cassert>
+#include <cmath>
+#include <cstdlib>
+#include <cstring>
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
 #elif HAVE_MALLOC_H
 #include <malloc.h>
 #endif
-#if HAVE_ASSERT_H
-#include <assert.h>
-#endif
-#if HAVE_MATH_H
-#include <math.h>
-#endif
 
 static void hash_next_bucket(hash_table * hid);
 
index 7c18be475380fb7e9632ce42929922f54f41a1c4..c2681ff7b32c058745619691e37121315e9a8027 100644 (file)
@@ -47,9 +47,6 @@
 #if HAVE_STRING_H
 #include <string.h>
 #endif
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
 
 #include "util.h"
 
index e18f53af8266c5a9885ccac448d866f4028690a3..17b5f5addab4e551b35c70735beff5ae91cfe743 100644 (file)
@@ -33,9 +33,6 @@
 #include "squid.h"
 #include "html_quote.h"
 
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
 #if HAVE_STRING_H
 #include <string.h>
 #endif
index 2df951595999639ecc3055cc9c5c542e1c223341..00be05fa3331b45d191270d33f536d1ed3661d9e 100644 (file)
@@ -1,9 +1,6 @@
 #include "squid.h"
 #include "util.h"
 
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
 #if HAVE_STRING_H
 #include <string.h>
 #endif
index e9ceff4dc32982afd855f60f66a617d398137b8e..39bd82facff003b71e876db3413c593eed4c4f01 100644 (file)
@@ -19,7 +19,6 @@
 
 #include "squid.h"
 #include "Trie.h"
-#include <stdio.h>
 
 int
 main (int argc, char **argv)
index 8404ff409eae413f4b44e468a802974176e29d17..13bcd32e282773f0da5380a686d28b7a747168da 100644 (file)
@@ -21,9 +21,7 @@
 #include "libTrie/Trie.h"
 #include "libTrie/TrieCharTransform.h"
 
-#if HAVE_IOSTREAM
 #include <iostream>
-#endif
 
 bool
 CaseSensitiveCheck()
index 358e01b6c38a5afa4ff1f595088336df38fa9187..899dff9089309f42c9dfd7741b9febd7b40e6832 100644 (file)
 #include "profiler/Profiler.h"
 #include "util.h"
 
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
-#if HAVE_CTYPE_H
-#include <ctype.h>
-#endif
+#include <cassert>
+#include <cctype>
+#include <cerrno>
+#include <cmath>
+#include <cstring>
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
 #elif HAVE_MALLOC_H
 #include <malloc.h>
 #endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#if HAVE_MATH_H
-#include <math.h>
-#endif
-#if HAVE_ASSERT_H
-#include <assert.h>
-#endif
 
 #if MEM_GEN_TRACE
 
index c78c99d4152a5efe20037af9ae16fc206c470bf5..23b1f25e7b100dc4c431f635dbcd249ee67658af 100644 (file)
@@ -5,7 +5,7 @@
 
 #include "squid.h"
 #include "md5.h"
-#include "stdio.h"
+//#include "stdio.h" // ???
 
 static void MDPrint(unsigned char digest[16]);
 static void MDString(char *string);
index c1435bc9def9c8ea1a469dcfe98b2508b4ec69af..fb2ec250e5d69456802d198e35a6ec73d4d44a0c 100644 (file)
@@ -25,9 +25,7 @@
 
 #include "squid.h"
 
-#if HAVE_STRING_H
-#include <string.h>
-#endif
+#include <cstring>
 #if HAVE_STRINGS_H
 #include <strings.h>
 #endif
index 5e215ebf2ef8be8e7ce18dde43a30337ce501186..6661c5e79168a8c6e15d43406f29a397c90f998e 100644 (file)
 
 #if USE_XPROF_STATS
 
-#if HAVE_ASSERT_H
-#include <assert.h>
-#endif
+#include <cassert>
 #if HAVE_GNUMALLLOC_H
 #include <gnumalloc.h>
 #elif HAVE_MALLOC_H
index 12d3dee326b32579042b47eec736eb029e4fccc1..0ad361c882a5851c946aeae097a810880568dcc2 100644 (file)
@@ -71,9 +71,6 @@
 #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
index a262ab7b522d510c6952eafca4ff60aecfd84900..4a22436a7e79278d030c0339aad6b0f1882c551b 100644 (file)
@@ -39,9 +39,6 @@
 #include "squid.h"
 #include "util.h"
 
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
 #if HAVE_STRING_H
 #include <string.h>
 #endif
index d4297e3b5a2d32ab113d4379b843987319e2a5ce..f54f6eec7d3d58fea0635f636e8647417157598e 100644 (file)
@@ -37,9 +37,6 @@
  *  Adapted from HTSUtils.c in CERN httpd 3.0 (http://info.cern.ch/httpd/)
  *  by Darren Hardy <hardy@cs.colorado.edu>, November 1994.
  */
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
 #if HAVE_STRING_H
 #include <string.h>
 #endif
index 612d6d438fb578a50be47c0479b8af2d6074d48f..03d90a5d608437a418cad9dcfd8389f4f2dcc5f5 100644 (file)
@@ -33,9 +33,6 @@
 #include "squid.h"
 #include "rfc1738.h"
 
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
 #if HAVE_STRING_H
 #include <string.h>
 #endif
index 7d4a2a222632cb2c1a8a3ef7c43c7ba82d22aec8..c80673b451a0aaa5ab3c5b3aee06fa3b2b064607 100644 (file)
@@ -57,9 +57,6 @@
 #include "compat/inet_pton.h"
 #include "util.h"
 
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
index 8dbda9d6e82992687f444b82dc805ad4df2efde9..ff3bcfc1f975e6f2076dc802ba140cb562911c8d 100644 (file)
@@ -41,7 +41,6 @@ typedef short int16;
 #endif
 #include <signal.h>
 #include <errno.h>
-#include <stdio.h>
 #include <unistd.h>
 
 #define TRUE 1
index 9d30d2ee4e0004d4652d8368b24e7ed48c9a0727..80f355f7d8d9b3a723fd5b1bafdbc9fd396d2124 100644 (file)
@@ -31,8 +31,6 @@
 /* ensure we don't overwrite strings when not passed enough space. Also */
 /* added code to say unknown error codes if we see any                  */
 
-#include <stdio.h>
-
 typedef struct {
     char *name;
     int code;
index 9cac7b1e3327b867de30070f020a2d78eb3c181a..d6a3d2137b1bacdafef3e8a7d0ff4c4ffaade09b 100644 (file)
@@ -34,7 +34,6 @@
 #include <sys/socket.h>
 #include <signal.h>
 #include <errno.h>
-#include <stdio.h>
 #include <unistd.h>
 #include <strings.h>
 
index 4b5fd61780ea1f09a32dcdc2d600662c983e6d4e..34fc659cad160c1cde2fa522e2c0de706c5582b2 100644 (file)
@@ -33,8 +33,6 @@
 
 #include "squid.h"
 
-#include <stdio.h>
-
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
index dd8e209b60baab55096e7ef010c81884a08a6f26..9fab1a7a7378cca8aaae8d47933785ee8d49e4ae 100644 (file)
@@ -29,8 +29,6 @@
 
 #include "squid.h"
 
-#include <stdio.h>
-
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
index 707f307f7aa28ef83d8bf7b91013fe3b9559e813..a868fd1edf0c04bcf2eebbf411d8d4a70da66a7e 100644 (file)
@@ -24,8 +24,6 @@ SOFTWARE.
 #define SQUID_NO_STRING_BUFFER_PROTECT 1
 #include "squid.h"
 
-#include <stdio.h>
-
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
index 4cc978e2499f265e2f3c7d6e54be475152ffda54..fad5a8d5445980b1f239d1e0c7d9abde6ebec31c 100644 (file)
@@ -32,8 +32,6 @@ SOFTWARE.
 #include "snmp_vars.h"
 #include "util.h"
 
-#include <stdio.h>
-
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
index ba6703d0f73c7b9e68536421ea1dfbef840ed7e3..c5ddbc7ba691b4692a3f242c42b8f3e8cae3dfb9 100644 (file)
@@ -25,8 +25,6 @@
 
 #include "squid.h"
 
-#include <stdio.h>
-
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
index 4257faafe731eb99ce5c97b609a14a71166d2574..bebf939ed1482e38422aeb3d83c37d99604b8a0b 100644 (file)
@@ -31,8 +31,6 @@
  ***************************************************************************/
 
 #include "squid.h"
-
-#include <stdio.h>
 #include "snmp_api_error.h"
 
 /***************************************************************************
index 93518ee68bfc34b018d0a47648cf584ab2af7a23..1af437b5eb648e6a125dc048f46089d3259b91fb 100644 (file)
@@ -27,9 +27,6 @@
  **********************************************************************/
 
 #include "squid.h"
-
-#include <stdio.h>
-
 #include "snmp_error.h"
 
 static const char *error_string[25] = {
index 985ad43b015cd6999a8b379d8ff62e79c5366f81..04c98aebc4adc3a1671e3f41a99810584b61ff94 100644 (file)
@@ -35,8 +35,6 @@
 
 #include "squid.h"
 
-#include <stdio.h>
-
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
index 44a4d25715d8ca3fbe951eba873a8e6cde47e509..4b783c4e65c01a2c633abc1a983b34a5447a689b 100644 (file)
@@ -35,8 +35,6 @@
 
 #include "squid.h"
 
-#include <stdio.h>
-
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
index a05f14d3735890e0169851a8715a5481efc128bb..6413ed571e97b23e0a9e45624e82bd458d4c2853 100644 (file)
@@ -34,8 +34,6 @@
 
 #include "squid.h"
 
-#include <stdio.h>
-
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
index d6e5534e2956472762239a629db2dc668f5c9825..809e19b21fbe7d628cc1b647345b28e4c2c07ee7 100644 (file)
@@ -1,7 +1,5 @@
 #include "squid.h"
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
+
 #if HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
index 6e1228ce97e5c09c77a1dd9c8ab174192ac03fdb..8b5582088746687e4d87bb34299a52a8fec5304b 100644 (file)
@@ -1,9 +1,7 @@
 #define SQUID_UNIT_TEST 1
 #include "squid.h"
 
-#if HAVE_ASSERT_H
-#include <assert.h>
-#endif
+#include <cassert>
 
 #include "testRFC1035.h"
 
index b26d3f5742ac18b0deac54923691fd24dcf59313..54c32e2933c1cebf45816ceb337a59679f8a96d5 100644 (file)
@@ -1,9 +1,7 @@
 #define SQUID_UNIT_TEST 1
 #include "squid.h"
 
-#if HAVE_ASSERT_H
-#include <assert.h>
-#endif
+#include <cassert>
 
 #include "testRFC1738.h"
 
index 123e7ad3f4db5f0b3d838b8b4578d13e03391059..febabe562049e4f8039ffc6de197e7168c4ae7f5 100644 (file)
@@ -35,9 +35,6 @@
 #include "squid.h"
 #include "util.h"
 
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
 #if HAVE_STRING_H
 #include <string.h>
 #endif
index 1cc52954617c031b4066396bb6b3247d3884ca80..8e9fdee22ad326d532507ad55aea29b534f147ab 100644 (file)
 #define SQUID_CONFIGPARSER_H
 
 #include "SquidString.h"
+
 #include <queue>
 #include <stack>
-#if HAVE_STRING
 #include <string>
-#endif
 
 class wordlist;
 /**
index cd78545c2ba0b59190f873c61f6945ca420e440e..3af3a40e10e1cae43cbb69d961d6f46d12974e0f 100644 (file)
@@ -9,12 +9,8 @@
 #include "Debug.h"
 #include "util.h"
 
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
+#include <cerrno>
+#include <cstring>
 
 CpuAffinitySet::CpuAffinitySet()
 {
index 18c01ca4919d98df19f50263f1dedd45a1a7b2f7..3b69cac201a2b8767e0feaaa019291ee7b811894 100644 (file)
 #ifndef SQUID_DEBUG_H
 #define SQUID_DEBUG_H
 
-#if HAVE_IOSTREAM
 #include <iostream>
-#endif
-
 #undef assert
-#if HAVE_SSTREAM
 #include <sstream>
-#endif
-#if HAVE_IOMANIP
 #include <iomanip>
-#endif
 #if defined(assert)
 #undef assert
 #endif
index c132ea6ee81bde028bc0bbec1c27447610968ee8..99ae833dbea3ec7786b65439f4905edd63a41024 100644 (file)
@@ -34,9 +34,8 @@
 #include "DiskIO/DiskDaemon/diomsg.h"
 #include "hash.h"
 
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
+#include <cerrno>
+#include <iostream>
 #if HAVE_SYS_IPC_H
 #include <sys/ipc.h>
 #endif
@@ -46,9 +45,6 @@
 #if HAVE_SYS_SHM_H
 #include <sys/shm.h>
 #endif
-#if HAVE_IOSTREAM
-#include <iostream>
-#endif
 
 void
 xassert(const char *msg, const char *file, int line)
index 725c9f461aa6fd78699ccc9385b9c95640c35c27..b18220837c29896d23d66a19661a2a3b952cafcd 100644 (file)
 #endif
 
 #include "squid.h"
+#include "DiskIO/DiskThreads/CommIO.h"
 #include "DiskThreads.h"
 #include "SquidConfig.h"
+#include "SquidTime.h"
+#include "Store.h"
 
-#include <stdio.h>
+#include <csignal>
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <pthread.h>
 #include <errno.h>
 #include <dirent.h>
-#include <signal.h>
 #if HAVE_SCHED_H
 #include <sched.h>
 #endif
-#include "DiskIO/DiskThreads/CommIO.h"
-#include "SquidTime.h"
-#include "Store.h"
 
 #define RIDICULOUS_LENGTH      4096
 
index 9701e7cbb1abe4aa8824c0c6b091ceae6223142b..4967789fe3dc3795b3315c2b6566307dd8857045 100644 (file)
 #include "SquidTime.h"
 #include "Store.h"
 
-#include <stdio.h>
+#include <csignal>
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <errno.h>
 #include <dirent.h>
-#include <signal.h>
 
 #define RIDICULOUS_LENGTH      4096
 
index 1438eca76abcda3322f0c6aabe6e5b5902755b97..192baf40ce66ef2b433b4630393ffafcbcaeac8f 100644 (file)
@@ -34,9 +34,7 @@
 #include "squid.h"
 #include "ETag.h"
 
-#if HAVE_CSTRING
 #include <cstring>
-#endif
 
 /*
  * Note: ETag is not an http "field" like, for example HttpHdrRange. ETag is a
index 1dd0576fd31c3c85065cb4aa0c4afcc1b08d4134..95ecf7759e782fe03e36a7df292bd10e60630433 100644 (file)
@@ -3,9 +3,7 @@
 #include "FadingCounter.h"
 #include "SquidTime.h"
 
-#if HAVE_MATH_H
-#include <math.h>
-#endif /* HAVE_MATH_H */
+#include <cmath>
 
 FadingCounter::FadingCounter(): horizon(-1), precision(10), delta(-1),
         lastTime(0), total(0)
index 1d4ddab8d9ea44b316ea51b97ca85e67f8e11e15..1f7fbbf99befd517e5a5b99064c3bc9cdbd38d11 100644 (file)
@@ -32,9 +32,7 @@
 
 #include "dlink.h"
 
-#if HAVE_OSTREAM
 #include <ostream>
-#endif
 
 template <class _Arg, class _Result>
 struct unary_function {
index f8359f84f483c2937550940655ef327a875ee258..884e4eff8b2e7195f25f5374ddb35214dbdd4fb1 100644 (file)
@@ -6,7 +6,7 @@
 #include "HelperChildConfig.h"
 #include "Parsing.h"
 
-#include <string.h>
+#include <cstring>
 
 HelperChildConfig::HelperChildConfig(const unsigned int m):
         n_max(m),
index c0d7fc9491194d3dfc653b348d06d340211f9602..56b45e4096ac775dd914c0269c11654df933b8c2 100644 (file)
@@ -5,9 +5,7 @@
 #include "MemBuf.h"
 #include "Notes.h"
 
-#if HAVE_OSTREAM
 #include <ostream>
-#endif
 
 class helper_stateful_server;
 
index b550ce720b8684e3efb3228e983cdf5454d6690d..8d4f1ad9087569ac6be3401d42733e3c26a4dfb5 100644 (file)
@@ -41,9 +41,7 @@
 #include "Store.h"
 #include "StrList.h"
 
-#if HAVE_MAP
 #include <map>
-#endif
 
 /* a row in the table used for parsing cache control header and statistics */
 typedef struct {
index 523fe772fd0bf2e53d98b3a49be5522cadb930bd..2eb20fd12b4d08635cdc985b330b5671b5a8ee02 100644 (file)
@@ -44,9 +44,7 @@
 #include "Store.h"
 #include "StrList.h"
 
-#if HAVE_MAP
 #include <map>
-#endif
 
 /* a row in the table used for parsing surrogate-control header and statistics */
 typedef struct {
index ac273b34940ddd08f4ef72cce4122252261e1d0f..137afb1e373e612df555d1c74277b095dfd9c1f0 100644 (file)
@@ -6,18 +6,10 @@
 #include "HttpHeader.h"
 #include "typedefs.h"
 
-#if HAVE_FUNCTIONAL
 #include <functional>
-#endif
-#if HAVE_LIST
 #include <list>
-#endif
-#if HAVE_MAP
 #include <map>
-#endif
-#if HAVE_STRING
 #include <string>
-#endif
 #if HAVE_STRINGS_H
 #include <strings.h>
 #endif
index 343e7719b57c287c300622618edefefc592da199..f941ddb19296d29b5f51856e966fbf0b01347be6 100644 (file)
--- a/src/Mem.h
+++ b/src/Mem.h
@@ -37,9 +37,7 @@
 /* for FREE */
 #include "typedefs.h"
 
-#if HAVE_IOSFWD
 #include <iosfwd>
-#endif
 
 class StoreEntry;
 class MemPoolStats;
index cc83aa9cd3578e61947b2d353fe7b5c8e555666b..7662c11a4e29db728a412ba2b779f8fcb95312b7 100644 (file)
@@ -33,9 +33,7 @@
 #include "MemBlob.h"
 #include "SBufDetailedStats.h"
 
-#if HAVE_IOSTREAM
 #include <iostream>
-#endif
 
 MemBlobStats MemBlob::Stats;
 InstanceIdDefinitions(MemBlob, "blob");
index f485cf717f50b3197f763d99619b3b6e50fa5794..274d3bb145e72cfe4c993eca10cf0978aeeb6f90 100644 (file)
@@ -9,9 +9,7 @@
 #include "SquidString.h"
 #include "typedefs.h"
 
-#if HAVE_STRING
 #include <string>
-#endif
 #include <vector>
 
 class HttpRequest;
index 5d224ff2d232334289bcbffb3078d6d2b25df260..4ef5a4d6e0f9b02be0b62eadad9a0ab7e9ab5aca 100644 (file)
@@ -36,9 +36,6 @@ class Packer;
 /* a common objPackInto interface; used by debugObj */
 typedef void (*ObjPackMethod) (void *obj, Packer * p);
 
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
 /* append/vprintf's for Packer */
 typedef void (*append_f) (void *, const char *buf, int size);
 typedef void (*vprintf_f) (void *, const char *fmt, va_list args);
index 08c6210bd8138314cafdc0e8d13249f5ee0eb4f9..56f981bf3b00e7ae118e71b0d0d2df3f7493eee8 100644 (file)
 #include "SBufExceptions.h"
 #include "util.h"
 
-#if HAVE_STRING_H
-#include <string.h>
-#endif
-
-#if HAVE_SSTREAM
-#include <sstream>
-#endif
-
-#if HAVE_IOSTREAM
+#include <cstring>
 #include <iostream>
-#endif
+#include <sstream>
 
 #ifdef VA_COPY
 #undef VA_COPY
index 67b6e665b04dbceda590888abb5787997a20b03d..31deb00882548c937c84080fa298039f0e6c0893 100644 (file)
 #include "SBufExceptions.h"
 #include "SquidString.h"
 
-#if HAVE_CLIMITS
 #include <climits>
-#elif HAVE_LIMITS_H
-#include <limits.h>
-#endif
+#include <cstdarg>
+#include <iosfwd>
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#if HAVE_STDARG_H
-#include <stdarg.h>
-#endif
-#if HAVE_IOSFWD
-#include <iosfwd>
-#endif
 
 /* SBuf placeholder for printf */
 #ifndef SQUIDSBUFPH
index d6574e9fbc9da5f4a1ef2b408bc0ead64e00ff23..9c3aeeedfd6f3a511cf29b96ed90b2f6b247a345 100644 (file)
@@ -32,9 +32,7 @@
 
 #include "SBuf.h"
 
-#if HAVE_OSTREAM
 #include <ostream>
-#endif
 
 /** streambuf class for a SBuf-backed stream interface.
  *
index a454f16146a71301bc6ced2ce58008ade30cbced..c4081344b745c0598489f60c41acde35258b9691 100644 (file)
@@ -33,9 +33,7 @@
 #ifndef SQUID_STRING_H
 #define SQUID_STRING_H
 
-#if HAVE_OSTREAM
 #include <ostream>
-#endif
 
 /* squid string placeholder (for printf) */
 #ifndef SQUIDSTRINGPH
index 46a84a47c3d729171bb8f2178e3ab7fda836cd71..f5dbf4c28446d1f3883d49009a54d5ea9cd6c50d 100644 (file)
@@ -34,9 +34,7 @@
 
 #include "rfc1123.h"
 
-#if HAVE_TIME_H
-#include <time.h>
-#endif
+#include <ctime>
 /* NP: sys/time.h is provided by libcompat */
 
 /* globals for accessing time */
index f22573b623600cb2f91f2914164b60c969226aa6..c7404a158a59e8b2901caf062b5df5a6235d61e9 100644 (file)
@@ -34,9 +34,8 @@
 #include "squid.h"
 #include "StatHist.h"
 
-#if HAVE_MATH_H
-#include <math.h>
-#endif
+#include <cmath>
+
 /* Local functions */
 static StatHistBinDumper statHistBinDumper;
 
index c1fad115e9718240168d86ae32297567ccfb2636..241667358b653a709a9759e3682bebc17e2c0348 100644 (file)
@@ -51,9 +51,7 @@
 #include "esi/Element.h"
 #endif
 
-#if HAVE_OSTREAM
 #include <ostream>
-#endif
 
 class AsyncCall;
 class HttpRequest;
index 880405a41a421dbf7025fce24f15f5c085db38de..4659fad7f67b22db7ea4d05b27dff2e821976f27 100644 (file)
@@ -33,9 +33,7 @@
 
 #include "Store.h"
 
-#if HAVE_OSTREAM
 #include <ostream>
-#endif
 
 /*
  * This class provides a streambuf interface for writing
index f0010cf1bd6416bbbef328ab08551f42cdc15c71..f46c1e05b1f66a0c6f266da3c55df6dda313d008 100644 (file)
@@ -38,9 +38,7 @@
 #include "profiler/Profiler.h"
 #include "Store.h"
 
-#if HAVE_LIMITS_H
-#include <limits.h>
-#endif
+#include <climits>
 
 int
 String::psize() const
index ec14bda7f3ce0e1b7204f28c36ecf4b3e86b9c9d..480e82e6611e6e2a8293305d479e8b32315e8205 100644 (file)
@@ -17,9 +17,7 @@
 #include "tools.h"
 #include "Transients.h"
 
-#if HAVE_LIMITS_H
 #include <limits>
-#endif
 
 /// shared memory segment path to use for Transients maps
 static const char *MapLabel = "transients_map";
index 6996348affa4faccd0e7a1e14c6854b9f006f81b..cbefd6423ed2e1a14243623952dc86de47b5b8bd 100644 (file)
 #include "dlink.h"
 #include "MemPool.h"
 
-#if HAVE_OSTREAM
 #include <ostream>
-#endif
-#if HAVE_STRING
 #include <string>
-#endif
 #include <vector>
 
 class ConfigParser;
index 4f21fe11b5ab6af0dd830b92f9bddb306ca7c157..962a2492af63387f75a2a7bf9620018307c6e3e0 100644 (file)
@@ -4,9 +4,7 @@
 #include "acl/forward.h"
 #include "err_type.h"
 
-#if HAVE_SSTREAM
 #include <sstream>
-#endif
 
 class ConfigParser;
 class dlink_list;
index f4e423ac43b20f2d2d2eb323666946764473c36b..f5cc88fd57e89dd2ff822aee13839990c98bfd3d 100644 (file)
@@ -40,9 +40,7 @@
 #include "HttpReply.h"
 #include "wordlist.h"
 
-#if HAVE_LIMITS_H
-#include <limits.h>
-#endif
+#include <climits>
 
 static void aclParseHTTPStatusList(SplayNode<acl_httpstatus_data *> **curlist);
 static int aclHTTPStatusCompare(acl_httpstatus_data * const &a, acl_httpstatus_data * const &b);
index bf0a7bb56c9b3d701dbd26e246729878d47c919d..2c50e5b7df90e835e3839a60a184bff7542ce46b 100644 (file)
@@ -15,9 +15,7 @@
 #include <libecap/common/options.h>
 #include <libecap/common/name.h>
 #include <libecap/common/named_values.h>
-#if HAVE_LIMITS
 #include <limits>
-#endif
 #include <map>
 
 /// libecap::adapter::services indexed by their URI
index 7c96ad5db79bf292d1eb85453255491a37f37454..f72117d27cbc171900356ada8fccdd95f02c1b69 100644 (file)
@@ -7,9 +7,7 @@
 #endif
 
 #include <cstring>
-#if HAVE_LIMITS
 #include <limits>
-#endif
 
 CBDATA_NAMESPACED_CLASS_INIT(AnyP, PortCfg);
 
index 4f5ab3b753f1f8c5b5a05628c16fde7819c480a8..a40ac64073df413f3b4efecb671dbe006d708743 100644 (file)
@@ -1,9 +1,7 @@
 #ifndef _SQUID_SRC_ANYP_PROTOCOLTYPE_H
 #define _SQUID_SRC_ANYP_PROTOCOLTYPE_H
 
-#if HAVE_OSTREAM
 #include <ostream>
-#endif
 
 namespace AnyP
 {
index 9e246d4b561164bb667d7eff35eef9f5e93f416a..8affa67a02270ca5fdde226f756a275281005fb2 100644 (file)
@@ -3,9 +3,7 @@
 
 #include "anyp/ProtocolType.h"
 
-#if HAVE_OSTREAM
 #include <ostream>
-#endif
 
 namespace AnyP
 {
index 98de13c69f54d03cd566ffbdaea8a0b157fcbe86..7ba963b4dcd9948f845ac48cca4fca443470bba3 100644 (file)
@@ -2,9 +2,8 @@
 #define SQUID_ANYP_URISCHEME_H
 
 #include "anyp/ProtocolType.h"
-#if HAVE_IOSFWD
+
 #include <iosfwd>
-#endif
 
 namespace AnyP
 {
index c558666812c8c3295b8e55cc0f4ece31303d9feb..c68a4fe02d5903ea99ee82016d82cabfdbadb9d5 100644 (file)
@@ -6,12 +6,9 @@
 #define SQUID_LRUMAP_H
 
 #include "SquidTime.h"
-#if HAVE_LIST
+
 #include <list>
-#endif
-#if HAVE_MAP
 #include <map>
-#endif
 
 template <class EntryValue, size_t EntryCost = sizeof(EntryValue)> class LruMap
 {
index 26f2a90fef8ac773a16cca269e034047372a22a2..f0e7b2d8ad77952697cd56f4206b024931cbe599 100644 (file)
@@ -36,9 +36,7 @@
 // reference counting requires the Lock API on base classes
 #include "base/Lock.h"
 
-#if HAVE_IOSTREAM
 #include <iostream>
-#endif
 
 /**
  * Template for Reference Counting pointers.
index ef28936f65582594cd11e4ae3bff161bf4c46877..6e9a4b325a01bf1eb3c3b44d79c89e145261f263 100644 (file)
 #if HAVE_GLOB_H
 #include <glob.h>
 #endif
-#if HAVE_LIMITS_H
 #include <limits>
-#endif
-#if HAVE_LIST
 #include <list>
-#endif
 #if HAVE_PWD_H
 #include <pwd.h>
 #endif
index a52527e68271b7ae627fe075205ca7b7c8da64e3..10958250c4a99328864017f6491d41cf330e5031 100644 (file)
@@ -41,9 +41,7 @@
 #include "Store.h"
 #include "URL.h"
 
-#if HAVE_MATH_H
-#include <math.h>
-#endif
+#include <cmath>
 
 #define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
 
index d9c8d8353bad5ce8188666bde0805bfe12762123..ae2827bf1d10c5bee52570c19c3d955d07c47c59 100644 (file)
 #include "Store.h"
 #include "Generic.h"
 
-#if HAVE_LIMITS_H
-#include <limits.h>
-#endif
+#include <climits>
 #if USE_CBDATA_DEBUG
-#include <vector>
 #include <algorithm>
+#include <vector>
 #endif
 
 #if WITH_VALGRIND
index 24eb75f5f05cf273b5c783e78588c47ec72c0a49..73efdba17fcd59d6506e1679a5403ef975a9ae7e 100644 (file)
 #include "ssl/crtd_message.h"
 #endif
 
-#if HAVE_LIMITS_H
-#include <limits.h>
-#endif
-#if HAVE_MATH_H
-#include <math.h>
-#endif
-#if HAVE_LIMITS
+#include <climits>
+#include <cmath>
 #include <limits>
-#endif
 
 #if LINGERING_CLOSE
 #define comm_close comm_lingering_close
index 9f19f1dbb4d5e8ad12a59517b27dd611b517ed78..48a4dfc64cf4b62fdfaa4cedcc278647bc350d01 100644 (file)
@@ -63,6 +63,8 @@
 #include "ssl/support.h"
 #endif
 
+#include <cerrno>
+#include <cmath>
 #if _SQUID_CYGWIN_
 #include <sys/ioctl.h>
 #endif
 #if HAVE_SYS_UN_H
 #include <sys/un.h>
 #endif
-#if HAVE_MATH_H
-#include <math.h>
-#endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
 
 /*
  * New C-like simple comm code. This stuff is a mess and doesn't really buy us anything.
index 93581dc7f5c13d389c410f222106168d73e804a4..f2f5dc057d2108422d1cfb8ca60513a38b3eae32 100644 (file)
 #include "eui/Eui64.h"
 #endif
 
-#if HAVE_IOSFWD
 #include <iosfwd>
-#endif
-#if HAVE_OSTREAM
 #include <ostream>
-#endif
 
 class CachePeer;
 
index 2a064d3d185e1cc998fc2b764e8a46124bfacb02..72fc17382250b9cd04c89601094726f6612dc682 100644 (file)
 #include "StatHist.h"
 #include "Store.h"
 
+#include <cerrno>
+#include <climits>
 #if HAVE_SYS_DEVPOLL_H
 /* Solaris /dev/poll support, see "man -s 7D poll" */
 #include <sys/devpoll.h>
 #endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#if HAVE_LIMITS_H
-#include <limits.h>
-#endif
 
 #define DEBUG_DEVPOLL 0
 
-// OPEN_MAX is defined in <limits.h>
+// OPEN_MAX is defined in <climits>
 #define        DEVPOLL_UPDATESIZE      OPEN_MAX
 #define        DEVPOLL_QUERYSIZE       OPEN_MAX
 
index bc16767a3a6946db0051cd8558e053440eb6dea0..04bed7cd91528512e5e243604c3f0ce440c69023 100644 (file)
@@ -9,13 +9,11 @@
 #include "profiler/Profiler.h"
 #include "SquidTime.h"
 #include "StatCounters.h"
-
 #if USE_DELAY_POOLS
 #include "ClientInfo.h"
 #endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
+
+#include <cerrno>
 
 void
 Comm::Write(const Comm::ConnectionPointer &conn, MemBuf *mb, AsyncCall::Pointer &callback)
index b0a570fe36ad99d88ae8564f7926cee103ab4091..10a7cbed6cf30df3745c256bd708c9d8d3594563 100644 (file)
 #include "esi/Expression.h"
 #include "profiler/Profiler.h"
 
-#if HAVE_MATH_H
-#include <math.h>
-#endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
+#include <cerrno>
+#include <cmath>
 
 /* stack precedence rules:
  * before pushing an operator onto the stack, the
index c46172cc9581edb088c665971a7891d19774d9ed..840d39f6f3cf7c21877654cae73c89c12b6a94e2 100644 (file)
@@ -11,14 +11,7 @@ namespace Ip
 class Address;
 };
 
-#if HAVE_CSTRING
 #include <cstring>
-#endif
-
-/* memcpy and friends */
-#if HAVE_STRING_H
-#include <string.h>
-#endif
 
 namespace Eui
 {
index ec318201d906f89df7d43f08a0ce43aab5ecee47..4569e83194f88b7313bab9ea841203db3471c324 100644 (file)
@@ -8,18 +8,11 @@ namespace Ip
 class Address;
 }
 
-#if HAVE_CSTRING
 #include <cstring>
-#endif
 #if HAVE_SYS_EUI64_H
 #include <sys/eui64.h>
 #endif
 
-/* memcpy and friends */
-#if HAVE_STRING_H
-#include <string.h>
-#endif
-
 namespace Eui
 {
 
index 830299557a8500384b83fe50f167d3242234eea2..37ad3fe747d812b2767c0ec3f0ede900915acaa8 100644 (file)
@@ -39,9 +39,7 @@
 #include "Store.h"
 #include "tools.h"
 
-#if HAVE_MATH_H
-#include <math.h>
-#endif
+#include <cmath>
 
 /* The list of event processes */
 
index e6f3c74106eb128c6b9a935a20db02ba5ae2029e..7b18bf2821ba3769e1d7f1924e1ef86e55a0027f 100644 (file)
 #include "SwapDir.h"
 #include "tools.h"
 
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-
 static void
 fatal_common(const char *message)
 {
index 3d5072dfa92ea505bc2176ba1e506de4b9cce3ae..8c2ddba3cedbd96ee2e881ff64579b8f877e4c1d 100644 (file)
 #include "tools.h"
 #include "UFSSwapLogParser.h"
 
-#if HAVE_MATH_H
-#include <math.h>
-#endif
+#include <cerrno>
+#include <cmath>
 #if HAVE_SYS_STAT_H
 #include <sys/stat.h>
 #endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
 
 CBDATA_NAMESPACED_CLASS_INIT(Fs::Ufs,RebuildState);
 
index 3f26df63e69e71773143dcdf1e4a816e6ed4651e..fdd49f30bdc340a5f7e8621a7595ecf98945165f 100644 (file)
 #include "tools.h"
 #include "UFSSwapDir.h"
 
-#if HAVE_MATH_H
-#include <math.h>
-#endif
+#include <cerrno>
+#include <cmath>
 #if HAVE_SYS_STAT_H
 #include <sys/stat.h>
 #endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
 
 int Fs::Ufs::UFSSwapDir::NumberOfUFSDirs = 0;
 int *Fs::Ufs::UFSSwapDir::UFSDirToGlobalDirMapping = NULL;
index 3163f760dd2823387459f120cd9024772bbc5b09..b3fa96c3d878b2a45044178d2c0cc2e6c838dd62 100644 (file)
@@ -30,8 +30,6 @@
 #ifndef SQUID_FS_UFS_UFSSWAPLOGPARSER_H
 #define SQUID_FS_UFS_UFSSWAPLOGPARSER_H
 
-#include <stdio.h>
-
 class StoreSwapLogData;
 
 namespace Fs
index b4728d01d2ae8a52fe147fd1a47960e29d176cee..dd601bcbb9c1f9bce49dacc7e5afeff03d8e1a42 100644 (file)
 #include "IoStats.h"
 #include "rfc2181.h"
 
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-
 extern char *ConfigFile;       /* NULL */
 extern char *IcpOpcodeStr[];
 extern char tmp_error_buf[ERROR_BUF_SZ];
index 995a52d8704e1eb35f74e27717565db787fbfe3e..468c69b17c2a081e6eb6637c6e15d036b44c09a5 100644 (file)
@@ -245,12 +245,13 @@ main(int argc, char *argv[])
     return 0;
 }
 
-#else
-#include <stdio.h>
+#else / * !USE_ICMP */
+
+#include <ostream>
 int
 main(int argc, char *argv[])
 {
-    fprintf(stderr, "%s: ICMP support not compiled in.\n", argv[0]);
+    std::cerr << argv[0] << ": ICMP support not compiled in." << std::endl;
     return 1;
 }
 
index 89df0ecd729bba9cb95e6e7b69e2077667fb0a2a..27fbe53a7339b4be677501f5c1963f31e1e49b03 100644 (file)
@@ -32,9 +32,7 @@
 
 #include "squid.h"
 
-#if HAVE_MATH_H
-#include <math.h>
-#endif
+#include <cmath>
 
 int
 isPowTen(int count)
index 774e21431d5affec24af6afed5ea16fcd2e52afd..1e91ea545d4f82ce904ff1b1cc2eb26e120204fc 100644 (file)
 #include "ip/tools.h"
 #include "util.h"
 
-#if HAVE_ASSERT_H
-#include <assert.h>
-#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
+#include <cassert>
+#include <cstring>
 #if HAVE_ARPA_INET_H
 /* for inet_ntoa() */
 #include <arpa/inet.h>
index 680e6e225a72e68ac56e16f501643367e0fbfc87..cd9a84a642cefcd063e9b24b8803426457815a04 100644 (file)
@@ -6,6 +6,8 @@
 #ifndef _SQUID_SRC_IP_ADDRESS_H
 #define _SQUID_SRC_IP_ADDRESS_H
 
+#include <iosfwd>
+#include <ostream>
 #if HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
 #include <netdb.h>
 #endif
 
-#if HAVE_IOSFWD
-#include <iosfwd>
-#endif
-#if HAVE_OSTREAM
-#include <ostream>
-#endif
-
 namespace Ip
 {
 
index 8e00276b642a4d5f0eb2ec39b5e330dcbd89e3e2..343916207b3eea5c975a9da5def7b2163d40e75b 100644 (file)
 #endif /* PF_TRANSPARENT required headers */
 
 #if LINUX_NETFILTER
-#if HAVE_LIMITS_H
-/* must be before including netfilter_ipv4.h */
-#include <limits.h>
-#endif
+/* <climits> must be before including netfilter_ipv4.h */
+#include <climits>
 #include <linux/if.h>
 #include <linux/netfilter_ipv4.h>
 #if HAVE_LINUX_NETFILTER_IPV6_IP6_TABLES_H
index 6922363fbf7d14d5c2c3cebf9751762d0ac3d03c..3229595acfa0ad2eb6b61ad8fe29909b87d7d729 100644 (file)
@@ -8,14 +8,10 @@
 #if HAVE_LIBNETFILTER_CONNTRACK_LIBNETFILTER_CONNTRACK_H
 #include <libnetfilter_conntrack/libnetfilter_conntrack.h>
 #endif
-
 #if HAVE_LIBNETFILTER_CONNTRACK_LIBNETFILTER_CONNTRACK_TCP_H
 #include <libnetfilter_conntrack/libnetfilter_conntrack_tcp.h>
 #endif
-
-#if HAVE_LIMITS
 #include <limits>
-#endif
 
 class fde;
 
index e8a69a0f27c73b4ea9a8228055b6c184289fa283..eb36a73c79cbf9de95f552d5ff764b4089f8ac95 100644 (file)
@@ -1,13 +1,12 @@
 #define SQUID_UNIT_TEST 1
 #include "squid.h"
-//#include "compat/getaddrinfo.h"
 #include "ip/Address.h"
 #include "ip/tools.h"
 #include "testAddress.h"
 
-#if HAVE_CSTRING
 #include <cstring>
-#endif
+#include <stdexcept>
+#include <string>
 #if HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
 #if HAVE_NETDB_H
 #include <netdb.h>
 #endif
-#if HAVE_STRING
-#include <string>
-#endif
-#if HAVE_STDEXCEPT
-#include <stdexcept>
-#endif
 
 CPPUNIT_TEST_SUITE_REGISTRATION( testIpAddress );
 
index 6b3f79ace9fc9e94641151467da49c6cdb9bf0c9..cd1f77a33deb85d91a03270622e629608b8af2ad 100644 (file)
@@ -7,10 +7,7 @@
 #include "globals.h"
 #include "ipc/Kid.h"
 
-#if HAVE_TIME_H
-#include <time.h>
-#endif
-
+#include <ctime>
 #if HAVE_SYS_WAIT_H
 #include <sys/wait.h>
 #endif
index 44055c9948df224d28e5e9ff1df0c4464f811b02..62310d527d9667a65b5732d1df88661066b85fcf 100644 (file)
@@ -12,9 +12,7 @@
 #include "ip/forward.h"
 #include "ipc/FdNotes.h"
 
-#if HAVE_IOSFWD
 #include <iosfwd>
-#endif
 
 namespace Ipc
 {
index fe201b34e52c319ed54fe84cac9719f7b84e302f..8e202dae521a39933df7f0f15b6eda68fd1de7b9 100644 (file)
@@ -8,7 +8,7 @@
 #include "ipc/TypedMsgHdr.h"
 #include "tools.h"
 
-#include <string.h>
+#include <cstring>
 
 Ipc::TypedMsgHdr::TypedMsgHdr()
 {
index e777c76c7f554c470bb85e0b860c88a4fca147e2..2a31e28cba5cfa1cd30773eb6c4c5db1f57eb372 100644 (file)
@@ -6,9 +6,7 @@
 #include "squid.h"
 #include "ipc/mem/Page.h"
 
-#if HAVE_IOSTREAM
 #include <iostream>
-#endif
 
 std::ostream &Ipc::Mem::operator <<(std::ostream &os, const PageId &page)
 {
index 0d2d481bb8d3ea63fd1e5766613814bdec4ab731..590fe3b774c47eee8a0f0bfb85fb8434778feb4a 100644 (file)
@@ -1,12 +1,7 @@
-/*
- */
-
 #ifndef SQUID_IPC_MEM_PAGE_H
 #define SQUID_IPC_MEM_PAGE_H
 
-#if HAVE_IOSFWD
 #include <iosfwd>
-#endif
 
 namespace Ipc
 {
index 750cd6e89fce9bb3a6aa7354ecd1de49a7df7036..3cfcaf57b09e306c566a3e93eac496b5a868d41e 100644 (file)
@@ -4,9 +4,7 @@
 #include "base/AsyncJob.h"
 #include "ip/Address.h"
 
-#if HAVE_LIST
 #include <list>
-#endif
 
 class MemBlob;
 typedef RefCount<MemBlob> MemBlobPointer;
index 16e6e457beb817f5f0f496e30d7fac7444a9f4df..b43ac7e43092fcf8db11c0a4e14a0afcb2a56b98 100644 (file)
 #include "Store.h"
 #include "StoreEntryStream.h"
 
-#if HAVE_IOMANIP
 #include <iomanip>
-#endif
-#if HAVE_OSTREAM
 #include <ostream>
-#endif
 
 /* forward declarations */
 static void memFree2K(void *);
@@ -635,9 +631,7 @@ Mem::PoolReport(const MemPoolStats * mp_st, const MemPoolMeter * AllMeter, std::
     MemPoolMeter *pm = mp_st->meter;
     const char *delim = "\t ";
 
-#if HAVE_IOMANIP
     stream.setf(std::ios_base::fixed);
-#endif
     stream << std::setw(20) << std::left << mp_st->label << delim;
     stream << std::setw(4) << std::right << mp_st->obj_size << delim;
 
index 0213fdbe13cf12ebe8256c25fd91a29d34e05f3c..665c8eb25c4be6dd9a6abfc66e3be937a99d3d73 100644 (file)
@@ -40,9 +40,7 @@
 #include "SquidConfig.h"
 #include "Store.h"
 
-#if HAVE_MATH_H
-#include <math.h>
-#endif
+#include <cmath>
 
 #define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
 
index 7345199a9aef53500469c8fc94acf3603d171cfe..3b043ba0f7739c2324480e68910f1e62d429399e 100644 (file)
@@ -45,9 +45,7 @@
 #include "SquidConfig.h"
 #include "Store.h"
 
-#if HAVE_MATH_H
-#include <math.h>
-#endif
+#include <cmath>
 
 #define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
 
index f803f881a1be0bfc91d8d8fb5ffa464f7bcfbb5a..00d1de03290af4d625e71a32bc03f378ac18dbac 100644 (file)
  */
 #include "squid.h"
 
-#include <stdio.h>
+#include <csignal>
+#include <cstring>
 #include <fcntl.h>
-#include <string.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <netdb.h>
 #include <unistd.h>
-#include <signal.h>
 
 #define RECV_BUF_SIZE 8192
 
index a9e95da12115074c60fef2e2c53c1d7986271fc3..3d9dc50b1fd82ed8d6821b5f02a7438b81ae8933 100644 (file)
@@ -46,9 +46,7 @@
 #include "Store.h"
 #include "store_heap_replacement.h"
 
-#if HAVE_MATH_H
-#include <math.h>
-#endif
+#include <cmath>
 
 /*
  * Key generation function to implement the LFU-DA policy (Least
index 2c08fe45f432f185c0a743444e0b5fd68f5e02f4..2be9cd235f9db84297b6c0a357c10bd4dbfd75e8 100644 (file)
@@ -10,9 +10,8 @@
 #include "snmp/Var.h"
 #include "snmp_core.h"
 #include "tools.h"
-#if HAVE_ALGORITHM
+
 #include <algorithm>
-#endif
 
 Snmp::Pdu::Pdu()
 {
index 94ecc6997dd692874162fc8a785ad368316d8048..9acccbafbf92be3ac27aeb924b17c0dbff3ea9a9 100644 (file)
@@ -9,9 +9,8 @@
 #include "ipc/TypedMsgHdr.h"
 #include "snmp/Var.h"
 #include "tools.h"
-#if HAVE_ALGORITHM
+
 #include <algorithm>
-#endif
 
 Snmp::Var::Var()
 {
index 7fb754f68fea572197a44ad3a993bee48bab9b64..da4196e7d5b6cf72f96499e15e5fb73af28cd122 100644 (file)
@@ -1,12 +1,9 @@
 #include "squid.h"
 #include "errorpage.h"
 #include "ssl/ErrorDetail.h"
-#if HAVE_MAP
-#include <map>
-#endif
-#if HAVE_CLIMITS
+
 #include <climits>
-#endif
+#include <map>
 
 struct SslErrorEntry {
     Ssl::ssl_error_t value;
index 20a18a2cafcd53cb7e497c3f9925cce081d90d42..2f2fe2818929a3f396bede874ff3797cd0121946 100644 (file)
@@ -6,12 +6,8 @@
 #include "SquidString.h"
 #include "ssl/support.h"
 
-#if HAVE_MAP
 #include <map>
-#endif
-#if HAVE_STRING
 #include <string>
-#endif
 
 class HttpRequest;
 
index f58f84db4ca96c3b20c549113e284ae580628f6b..91d3920ba4766fa2fc9666d2b0822849f9c0c4d9 100644 (file)
@@ -1,14 +1,9 @@
 #include "squid.h"
 #include "ssl/certificate_db.h"
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#if HAVE_FSTREAM
+
+#include <cerrno>
 #include <fstream>
-#endif
-#if HAVE_STDEXCEPT
 #include <stdexcept>
-#endif
 #if HAVE_SYS_STAT_H
 #include <sys/stat.h>
 #endif
index 41422fc99d3e89a835e05dbdc90db1a2b3c95c9b..a4158caf419b088565d7bd25072d6cdfe9cd9760 100644 (file)
@@ -2,12 +2,11 @@
 #define SQUID_SSL_CERTIFICATE_DB_H
 
 #include "ssl/gadgets.h"
-#if HAVE_STRING
-#include <string>
-#endif
+
 #if HAVE_OPENSSL_OPENSSLV_H
 #include <openssl/opensslv.h>
 #endif
+#include <string>
 
 namespace Ssl
 {
index ac84647e4ddb04ca8612f83a1dff93ecd0461505..020daf7d446ee9a9620d5f052f9ec7d0dab5be54 100644 (file)
@@ -3,9 +3,8 @@
 #include "ssl/context_storage.h"
 #include "Store.h"
 #include "StoreEntryStream.h"
-#if HAVE_LIMITS
+
 #include <limits>
-#endif
 #if USE_SSL
 #include <openssl/ssl.h>
 #endif
index 52f6da97dd0ffa3cf02d81c24a7a1757c707711c..0ab77378c79925d24c6d00c96a452ff3a2abbff3 100644 (file)
 #include "mgr/Command.h"
 #include "SquidTime.h"
 #include "ssl/gadgets.h"
-#if HAVE_MAP
-#include <map>
-#endif
-#if HAVE_LIST
+
 #include <list>
-#endif
+#include <map>
 #include <openssl/ssl.h>
 
 /// TODO: Replace on real size.
index f52db909daafdcc280f337ac288d46a7a3b885ea..4c5dbe4adb8a1e0dbdfb6430fb915b875c02903d 100644 (file)
@@ -1,15 +1,10 @@
 #include "squid.h"
 #include "ssl/crtd_message.h"
 #include "ssl/gadgets.h"
-#if HAVE_CSTDLIB
+
 #include <cstdlib>
-#endif
-#if HAVE_CSTRING
 #include <cstring>
-#endif
-#if HAVE_STDEXCEPT
 #include <stdexcept>
-#endif
 
 Ssl::CrtdMessage::CrtdMessage(MessageKind kind)
         :   body_size(0), state(kind == REPLY ? BEFORE_LENGTH: BEFORE_CODE)
index 747bd8e8e9edf3e8410ba6b0f7d413e8268a737c..3c4d1b689b6bdf6f0eebf669bad75f3d124b613d 100644 (file)
@@ -1,12 +1,8 @@
 #ifndef SQUID_SSL_CRTD_MESSAGE_H
 #define SQUID_SSL_CRTD_MESSAGE_H
 
-#if HAVE_STRING
-#include <string>
-#endif
-#if HAVE_MAP
 #include <map>
-#endif
+#include <string>
 
 namespace Ssl
 {
index e90ca6a0f54802edc04ed09365096363d2f1f871..d71475ea4ac94a56559adbac8c3823b71675cb90 100644 (file)
@@ -14,9 +14,7 @@
 #if HAVE_OPENSSL_TXT_DB_H
 #include <openssl/txt_db.h>
 #endif
-#if HAVE_STRING
 #include <string>
-#endif
 
 namespace Ssl
 {
index 982faf1575796c1a23f223fa2b70dc31fd4b990e..aeedc321d634b64bc91faa931add11701c45e93b 100644 (file)
@@ -3,21 +3,11 @@
 #include "ssl/certificate_db.h"
 #include "ssl/crtd_message.h"
 
-#if HAVE_CSTRING
 #include <cstring>
-#endif
-#if HAVE_SSTREAM
-#include <sstream>
-#endif
-#if HAVE_IOSTREAM
 #include <iostream>
-#endif
-#if HAVE_STDEXCEPT
+#include <sstream>
 #include <stdexcept>
-#endif
-#if HAVE_STRING
 #include <string>
-#endif
 #if HAVE_GETOPT_H
 #include <getopt.h>
 #endif
index c0933b829b5b970f43cd7d2048a90a68d488333a..ebea92f716578ce21fc1579ac5e366ccaa01a691 100644 (file)
 #if USE_DELAY_POOLS
 #include "DelayPools.h"
 #endif
-#if HAVE_LIMITS_H
-#include <limits.h>
-#endif
 
+#include <climits>
 #include <stack>
 
 #define REBUILD_TIMESTAMP_DELTA_MAX 2
index fd3c64707446a54e6020acb86fca549045de65ae..a59042ea64623e7d0f255d246c189eaad9f827c5 100644 (file)
@@ -56,9 +56,7 @@
 #include "Store.h"
 #include "StoreSearch.h"
 
-#if HAVE_MATH_H
-#include <math.h>
-#endif
+#include <cmath>
 
 /*
  * local types
index a20baa109f81706cb0ea1a749fbe057b2b0c2f6c..24a0ffdb6b0f78ad2775e1b0dc5939c1c3f808a1 100644 (file)
@@ -48,6 +48,8 @@
 #include "tools.h"
 #include "Transients.h"
 
+#include <cerrno>
+#include <climits>
 #if HAVE_STATVFS
 #if HAVE_SYS_STATVFS_H
 #include <sys/statvfs.h>
@@ -57,9 +59,6 @@
 #if HAVE_SYS_PARAM_H
 #include <sys/param.h>
 #endif
-#if HAVE_LIMITS_H
-#include <limits.h>
-#endif
 #if HAVE_SYS_MOUNT_H
 #include <sys/mount.h>
 #endif
@@ -70,9 +69,6 @@
 #if HAVE_SYS_WAIT_H
 #include <sys/wait.h>
 #endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
 
 static STDIRSELECT storeDirSelectSwapDirRoundRobin;
 static STDIRSELECT storeDirSelectSwapDirLeastLoad;
index 7756ee4557f6b872c0dc192d6a6942401353eb10..7bdacf092d814dd2b0040d10397da34d2d384ec0 100644 (file)
@@ -3,10 +3,8 @@
 
 #include "SBuf.h"
 
-#if HAVE_STRING
-#include <string>
-#endif
 #include <set>
+#include <string>
 
 /// Generates and executes a [configurable] large number of SBuf::*find()
 /// test cases using random strings. Reports detected failures.
index b141f5b43a53b4fec8c6ec4b722aac62380c287c..d345ff62a8cbc205e38bb08098855d6ade15a466 100644 (file)
@@ -5,7 +5,7 @@
 #define STUB_API "stub_HelperChildconfig.cc"
 #include "tests/STUB.h"
 
-#include <string.h>
+#include <cstring>
 
 HelperChildConfig::HelperChildConfig(const unsigned int m):
         n_max(m),
index 4634aba62452a2c88114f95a87b66e64f9670b53..44d083611449f77c65d563dd6d9b19a87b7f5908 100644 (file)
@@ -8,10 +8,6 @@
 #include "squid.h"
 #include "Debug.h"
 
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-
 FILE *debug_log = NULL;
 int Debug::TheDepth = 0;
 
index eb6e8b11d57561a687621bf6a3230803f2c21903..4e84cb3e9053fff049c808873f625508b18eeece 100644 (file)
@@ -34,9 +34,8 @@
 #include "MemBuf.h"
 #include "store_rebuild.h"
 #include "SwapDir.h"
-#if HAVE_STRING_H
-#include <string.h>
-#endif
+
+#include <cstring>
 
 #define STUB_API "stub_store_rebuild.cc"
 #include "tests/STUB.h"
index 542aa5c813a9b2d8d2a27dcc97a97a7f0776a64f..e9e489071b3d9376ab94ddf7fdb2d49048c3b029 100644 (file)
@@ -1,5 +1,4 @@
 #define SQUID_UNIT_TEST 1
-
 #include "squid.h"
 
 #if USE_AUTH
@@ -8,9 +7,7 @@
 #include "ConfigParser.h"
 #include "testACLMaxUserIP.h"
 
-#if HAVE_STDEXCEPT
 #include <stdexcept>
-#endif
 
 CPPUNIT_TEST_SUITE_REGISTRATION( testACLMaxUserIP );
 
index c7358fefaf6cb79e58181cf90aeeb4957028b130..05272830c37fdb91412b396a7eaaad4ca356c137 100644 (file)
@@ -166,9 +166,7 @@ testAuthConfig::create()
     }
 }
 
-#if HAVE_IOSTREAM
 #include <iostream>
-#endif
 
 /* AuthUserRequest::scheme returns the correct scheme for all
  * authentication types
index dc9f45ef959407b4db4822cecf0c5c99840b0816..9a4887ddc657968463be68cfc7cecdc8a78a0b97 100644 (file)
@@ -1,11 +1,9 @@
 #define SQUID_UNIT_TEST 1
-
 #include "squid.h"
+
 #include "testBoilerplate.h"
 
-#if HAVE_STDEXCEPT
 #include <stdexcept>
-#endif
 
 CPPUNIT_TEST_SUITE_REGISTRATION( testBoilerplate );
 
index 2325937201e5e3ae7e0ab1c7b7a0888d689a62f6..7e66977d4f025e5ea413d42f949587d6d5d4ee6c 100644 (file)
@@ -1,6 +1,6 @@
 #define SQUID_UNIT_TEST 1
-
 #include "squid.h"
+
 #include "DiskIO/DiskIOModule.h"
 #include "HttpHeader.h"
 #include "HttpReply.h"
@@ -12,9 +12,7 @@
 #include "testDiskIO.h"
 #include "testStoreSupport.h"
 
-#if HAVE_STDEXCEPT
 #include <stdexcept>
-#endif
 
 CPPUNIT_TEST_SUITE_REGISTRATION( testDiskIO );
 
index b90099422d909d5bdd16d1642b00533e4ff79c20..bb873b830b1003eb451cf91ef1802d880d8893da 100644 (file)
@@ -8,9 +8,7 @@
 #include "SquidConfig.h"
 #include "testHttpRequestMethod.h"
 
-#if HAVE_SSTREAM
 #include <sstream>
-#endif
 
 CPPUNIT_TEST_SUITE_REGISTRATION( testHttpRequestMethod );
 
index da9b757cd53be3961268b2d1c9ae7c8072539e77..c823c5a546f5d61fc6b99be3fabe8cce974e319c 100644 (file)
 #include "testRock.h"
 #include "testStoreSupport.h"
 
+#include <stdexcept>
 #if HAVE_SYS_STAT_H
 #include <sys/stat.h>
 #endif
-#if HAVE_STDEXCEPT
-#include <stdexcept>
-#endif
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
index 2b2a6372ba3fa0b5ed17d77092029ebd80bbf0bf..7f83f9be683ff713a3c2debeadcdc8dd137ea09c 100644 (file)
@@ -8,10 +8,7 @@
 #include "testStore.h"
 #include "testStoreEntryStream.h"
 
-#if HAVE_IOMANIP
 #include <iomanip>
-#endif
-
 #include <cppunit/TestAssert.h>
 
 CPPUNIT_TEST_SUITE_REGISTRATION( testStoreEntryStream );
index cb6649a359ef8f92052d1907c869c960d0e3cf4d..efa295c3fd56685e8aeb16fa142835468e92a59b 100644 (file)
@@ -7,9 +7,7 @@
 #include "testURL.h"
 #include "URL.h"
 
-#if HAVE_SSTREAM
 #include <sstream>
-#endif
 
 CPPUNIT_TEST_SUITE_REGISTRATION( testURL );
 
index 84c89fa393d322e81bf5bbd5ffd099d7ab2ac21e..e850076c1e5b7da28ce405a8ca6b72aa4ae43832 100644 (file)
@@ -15,9 +15,7 @@
 #include "testStoreSupport.h"
 #include "testUfs.h"
 
-#if HAVE_STDEXCEPT
 #include <stdexcept>
-#endif
 
 #define TESTDIR "testUfs_Store"
 
index 680f0accc259f6a5d3510e2a6061a5b9de922d8f..3877f548baa452d0cbe2272f251fe38ed6c70d4c 100644 (file)
@@ -9,9 +9,7 @@
 #include "SquidString.h"
 #include "tests/testUriScheme.h"
 
-#if HAVE_SSTREAM
 #include <sstream>
-#endif
 
 CPPUNIT_TEST_SUITE_REGISTRATION( testUriScheme );
 
index 3e2257e457b9d3e34da60d7ef35f8eaa28c3e2bc..6f9aecd3b4efdf98fc11bb3c3ccce5a7f0fce24c 100644 (file)
 #include "DelayId.h"
 #endif
 
-#if HAVE_LIMITS_H
-#include <limits.h>
-#endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
+#include <climits>
+#include <cerrno>
 
 /**
  * TunnelStateData is the state engine performing the tasks for
index b9f0276db95bd704435e1258662e1048f17b4f07..dc5fedffdeabec39c5086a1c16623867f8c09f55 100644 (file)
 #undef malloc
 #undef free
 
-#if HAVE_STDEXCEPT
-#include <stdexcept>
-#endif
-#if HAVE_IOSTREAM
-#include <iostream>
-#endif
-#if HAVE_CASSERT
 #include <cassert>
-#endif
+#include <iostream>
+#include <stdexcept>
 
 /* stub functions for parts of squid not factored to be dynamic yet */
 void
index 1c2ac5a906d0520ee6526898c94e5bcd6e8ebc26..7f91c8063b61827889494e9f99079f655172a5cb 100644 (file)
@@ -36,9 +36,7 @@
 
 #include "MemPool.h"
 
-#if HAVE_IOSTREAM
 #include <iostream>
-#endif
 
 /* TODO: put this in a libTest */
 void
index e967d931988e1ca5e075366a6f8736e04ebfc40d..7d9118b68d2bb000243e37804bfd790bd6dad8ea 100644 (file)
@@ -33,9 +33,7 @@
 
 #include "squid.h"
 
-#if HAVE_IOSTREAM
 #include <iostream>
-#endif
 
 class CallCounter
 {
index c0be0b7f89b660a1bc0cd50c3e8087f18fa61ae7..3d0531bab71671f4d96ad85bf4c33b235fe43d0e 100644 (file)
@@ -35,9 +35,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
 #if HAVE_CTYPE_H
 #include <ctype.h>
 #endif
index 4b5bc367381a5493f3b182415744b42cc72c1b81..77272a45feed811359bcadb5a643e4e8a953f0b6 100644 (file)
 #include "mem_node.h"
 #include "stmem.h"
 
-#if HAVE_IOSTREAM
 #include <iostream>
-#endif
-#if HAVE_SSTREAM
 #include <sstream>
-#endif
 
 /*For  a reason required on some platforms */
 unsigned int TextException::FileNameHash(const char *fname)
index 59f87833c53ac30f157c3411c8063ac3d2064143..7e7daca27b8a170992cab1432f5bb78655a85abc 100644 (file)
@@ -34,9 +34,7 @@
 #include "squid.h"
 #include "mem_node.h"
 
-#if HAVE_IOSTREAM
 #include <iostream>
-#endif
 
 /* TODO: put this in a libTest */
 void
index d35410a0eceb39eff905ddbff6a3c898666984d3..ad826bcedc695f3dcc51b3886bb4ac8db2a29dc1 100644 (file)
@@ -4,9 +4,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
 #if HAVE_CTYPE_H
 #include <ctype.h>
 #endif
index 3551ef104630ae4e4d48b3640d1a9dc91062cc5d..556e205413780eff5c6df245cf03e0422d95a932 100644 (file)
@@ -4,9 +4,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
 #if HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
index 69b8119a6fddada89a8c42577139576af62374f2..d54cf4958554da92d2cca5e04dc20e967a342649 100644 (file)
@@ -5,12 +5,7 @@
 
 #include "squid.h"
 
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
+#include <cstdlib>
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
index f6f06ba783489ecd949f6dfced706ce21f15ff75..7986c69e2b6e0f98a095e9473dd39f2454bc7209 100644 (file)
@@ -35,9 +35,7 @@
 #include "mem_node.h"
 #include "stmem.h"
 
-#if HAVE_IOSTREAM
 #include <iostream>
-#endif
 
 class HasExplicit
 {
index c43d50b6b34b18391f05b5e9b7a0afffdc2ec17e..54d52decd39c21e58ed14224e2b5250bbd36df20 100644 (file)
@@ -34,9 +34,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
 #if HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
index 1fec98e47a44a575f0b992b482712c900582208a..ef5cc411dd983de4791f3ee22e55aee0b385e68e 100644 (file)
@@ -34,9 +34,6 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
 #if HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
index 63515a7f9a5c8c78617545afbd3b3fb1d7ef8f89..d5b998ee3d06927a49abcb644d6e2120baecb0a2 100644 (file)
 #include "rfc1738.h"
 #include "util.h"
 
+#include <cctype>
+#include <cerrno>
+#include <csignal>
+#include <cstring>
+#include <ctime>
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#if HAVE_CTYPE_H
-#include <ctype.h>
-#endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
 #if HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
 #if HAVE_PWD_H
 #include <pwd.h>
 #endif
-#if HAVE_SIGNAL_H
-#include <signal.h>
-#endif
-#if HAVE_TIME_H
-#include <time.h>
-#endif
 #if HAVE_SYS_PARAM_H
 #include <sys/param.h>
 #endif
 #if HAVE_LIBC_H
 #include <libc.h>
 #endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
 #if HAVE_STRINGS_H
 #include <strings.h>
 #endif
index 69da160da05e42b44ffae15a9e95923c88134ba5..7c4116156d8a7f6b2857a971da20bc99a306e5ed 100644 (file)
 //
 //
 #include "conffile.hh"
+
+#include <cerrno>
+#include <cstdlib>
+#include <cstring>
+#include <fstream>
 #include <sys/types.h>
-#include <errno.h>
 #include <memory.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <fstream>
 
 int
 readConfigFile( CacheDirVector& cachedir, const char* fn, FILE* debug )
index a37ae88d4f306c5f4b4eab181e1a864de27abea2..f34bf7168b08da48482b43eb349bfdd20e2cbc5c 100644 (file)
@@ -52,7 +52,6 @@ typedef int bool;
 #define DEFAULT_SQUID_CONF "/usr/local/squid/etc/squid.conf"
 #endif
 
-#include <stdio.h>
 #include <vector>
 
 struct CacheDir {
index 2d0df6fc5fb4b0752e2d0a6191fdbfadf4238472..a2cf4fe378164ed55221307b3fc7258805432ce3 100644 (file)
 //
 
 #include "convert.hh"
-#include <string.h>
+
+#include <cstdlib>
+#include <cstring>
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <netdb.h>
-#include <stdlib.h>
-#include <stdio.h>
 
 #ifndef SA
 #define SA struct sockaddr
index a6f00cfb61dd489a8bbe716e500d872c89340442..a8d62571a775494c6342cb5fc691e893caf4a0c2 100644 (file)
 #include "squid.h"
 #include "copyout.hh"
 
-//#include <assert.h>
-//#include <sys/types.h>
 #include <sys/stat.h>
-#include <stdio.h>
-#include <string.h>
+#include <cerrno>
+#include <cstring>
 #include <fcntl.h>
-#include <errno.h>
 #include <unistd.h>
 #include <sys/mman.h>
 
index 558379e1ba9a46bcddf929956e40faa6532356db..039a906c161e863c131634d97fc8bcdc929fad96 100644 (file)
 #include "squid.h"
 #include "util.h"
 
-#include <stdarg.h>
-#include <stdio.h>
+#include <cerrno>
+#include <climits>
+#include <csignal>
+#include <cstdarg>
+#include <cstdlib>
+#include <cstring>
 #include <dirent.h>
-#include <string.h>
 #include <sys/stat.h>
 #include <sys/wait.h>
 #include <fcntl.h>
 #include <unistd.h>
-#include <stdlib.h>
-#include <limits.h>
-#include <signal.h>
-#include <errno.h>
 
 #if HAVE_SIGINFO_H
 #include <siginfo.h>
index 4f6906c2eb218ec20138c1ef30ec35906c01d05b..4672d9265d0aa57b4a6013251dd4ff5f64634331 100644 (file)
 #include "squid.h"
 #include "signal.hh"
 
-//#include <sys/types.h>
-#include <errno.h>
-#include <string.h>
+#include <cerrno>
+#include <cstring>
 #include <memory.h>
-#include <stdio.h>
 #include <unistd.h>
 #include <sys/wait.h>
-//#include <signal.h>
 
 SigFunc*
 Signal( int signo, SigFunc* newhandler, bool doInterrupt )
index 1e021cbfe70d3bfa49ca54cd84ef2e4c54c73932..f43557b575f4f8156b707736b572223be763dc0f 100644 (file)
@@ -50,9 +50,7 @@
 
 #include "squid.h"
 
-#if HAVE_SIGNAL_H
-#include <signal.h>
-#endif
+#include <csignal>
 
 #if !defined(__cplusplus)
 #ifndef HAVE_BOOL
index 5a25997ec58073eedb61e7351916feeb301635c9..9450edd8918ad0ec366a29e60c8d5afdf211c088 100644 (file)
 //
 //
 #include "socket.hh"
+
+#include <cerrno>
+#include <cstring>
 #include <netinet/tcp.h>
 #include <arpa/inet.h>
 #include <netdb.h>
 
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
 #include <unistd.h>
 
 #include "convert.hh"
index 7225f11a53eee4ba8a11eeb7a64eb7a0c915d71b..bf3d41d518f11056c06943b200c681f0fbaaa4c1 100644 (file)
@@ -33,7 +33,6 @@
 //
 //
 #include "squid.h"
-//#include <assert.h>
 #include "squid-tlv.hh"
 
 SquidTLV::SquidTLV( SquidMetaType _type, size_t _size, void* _data )
index dfcdbe851ce706a33bc2f7c44fffb25e2abebdd6..9a3f43b6d6ddc99f0f9db5b01ea3da35531d3399 100644 (file)
@@ -44,28 +44,22 @@ using namespace Squid;
 /** \endcond */
 #endif
 
+#include <cerrno>
 #include <csignal>
-#include <cstdio>
+#include <cstring>
 #include <iostream>
-
 #if _SQUID_WINDOWS_
 #include <io.h>
 #endif
 #if HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
 #if HAVE_NETDB_H
 #include <netdb.h>
 #endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
 #if HAVE_SYS_STAT_H
 #include <sys/stat.h>
 #endif