#ifndef SQUID_COMPAT_CPU_H
#define SQUID_COMPAT_CPU_H
-#if HAVE_ERRNO_H
-#include <errno.h> /* for ENOTSUP */
-#endif
+#include <cerrno>
+
#if HAVE_SCHED_H
#include <sched.h>
#endif
#undef _POSIX_C_SOURCE
#undef _XOPEN_SOURCE
-#if HAVE_STRING_H
-#include <string.h>
-#endif
-#if HAVE_CTYPE_H
-#include <ctype.h>
-#endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
+#include <cstring>
+#include <cctype>
+#include <cerrno>
#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#if HAVE_RESOLV_H
#include <resolv.h>
#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
-#if HAVE_STDDEF_H
-#include <stddef.h>
-#endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#if HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
+#include <cstring>
+#include <cstddef>
+#include <cerrno>
+#include <cinttypes>
#if _SQUID_WINDOWS_
#undef IN_ADDR
#include <arpa/nameser.h>
#endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
+#include <cerrno>
+#include <cstring>
#if ! defined(NS_INADDRSZ)
#define NS_INADDRSZ 4
#if HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
+#include <cstring>
+#include <cerrno>
#if ! defined(NS_INADDRSZ)
#define NS_INADDRSZ 4
#else /* HAVE_SHM */
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
+#include <cerrno>
extern "C" {
#ifndef _SQUID_COMPAT_XIS_H
#define _SQUID_COMPAT_XIS_H
-#if HAVE_CTYPE_H
-#include <ctype.h>
-#endif
-
#if __cplusplus
+#include <cctype>
+
#define xisspace(x) isspace(static_cast<unsigned char>(x))
#define xtoupper(x) toupper(static_cast<unsigned char>(x))
#define xtolower(x) tolower(static_cast<unsigned char>(x))
#define xisgraph(x) isgraph(static_cast<unsigned char>(x))
#else /* ! __cplusplus */
+
+#if HAVE_CTYPE_H
+#include <ctype.h>
+#endif
+
#define xisspace(x) isspace((unsigned char)x)
#define xtoupper(x) toupper((unsigned char)x)
#define xtolower(x) tolower((unsigned char)x)
/* C++ bindings */
#else
+#include <cctype>
#include <sys/types.h>
#include <utility>
-#include <ctype.h>
/* TODO: parameterize this to be more generic -
* i.e. M-ary internal node sizes etc
#ifndef SQUID_LIBNTLMAUTH_SUPPORT_BITS_CCI
#define SQUID_LIBNTLMAUTH_SUPPORT_BITS_CCI
-#if HAVE_STRING_H
-#include <string.h>
-#endif
+#include <cstring>
/*
* Defines several functions which are used and mutually shared by the NTLM helpers
#include "include/util.h"
#if _SQUID_CYGWIN_
-#include <wchar.h>
+#include <cwchar>
int _wcsicmp(const wchar_t *, const wchar_t *);
#endif
#include "util.h"
#if _SQUID_CYGWIN_
-#include <wchar.h>
+#include <cwchar>
int _wcsicmp(const wchar_t *, const wchar_t *);
#endif
#endif
#if _SQUID_CYGWIN_
-#include <wchar.h>
+#include <cwchar>
#endif
#include "auth/basic/SSPI/valid.h"
#include <ldap.h>
#endif
-#include <wchar.h>
#include "edir_ldapext.h"
+#include <cwchar>
#define NMASLDAP_GET_LOGIN_CONFIG_REQUEST "2.16.840.1.113719.1.39.42.100.3"
#define NMASLDAP_GET_LOGIN_CONFIG_RESPONSE "2.16.840.1.113719.1.39.42.100.4"
#include "sspwin32.h"
#include "util.h"
-#include <windows.h>
-#include <sspi.h>
-#include <security.h>
+#include <cctype>
#if HAVE_GETOPT_H
#include <getopt.h>
#endif
-#if HAVE_CTYPE_H
-#include <ctype.h>
-#endif
+#include <security.h>
+#include <sspi.h>
+#include <windows.h>
int Negotiate_packet_debug_enabled = 0;
static int have_serverblob;
#include "sspwin32.h"
#include "util.h"
-#include <windows.h>
+#include <cctype>
+#include <lm.h>
+#include <ntsecapi.h>
#include <sspi.h>
#include <security.h>
-#if HAVE_CTYPE_H
-#include <ctype.h>
-#endif
#if HAVE_GETOPT_H
#include <getopt.h>
#endif
-#include <lm.h>
-#include <ntsecapi.h>
+#include <windows.h>
int NTLM_packet_debug_enabled = 0;
static int have_challenge;
#include "dns/rfc2671.h"
#include "util.h"
-#if HAVE_STRING_H
-#include <string.h>
-#endif
+#include <cassert>
+#include <cstring>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#if HAVE_MEMORY_H
#include <memory.h>
#endif
-#if HAVE_ASSERT_H
-#include <assert.h>
-#endif
#if HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#if HAVE_MEMORY_H
#include <memory.h>
#endif
-#if HAVE_ASSERT_H
-#include <assert.h>
-#endif
+#include <cassert>
#if HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
*/
#include <unistd.h>
-#include <string.h>
-#include <ctype.h>
+#include <cstring>
+#include <cctype>
#define ACCESS_LOCAL_DIR "/var/lib/httpd/htdocs/local/rredir"
#define REDIRECT_TO_URL "http://www.hacom.nl/local/rredir"
#include "parser/Tokenizer.h"
#include "sbuf/Stream.h"
+#include <cctype>
#include <cerrno>
-#if HAVE_CTYPE_H
-#include <ctype.h>
-#endif
/// convenience method: consumes up to n bytes, counts, and returns them
SBuf
#include "squid.h"
#include "time/gadgets.h"
-#if HAVE_STRING_H
-#include <string.h>
-#endif
-#if HAVE_CTYPE_H
-#include <ctype.h>
-#endif
+#include <cctype>
+#include <cstring>
#define ASCII_DIGIT(c) ((c)-48)
* 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_STRING_H
-#include <string.h>
-#endif
-#if HAVE_CTYPE_H
-#include <ctype.h>
-#endif
-#if HAVE_TIME_H
-#include <time.h>
-#endif
+#include <cctype>
+#include <cstring>
+#include <ctime>
#define RFC850_STRFTIME "%A, %d-%b-%y %H:%M:%S GMT"
#define RFC1123_STRFTIME "%a, %d %b %Y %H:%M:%S GMT"
#endif
#endif /* __cplusplus */
+#include <ctime>
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/inet.h>
-#include <time.h>
// taken from Squid-2.x
// NOTE! We must preserve the order of this list!