#include "compat/xalloc.h"
#include "compat/xstring.h"
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
+#include <cerrno>
char *
xstrdup(const char *s)
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
+#include <cerrno>
bool
xstrtoul(const char *s, char **end, unsigned long *value,
#ifdef HAVE_LDAP
#include "support.h"
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif
+#include <cerrno>
char *convert_domain_to_bind_path(char *domain);
char *escape_filter(char *filter);
#ifdef HAVE_LDAP
#include "support.h"
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif
+#include <cerrno>
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
#include "DiskIO/WriteRequest.h"
#include "globals.h"
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
+#include <cerrno>
CBDATA_CLASS_INIT(AIODiskFile);
#include "StatCounters.h"
#include "win32.h"
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
+#include <cerrno>
#if _SQUID_WINDOWS_
VOID CALLBACK IoCompletionRoutine(DWORD dwErrorCode,
#include "DiskIO/WriteRequest.h"
#include "globals.h"
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
+#include <cerrno>
CBDATA_CLASS_INIT(BlockingFile);
#include "Store.h"
#include "unlinkd.h"
+#include <cerrno>
#if HAVE_SYS_IPC_H
#include <sys/ipc.h>
#endif
#if HAVE_SYS_SHM_H
#include <sys/shm.h>
#endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
diskd_stats_t diskd_stats;
#include "StatCounters.h"
#include "Store.h"
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
+#include <cerrno>
/* === PUBLIC =========================================================== */
#include "SquidTime.h"
#include "Store.h"
+#include <cerrno>
#include <csignal>
#include <sys/stat.h>
#include <fcntl.h>
#include <pthread.h>
-#include <errno.h>
#include <dirent.h>
#if HAVE_SCHED_H
#include <sched.h>
#include "SquidTime.h"
#include "Store.h"
+#include <cerrno>
#include <csignal>
#include <sys/stat.h>
#include <fcntl.h>
-#include <errno.h>
#include <dirent.h>
#define RIDICULOUS_LENGTH 4096
#include "StatCounters.h"
#include "tools.h"
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
+#include <cerrno>
+
CBDATA_CLASS_INIT(IpcIoFile);
/// shared memory segment path to use for IpcIoFile maps
#include "DiskIO/WriteRequest.h"
#include "globals.h"
+#include <cerrno>
#if HAVE_SYS_MMAN_H
#include <sys/mman.h>
#endif
#if HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
// Some systems such as Hurd provide mmap() API but do not support MAP_NORESERVE
#ifndef MAP_NORESERVE
#include "ssl/ServerBump.h"
#include "ssl/support.h"
#endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
+
+#include <cerrno>
static PSC fwdPeerSelectionCompleteWrapper;
static CLCB fwdServerClosedWrapper;
#endif
#include <algorithm>
+#include <cerrno>
#include <string>
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
static void httpHeaderPutStrvf(HttpHeader * hdr, http_hdr_type id, const char *fmt, va_list vargs);
*/
#include "squid.h"
-
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
+#include <cerrno>
typedef struct {
const char *name;
#include "SquidConfig.h"
#include "SquidTime.h"
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
+#include <cerrno>
class CachePeer;
#define DEBUG_EPOLL 0
+#include <cerrno>
#if HAVE_SYS_EPOLL_H
#include <sys/epoll.h>
#endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
static int kdpfd;
static int max_poll_time = 1000;
#include "StatCounters.h"
#include "Store.h"
+#include <cerrno>
#if HAVE_SYS_EVENT_H
#include <sys/event.h>
#endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
#define KE_LENGTH 128
#include "StatCounters.h"
#include "Store.h"
+#include <cerrno>
#if HAVE_POLL_H
#include <poll.h>
#endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
/* Needed for poll() on Linux at least */
#if USE_POLL
#include "StatHist.h"
#include "Store.h"
+#include <cerrno>
#if HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
static int MAX_POLL_TIME = 1000; /* see also Comm::QuickPollRequired() */
#include "StatHist.h"
#include "Store.h"
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
+#include <cerrno>
static int MAX_POLL_TIME = 1000; /* see also Comm::QuickPollRequired() */
#include "SquidTime.h"
#include "StatCounters.h"
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
+#include <cerrno>
#ifdef HAVE_NETINET_TCP_H
// required for accept_filter to build.
#include <netinet/tcp.h>
#include "profiler/Profiler.h"
#include "StatCounters.h"
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
+#include <cerrno>
static PF diskHandleRead;
static PF diskHandleWrite;
#if HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif
+#include <cerrno>
#if HAVE_RESOLV_H
#include <resolv.h>
#endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
#if _SQUID_WINDOWS_
#define REG_TCPIP_PARA_INTERFACES "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Interfaces"
#include "globals.h"
#include "ip/Address.h"
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
+#include <cerrno>
/* START Legacy includes pattern */
/* TODO: clean this up so we dont have per-OS requirements.
#include "tools.h"
#include "typedefs.h"
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
+#include <cerrno>
CBDATA_NAMESPACED_CLASS_INIT(Rock, Rebuild);
#include "MemObject.h"
#endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
+#include <cerrno>
/**
\defgroup ServerProtocolFTPInternal Server-Side FTP Internals
#include "IcmpPinger.h"
#include "SquidTime.h"
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
+#include <cerrno>
IcmpPinger::IcmpPinger() : Icmp()
{
#include "SquidIpc.h"
#include "SquidTime.h"
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
+#include <cerrno>
// Instance global to be available in main() and elsewhere.
IcmpSquid icmpEngine;
#include "tools.h"
#include "wordlist.h"
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
+#include <cerrno>
static void icpIncomingConnectionOpened(const Comm::ConnectionPointer &conn, int errNo);
#include "ip/Intercept.h"
#include "src/tools.h"
+#include <cerrno>
+
#if IPF_TRANSPARENT
#if HAVE_SYS_IOCTL_H
#elif HAVE_NETINET_IP_NAT_H
#include <netinet/ip_nat.h>
#endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
#endif /* IPF_TRANSPARENT required headers */
#include "ip/tools.h"
#include "Parsing.h"
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
-
-/* Qos namespace */
+#include <cerrno>
void
Ip::Qos::getTosFromServer(const Comm::ConnectionPointer &server, fde *clientFde)
#include "snmp/Request.h"
#include "snmp/Response.h"
#endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
+
+#include <cerrno>
CBDATA_NAMESPACED_CLASS_INIT(Ipc, Coordinator);
Ipc::Coordinator* Ipc::Coordinator::TheInstance = NULL;
#include "ipc/StartListening.h"
#include "tools.h"
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
+#include <cerrno>
Ipc::StartListeningCb::StartListeningCb(): conn(NULL), errNo(0)
{
#include "SquidTime.h"
#include "tools.h"
+#include <cerrno>
#ifndef _MSWSOCK_
#include <mswsock.h>
#endif
#include <process.h>
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
struct ipc_params {
int type;
#include "SquidIpc.h"
#include "SquidTime.h"
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
+#include <cerrno>
/* How many buffers to keep before we say we've buffered too much */
#define LOGFILE_MAXBUFS 128
#include "log/ModStdio.h"
#include "SquidConfig.h"
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
+#include <cerrno>
typedef struct {
int fd;
#include "Parsing.h"
#include "SquidConfig.h"
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
+#include <cerrno>
/*
* This logfile UDP module is mostly inspired by a patch by Tim Starling
#include "snmp_core.h"
#endif
+#include <cerrno>
#if HAVE_PATHS_H
#include <paths.h>
#endif
#if HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
#if USE_WIN32_SERVICE
#include <process.h>
#include "squid.h"
#include "parser/Tokenizer.h"
+#include <cerrno>
#if HAVE_CTYPE_H
#include <ctype.h>
#endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
#if HAVE_STDINT_H
#include <stdint.h>
#endif
#include "ssl/support.h"
#include "URL.h"
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
+#include <cerrno>
static void setSessionCallbacks(SSL_CTX *ctx);
Ipc::MemMap *SslSessionCache = NULL;
#include "StoreSearch.h"
#include "SwapDir.h"
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
+#include <cerrno>
+
static StoreRebuildData counts;
static struct timeval rebuild_start;
#include "CacheDigest.h"
#include "store_key_md5.h"
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
+#include <cerrno>
typedef struct {
int query_count;
#include "tools.h"
#include "wordlist.h"
+#include <cerrno>
#if HAVE_SYS_PRCTL_H
#include <sys/prctl.h>
#endif
#if HAVE_GRP_H
#include <grp.h>
#endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
#define DEAD_MSG "\
The Squid Cache (version %s) died.\n\
#include "Store.h"
#include "tools.h"
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
+#include <cerrno>
#define WHOIS_PORT 43