/*
* Syslog facility on AIX requires some portability wrappers
*/
-#ifdef HAVE_SYSLOG_H
+#if HAVE_SYSLOG_H
#define _XOPEN_EXTENDED_SOURCE
#define _XOPEN_SOURCE_EXTENDED 1
#endif
long f_spare[6]; /* spare for later */
};
-#ifndef HAVE_GETTIMEOFDAY
+#if !HAVE_GETTIMEOFDAY
struct timezone {
int tz_minuteswest; /* minutes west of Greenwich */
int tz_dsttime; /* type of dst correction */
/*
* Don't allow inclusion of malloc.h
*/
-#ifdef HAVE_MALLOC_H
+#if HAVE_MALLOC_H
#undef HAVE_MALLOC_H
#endif
* header files.
*/
#if defined(i386) || defined(__i386)
-#ifndef HAVE_PAD128_T
+#if !HAVE_PAD128_T
typedef union {
long double _q;
int32_t _l[4];
} pad128_t;
#endif
-#ifndef HAVE_UPAD128_T
+#if !HAVE_UPAD128_T
typedef union {
long double _q;
uint32_t _l[4];
#endif
/* Make sure syslog goes after stdarg/varargs */
-#ifdef HAVE_SYSLOG_H
+#if HAVE_SYSLOG_H
#include <syslog.h>
#endif
#include "rfc1738.h"
#include "util.h"
-#ifdef HAVE_SASL_SASL_H
+#if HAVE_SASL_SASL_H
#include <sasl/sasl.h>
#else
#include <sasl.h>
#if HAVE_CTYPE_H
#include <ctype.h>
#endif
-#ifdef HAVE_STRING_H
+#if HAVE_STRING_H
#include <string.h>
#endif
#if HAVE_GETOPT_H
#if HAVE_CTYPE_H
#include <ctype.h>
#endif
-#ifdef HAVE_STRING_H
+#if HAVE_STRING_H
#include <string.h>
#endif
#if HAVE_GETOPT_H
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
*/
-#ifdef HAVE_CONFIG_H
+#if HAVE_CONFIG_H
#include "config.h"
#endif
return buf;
}
-#ifdef HAVE_SPNEGO
+#if HAVE_SPNEGO
#ifndef gss_mech_spnego
static gss_OID_desc _gss_mech_spnego = { 6, (void *) "\x2b\x06\x01\x05\x05\x02" };
gss_OID gss_mech_spnego = &_gss_mech_spnego;
major_status = gss_init_sec_context(&minor_status,
GSS_C_NO_CREDENTIAL, &gss_context, server_name,
-#ifdef HAVE_SPNEGO
+#if HAVE_SPNEGO
gss_mech_spnego,
#else
0,
#if HAVE_STDLIB_H
#include <stdlib.h>
#endif /* HAVE_STDLIB_H */
-#ifdef HAVE_UNISTD_H
+#if HAVE_UNISTD_H
#include <unistd.h>
#endif
int SMB_Logon_Server(SMB_Handle_Type Con_Handle, char *UserName, char *PassWord, char *Domain, int precrypted);
#endif
-#ifdef DEBUG
+#if DEBUG
#define debug_dump_ntlmssp_flags dump_ntlmssp_flags
#else /* DEBUG */
#define debug_dump_ntlmssp_flags(X) /* empty */
#if HAVE_GETOPT_H
#include <getopt.h>
#endif
-#ifdef HAVE_STRING_H
+#if HAVE_STRING_H
#include <string.h>
#endif
-#ifdef HAVE_CTYPE_H
+#if HAVE_CTYPE_H
#include <ctype.h>
#endif
-#ifdef HAVE_UNISTD_H
+#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#ifdef HAVE_ASSERT_H
+#if HAVE_ASSERT_H
#include <assert.h>
#endif
void manage_request(void);
-#ifdef DEBUG
+#if DEBUG
char error_messages_buffer[BUFFER_SIZE];
#endif
char load_balance = 0, protocol_pedantic = 0;
-#ifdef NTLM_FAIL_OPEN
+#if NTLM_FAIL_OPEN
char last_ditch_enabled = 0;
#endif
void
send_bh_or_ld(char const *bhmessage, ntlm_authenticate * failedauth, int authlen)
{
-#ifdef NTLM_FAIL_OPEN
+#if NTLM_FAIL_OPEN
char *creds = NULL;
if (last_ditch_enabled) {
creds = fetch_credentials(failedauth, authlen);
} else {
#endif
SEND2("BH %s", bhmessage);
-#ifdef NTLM_FAIL_OPEN
+#if NTLM_FAIL_OPEN
}
#endif
}
fprintf(stderr,
"WARNING. The -f flag is DEPRECATED and always active.\n");
break;
-#ifdef NTLM_FAIL_OPEN
+#if NTLM_FAIL_OPEN
case 'l':
last_ditch_enabled = 1;
break;
main(int argc, char *argv[])
{
debug("ntlm_auth build " __DATE__ ", " __TIME__ " starting up...\n");
-#ifdef DEBUG
+#if DEBUG
debug("changing dir to /tmp\n");
if (chdir("/tmp") != 0) {
debug("ERROR: (%d) failed.\n",errno);
/* Typedefs for missing entries on a system */
/* int8_t */
-#ifndef HAVE_INT8_T
+#if !HAVE_INT8_T
#if HAVE_CHAR && SIZEOF_CHAR == 1
typedef char int8_t;
#else
#endif
/* u_int8_t */
-#ifndef HAVE_U_INT8_T
+#if !HAVE_U_INT8_T
#if HAVE_UINT8_T
typedef uint8_t u_int8_t;
#else
#endif
/* int16_t */
-#ifndef HAVE_INT16_T
+#if !HAVE_INT16_T
#if HAVE_SHORT && SIZEOF_SHORT == 2
typedef short int16_t;
#elif HAVE_INT && SIZEOF_INT == 2
#endif
/* u_int16_t */
-#ifndef HAVE_U_INT16_T
+#if !HAVE_U_INT16_T
#if HAVE_UINT16_T
typedef uint16_t u_int16_t;
#else
#endif
/* int32_t */
-#ifndef HAVE_INT32_T
+#if !HAVE_INT32_T
#if HAVE_INT && SIZEOF_INT == 4
typedef int int32_t;
#elif HAVE_LONG && SIZEOF_LONG == 4
#endif
/* u_int32_t */
-#ifndef HAVE_U_INT32_T
+#if !HAVE_U_INT32_T
#if HAVE_UINT32_T
typedef uint32_t u_int32_t;
#else
#endif
/* int64_t */
-#ifndef HAVE_INT64_T
+#if !HAVE_INT64_T
#if HAVE___INT64
typedef __int64 int64_t;
#elif HAVE_LONG && SIZEOF_LONG == 8
#endif
/* u_int64_t */
-#ifndef HAVE_U_INT64_T
+#if !HAVE_U_INT64_T
#if HAVE_UINT64_T
typedef uint64_t u_int64_t;
#else
#endif
-#ifndef HAVE_PID_T
+#if !HAVE_PID_T
typedef int pid_t;
#endif
-#ifndef HAVE_SIZE_T
+#if !HAVE_SIZE_T
typedef unsigned int size_t;
#endif
-#ifndef HAVE_SSIZE_T
+#if !HAVE_SSIZE_T
typedef int ssize_t;
#endif
-#ifndef HAVE_OFF_T
+#if !HAVE_OFF_T
typedef int off_t;
#endif
-#ifndef HAVE_MODE_T
+#if !HAVE_MODE_T
typedef unsigned short mode_t;
#endif
-#ifndef HAVE_FD_MASK
+#if !HAVE_FD_MASK
typedef unsigned long fd_mask;
#endif
-#ifndef HAVE_SOCKLEN_T
+#if !HAVE_SOCKLEN_T
typedef int socklen_t;
#endif
-#ifndef HAVE_MTYP_T
+#if !HAVE_MTYP_T
typedef long mtyp_t;
#endif
#define SQUID_UDP_SO_RCVBUF SQUID_DETECT_UDP_SO_RCVBUF
#endif
-#ifdef HAVE_MEMCPY
+#if HAVE_MEMCPY
#define xmemcpy(d,s,n) memcpy((d),(s),(n))
#elif HAVE_BCOPY
#define xmemcpy(d,s,n) bcopy((s),(d),(n))
#define xmemcpy(d,s,n) memmove((d),(s),(n))
#endif
-#ifdef HAVE_MEMMOVE
+#if HAVE_MEMMOVE
#define xmemmove(d,s,n) memmove((d),(s),(n))
#elif HAVE_BCOPY
#define xmemmove(d,s,n) bcopy((s),(d),(n))
/* Structure and prototypes taken from RFC 2553 */
-#ifdef HAVE_GETADDRINFO
+#if HAVE_GETADDRINFO
/* These functions are provided by the OS */
#define xgetaddrinfo getaddrinfo
#include "config.h"
-#ifdef HAVE_GETNAMEINFO
+#if HAVE_GETNAMEINFO
/* These functions are provided by the OS */
#define xgetnameinfo getnameinfo
class CacheManager;
#endif
-#ifdef USE_XPROF_STATS
+#if USE_XPROF_STATS
#if !defined(_SQUID_SOLARIS_)
typedef int64_t hrtime_t;
#endif /* USE_XPROF_STATS - maybe disabled above */
-#ifdef USE_XPROF_STATS
+#if USE_XPROF_STATS
typedef enum {
XPROF_PROF_UNACCOUNTED,
#define SQUID_SNMP_API_H
#include "config.h"
-#ifdef HAVE_SYS_TIME_H
+#if HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#undef timerisset
#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
-#ifdef HAVE_SRAND
+#if HAVE_SRAND
#define random rand
#define srandom srand
#endif /* HAVE_SRAND */
#if HAVE_BYTESWAP_H
# include <byteswap.h>
#endif /* HAVE_BYTESWAP_H */
-#ifdef HAVE_MACHINE_BYTE_SWAP_H
+#if HAVE_MACHINE_BYTE_SWAP_H
# include <machine/byte_swap.h>
#endif /* HAVE_MACHINE_BYTE_SWAP_H */
#if HAVE_SYS_BSWAP_H
#ifdef _SQUID_MSWIN_
SQUIDCEXTERN int chroot (const char *);
SQUIDCEXTERN int ftruncate(int, off_t);
-#ifndef HAVE_GETTIMEOFDAY
+#if !HAVE_GETTIMEOFDAY
SQUIDCEXTERN int gettimeofday(struct timeval * ,void *);
#endif
SQUIDCEXTERN int kill(pid_t, int);
#include <assert.h>
-#ifdef USE_XPROF_STATS
+#if USE_XPROF_STATS
#if HAVE_GNUMALLLOC_H
* hack by Martin Hamilton <martinh@gnu.org> to make Squid build on
* Win32 with GNU-Win32 - sorry, folks! */
-#ifndef HAVE_DRAND48
+#if !HAVE_DRAND48
#define N 16
#define MASK ((unsigned)(1 << (N - 1)) + (1 << (N - 1)) - 1)
/* An emulation of the RFC 2553 / Posix getaddrinfo resolver interface.
*/
-#ifndef HAVE_GETADDRINFO
+#if !HAVE_GETADDRINFO
/* Need to turn off Posix features in glibc to build this */
#undef _POSIX_C_SOURCE
* - gethostbyaddr() is usually not thread safe.
*/
-#ifndef HAVE_GETNAMEINFO
+#if !HAVE_GETNAMEINFO
#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#include <inttypes.h>
#endif
-#ifdef _SQUID_MSWIN_
+#if _SQUID_MSWIN_
#undef IN_ADDR
#include <ws2tcpip.h>
#endif
int a_off;
int a_portoff;
} afdl [] = {
-#ifdef INET6
+#if INET6
{PF_INET6, sizeof(struct in6_addr), sizeof(struct sockaddr_in6),
offsetof(struct sockaddr_in6, sin6_addr),
offsetof(struct sockaddr_in6, sin6_port)},
{0, 0, 0, 0, 0},
};
-#ifdef INET6
+#if INET6
static int ip6_parsenumeric __P((const struct sockaddr *, const char *, char *,
size_t, int));
static int ip6_sa2str __P((const struct sockaddr_in6 *, char *, size_t, int));
if (sa == NULL)
return EAI_FAIL;
-#ifdef HAVE_SA_LEN /*XXX*/
+#if HAVE_SA_LEN /*XXX*/
if (sa->sa_len != salen)
return EAI_FAIL;
#endif
if (v4a == 0)
flags |= NI_NUMERICHOST;
break;
-#ifdef INET6
+#if INET6
case AF_INET6: {
const struct sockaddr_in6 *sin6;
sin6 = (const struct sockaddr_in6 *)sa;
goto numeric;
} else {
-#ifdef USE_GETIPNODEBY
+#if USE_GETIPNODEBY
hp = getipnodebyaddr(addr, afd->a_addrlen, afd->a_af, &h_error);
#else
hp = gethostbyaddr(addr, afd->a_addrlen, afd->a_af);
-#ifdef HAVE_H_ERRNO
+#if HAVE_H_ERRNO
h_error = h_errno;
#else
h_error = EINVAL;
}
#endif
if (strlen(hp->h_name) + 1 > hostlen) {
-#ifdef USE_GETIPNODEBY
+#if USE_GETIPNODEBY
freehostent(hp);
#endif
return EAI_OVERFLOW;
}
strncpy(host, hp->h_name, hostlen);
-#ifdef USE_GETIPNODEBY
+#if USE_GETIPNODEBY
freehostent(hp);
#endif
} else {
numeric:
switch (afd->a_af) {
-#ifdef INET6
+#if INET6
case AF_INET6: {
int error;
return(0);
}
-#ifdef INET6
+#if INET6
static int
ip6_parsenumeric(sa, addr, host, hostlen, flags)
const struct sockaddr *sa;
ifindex = (unsigned int)sa6->sin6_scope_id;
a6 = &sa6->sin6_addr;
-#ifdef NI_NUMERICSCOPE
+#if NI_NUMERICSCOPE
if ((flags & NI_NUMERICSCOPE) != 0) {
n = snprintf(buf, bufsiz, "%u", sa6->sin6_scope_id);
if (n < 0 || n >= bufsiz)
}
-#ifdef USE_HASH_DRIVER
+#if USE_HASH_DRIVER
/*
* hash-driver - Run with a big file as stdin to insert each line into the
* hash table, then prints the whole hash table, then deletes a random item,
#include "config.h"
-#ifndef HAVE_INET_NTOP
+#if !HAVE_INET_NTOP
#include "inet_ntop.h"
/*
#include "config.h"
-#ifndef HAVE_INET_PTON
+#if !HAVE_INET_PTON
/*
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
int initgroups(const char *name, gid_t basegid)
{
-#ifdef HAVE_SETGROUPS
+#if HAVE_SETGROUPS
#ifndef NGROUPS_MAX
#define NGROUPS_MAX 16
#endif
* bindings. libtrie itself is written in C++.
*/
-#ifdef HAVE_CONFIG_H
+#if HAVE_CONFIG_H
#include "config.h"
#endif
* For C bindings see Trie.h
*/
-#ifdef HAVE_CONFIG_H
+#if HAVE_CONFIG_H
#include "config.h"
#endif
#ifdef __cplusplus
#include "TrieNode.h"
#include "TrieCharTransform.h"
-#ifdef HAVE_UNISTD_H
+#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <ctype.h>
* For C bindings see Trei.h
*/
-#ifdef HAVE_CONFIG_H
+#if HAVE_CONFIG_H
#include "config.h"
#endif
*/
#include "Trie.h"
-#ifdef HAVE_UNISTD_H
+#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include "TrieNode.h"
#include "TrieNode.h"
#include "TrieCharTransform.h"
-#ifdef HAVE_UNISTD_H
+#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include "config.h"
-#ifdef HAVE_STRING_H
+#if HAVE_STRING_H
#include <string.h>
#endif
-#ifdef HAVE_STRINGS_H
+#if HAVE_STRINGS_H
#include <strings.h>
#endif
if (!tm)
return -1;
tm->tm_isdst = -1;
-#ifdef HAVE_TIMEGM
+#if HAVE_TIMEGM
t = timegm(tm);
#elif HAVE_TM_TM_GMTOFF
t = mktime(tm);
struct tm *gmt = gmtime(t);
-#ifndef USE_GMT
+#if !USE_GMT
int gmt_min, gmt_hour, gmt_yday, day_offset;
size_t len;
struct tm *lt;
* USA.
*/
-#ifdef HAVE_CONFIG_H
+#if HAVE_CONFIG_H
#include <config.h>
#endif
/* modified for long long <mgd@swarm.org> 1999-08-12 */
-#ifdef HAVE_CONFIG_H
+#if HAVE_CONFIG_H
#include <config.h>
#endif
#if HAVE_CTYPE_H
return 0;
}
-#ifndef HAVE_GETTIMEOFDAY
+#if !HAVE_GETTIMEOFDAY
int
gettimeofday(struct timeval *pcur_time, void *tzp)
{
#if HAVE_MEMORY_H
#include <memory.h>
#endif
-#ifdef HAVE_STRING_H
+#if HAVE_STRING_H
#include <string.h>
#endif
-#ifdef HAVE_STRINGS_H
+#if HAVE_STRINGS_H
#include <strings.h>
#endif
#if HAVE_BSTRING_H
#if HAVE_MEMORY_H
#include <memory.h>
#endif
-#ifdef HAVE_STRING_H
+#if HAVE_STRING_H
#include <string.h>
#endif
-#ifdef HAVE_STRINGS_H
+#if HAVE_STRINGS_H
#include <strings.h>
#endif
#if HAVE_BSTRING_H
case SNMP_PDU_GET:
case SNMP_PDU_GETNEXT:
-#ifdef SNMP_PDU_SET
+#if SNMP_PDU_SET
case SNMP_PDU_SET:
#endif
return (1);
#if HAVE_MEMORY_H
#include <memory.h>
#endif
-#ifdef HAVE_STRING_H
+#if HAVE_STRING_H
#include <string.h>
#endif
-#ifdef HAVE_STRINGS_H
+#if HAVE_STRINGS_H
#include <strings.h>
#endif
#if HAVE_BSTRING_H
#if HAVE_MEMORY_H
#include <memory.h>
#endif
-#ifdef HAVE_STRING_H
+#if HAVE_STRING_H
#include <string.h>
#endif
-#ifdef HAVE_STRINGS_H
+#if HAVE_STRINGS_H
#include <strings.h>
#endif
#if HAVE_BSTRING_H
snmplib_debug(0, "%s: On or around line %d\n", string, Line);
}
-#ifdef TEST
+#if TEST
print_subtree(tree, count)
struct snmp_mib_tree *tree;
int count;
xfree(oldnp);
}
-#ifndef TEST
+#if !TEST
static
#endif
struct snmp_mib_tree *
init_node_hash(nodes);
/* XXX nodes isn't needed in do_subtree() ??? */
do_subtree(tp, &nodes);
-#ifdef TEST
+#if TEST
print_subtree(tp, 0);
#endif /* TEST */
/* If any nodes are left, the tree is probably inconsistent */
* Parses a mib file and returns a linked list of nodes found in the file.
* Returns NULL on error.
*/
-#ifndef TEST
+#if !TEST
static
#endif
struct node *
return NULL;
}
}
-#ifdef TEST
+#if TEST
{
struct enum_list *ep;
#if HAVE_MEMORY_H
#include <memory.h>
#endif
-#ifdef HAVE_STRING_H
+#if HAVE_STRING_H
#include <string.h>
#endif
-#ifdef HAVE_STRINGS_H
+#if HAVE_STRINGS_H
#include <strings.h>
#endif
#if HAVE_BSTRING_H
*
***************************************************************************/
-#ifdef HAVE_CONFIG_H
+#if HAVE_CONFIG_H
#include "config.h"
#endif /* HAVE_CONFIG_H */
#if HAVE_MEMORY_H
#include <memory.h>
#endif
-#ifdef HAVE_STRING_H
+#if HAVE_STRING_H
#include <string.h>
#endif
-#ifdef HAVE_STRINGS_H
+#if HAVE_STRINGS_H
#include <strings.h>
#endif
#if HAVE_BSTRING_H
/* Cool. Now insert the appropriate lengths.
*/
-#ifdef DEBUG_MSG_ENCODE
+#if DEBUG_MSG_ENCODE
snmplib_debug(9, "Msg: Vars returned 0x%x. PDU Started at 0x%x\n",
bufp, PDUHeaderPtr);
snmplib_debug(9, "MSG: Entire PDU length is %d (0x%x - 0x%x)\n",
if (tmp == NULL)
return (NULL);
-#ifdef DEBUG_MSG_ENCODE
+#if DEBUG_MSG_ENCODE
snmplib_debug(9, "MSG: Entire message length is %d (0x%x - 0x%x)\n",
(int) (bufp - MsgPtr), MsgPtr, bufp);
#endif
#if HAVE_MEMORY_H
#include <memory.h>
#endif
-#ifdef HAVE_STRING_H
+#if HAVE_STRING_H
#include <string.h>
#endif
-#ifdef HAVE_STRINGS_H
+#if HAVE_STRINGS_H
#include <strings.h>
#endif
#if HAVE_BSTRING_H
snmp_pdu_create(int command) {
struct snmp_pdu *pdu;
-#ifdef DEBUG_PDU
+#if DEBUG_PDU
snmplib_debug(8, "PDU: Creating\n");
#endif
pdu->enterprise_length = 0;
pdu->variables = NULL;
-#ifdef DEBUG_PDU
+#if DEBUG_PDU
snmplib_debug(8, "PDU: Created %x\n", (unsigned int) pdu);
#endif
snmp_pdu_clone(struct snmp_pdu *Src) {
struct snmp_pdu *Dest;
-#ifdef DEBUG_PDU
+#if DEBUG_PDU
snmplib_debug(8, "PDU %x: Cloning\n", (unsigned int) Src);
#endif
}
xmemcpy((char *) Dest, (char *) Src, sizeof(struct snmp_pdu));
-#ifdef DEBUG_PDU
+#if DEBUG_PDU
snmplib_debug(8, "PDU %x: Created %x\n", (unsigned int) Src, (unsigned int) Dest);
#endif
return (Dest);
int i;
int copied = 0;
-#ifdef DEBUG_PDU
+#if DEBUG_PDU
snmplib_debug(8, "PDU %x: Fixing. Err index is %d\n",
(unsigned int) pdu, (unsigned int) pdu->errindex);
#endif
snmp_set_api_error(SNMPERR_UNABLE_TO_FIX);
return (NULL);
}
-#ifdef DEBUG_PDU
+#if DEBUG_PDU
snmplib_debug(8, "PDU %x: Fixed PDU is %x\n",
(unsigned int) pdu, (unsigned int) newpdu);
#endif
{
u_char *bufp;
-#ifdef DEBUG_PDU_ENCODE
+#if DEBUG_PDU_ENCODE
snmplib_debug(8, "PDU: Encoding %d\n", PDU->command);
#endif
switch (PDU->command) {
/**********************************************************************/
-#ifdef TRP_REQ_MSG
+#if TRP_REQ_MSG
case TRP_REQ_MSG:
/* SNMPv1 Trap */
/* Normal PDU Encoding */
/* request id */
-#ifdef DEBUG_PDU_ENCODE
+#if DEBUG_PDU_ENCODE
snmplib_debug(8, "PDU: Request ID %d (0x%x)\n", PDU->reqid, DestBuf);
#endif
bufp = asn_build_int(DestBuf, DestBufLen,
return (NULL);
/* error status */
-#ifdef DEBUG_PDU_ENCODE
+#if DEBUG_PDU_ENCODE
snmplib_debug(8, "PDU: Error Status %d (0x%x)\n", PDU->errstat, bufp);
#endif
bufp = asn_build_int(bufp, DestBufLen,
return (NULL);
/* error index */
-#ifdef DEBUG_PDU_ENCODE
+#if DEBUG_PDU_ENCODE
snmplib_debug(8, "PDU: Error index %d (0x%x)\n", PDU->errindex, bufp);
#endif
bufp = asn_build_int(bufp, DestBufLen,
u_char *bufp;
u_char PDUType;
u_char ASNType;
-#ifdef UNUSED_CODE
+#if UNUSED_CODE
int four;
oid objid[MAX_NAME_LEN];
#endif
if (bufp == NULL)
ASN_PARSE_ERROR(NULL);
-#ifdef DEBUG_PDU_DECODE
+#if DEBUG_PDU_DECODE
snmplib_debug(8, "PDU Type: %d\n", PDUType);
#endif
PDU->command = PDUType;
switch (PDUType) {
-#ifdef TRP_REQ_MSG
+#if TRP_REQ_MSG
case TRP_REQ_MSG:
/* SNMPv1 Trap Message */
if (bufp == NULL)
ASN_PARSE_ERROR(NULL);
-#ifdef DEBUG_PDU_DECODE
+#if DEBUG_PDU_DECODE
snmplib_debug(8, "PDU Request ID: %d\n", PDU->reqid);
#endif
if (bufp == NULL)
ASN_PARSE_ERROR(NULL);
-#ifdef DEBUG_PDU_DECODE
+#if DEBUG_PDU_DECODE
snmplib_debug(8, "PDU Error Status: %d\n", PDU->errstat);
#endif
if (bufp == NULL)
ASN_PARSE_ERROR(NULL);
-#ifdef DEBUG_PDU_DECODE
+#if DEBUG_PDU_DECODE
snmplib_debug(8, "PDU Error Index: %d\n", PDU->errindex);
#endif
#if HAVE_MEMORY_H
#include <memory.h>
#endif
-#ifdef HAVE_STRING_H
+#if HAVE_STRING_H
#include <string.h>
#endif
-#ifdef HAVE_STRINGS_H
+#if HAVE_STRINGS_H
#include <strings.h>
#endif
#if HAVE_BSTRING_H
snmp_var_new(oid * Name, int Len) {
struct variable_list *New;
-#ifdef DEBUG_VARS
+#if DEBUG_VARS
printf("VARS: Creating.\n");
#endif
snmp_set_api_error(SNMPERR_OS_ERR);
return (NULL);
}
-#ifdef DEBUG_VARS
+#if DEBUG_VARS
printf("VARS: Copying name, size (%d)\n", Len);
#endif
snmp_var_clone(struct variable_list *Src) {
struct variable_list *Dest;
-#ifdef DEBUG_VARS
+#if DEBUG_VARS
printf("VARS: Cloning.\n");
#endif
snmp_set_api_error(SNMPERR_OS_ERR);
return (NULL);
}
-#ifdef DEBUG_VARS
+#if DEBUG_VARS
printf("VARS: Copying entire variable list. (Size %d)\n",
sizeof(struct variable_list));
#endif
xfree(Dest);
return (NULL);
}
-#ifdef DEBUG_VARS
+#if DEBUG_VARS
printf("VARS: Copying name OID. (Size %d)\n", Src->name_length);
#endif
xmemcpy((char *) Dest->name, (char *) Src->name,
xfree(Dest);
return (NULL);
}
-#ifdef DEBUG_VARS
+#if DEBUG_VARS
printf("VARS: Copying value (Size %d)\n", Src->val_len);
#endif
xmemcpy((char *) Dest->val.string, (char *) Src->val.string, Src->val_len);
}
-#ifdef DEBUG_VARS
+#if DEBUG_VARS
printf("VARS: Cloned %x.\n", (unsigned int) Dest);
#endif
-#ifdef DEBUG_VARS_MALLOC
+#if DEBUG_VARS_MALLOC
printf("VARS: Cloned (%x)\n", (unsigned int) Dest);
printf("VARS: Name is (%x)\n", (unsigned int) Dest->name);
#endif
int ThisVarLen = 0;
VarLastP = VarP;
-#ifdef DEBUG_VARS_DECODE
+#if DEBUG_VARS_DECODE
printf("VARS: Decoding buffer of length %d\n", *BufLen);
#endif
snmp_set_api_error(SNMPERR_PDU_PARSE);
return (NULL);
}
-#ifdef DEBUG_VARS_DECODE
+#if DEBUG_VARS_DECODE
printf("VARS: All Variable length %d\n", AllVarLen);
#endif
snmp_set_api_error(SNMPERR_PDU_PARSE);
PARSE_ERROR;
}
-#ifdef DEBUG_VARS_DECODE
+#if DEBUG_VARS_DECODE
printf("VARS: Header type 0x%x (%d bytes left)\n", VarBindType, ThisVarLen);
#endif
snmp_set_api_error(SNMPERR_PDU_PARSE);
PARSE_ERROR;
}
-#ifdef DEBUG_VARS_DECODE
+#if DEBUG_VARS_DECODE
printf("VARS: Decoded OBJID (%d bytes). (%d bytes left)\n",
Var->name_length, ThisVarLen);
#endif
PARSE_ERROR;
ThisVarLen = DataLen;
-#ifdef DEBUG_VARS_DECODE
+#if DEBUG_VARS_DECODE
printf("VARS: Data type %d\n", Var->type);
#endif
bufp = asn_parse_int(DataPtr, &ThisVarLen,
&Var->type, (int *) Var->val.integer,
Var->val_len);
-#ifdef DEBUG_VARS_DECODE
+#if DEBUG_VARS_DECODE
printf("VARS: Decoded integer '%d' (%d bytes left)\n",
*(Var->val.integer), ThisVarLen);
#endif
bufp = asn_parse_unsigned_int(DataPtr, &ThisVarLen,
&Var->type, (u_int *) Var->val.integer,
Var->val_len);
-#ifdef DEBUG_VARS_DECODE
+#if DEBUG_VARS_DECODE
printf("VARS: Decoded timeticks '%d' (%d bytes left)\n",
*(Var->val.integer), ThisVarLen);
#endif
bufp = asn_parse_string(DataPtr, &ThisVarLen,
&Var->type, Var->val.string,
&Var->val_len);
-#ifdef DEBUG_VARS_DECODE
+#if DEBUG_VARS_DECODE
printf("VARS: Decoded string '%s' (length %d) (%d bytes left)\n",
(Var->val.string), Var->val_len, ThisVarLen);
#endif
if (bufp) {
xmemcpy((char *) Var->val.objid, (char *) TmpBuf, Var->val_len);
}
-#ifdef DEBUG_VARS_DECODE
+#if DEBUG_VARS_DECODE
printf("VARS: Decoded OBJID (length %d) (%d bytes left)\n",
Var->val_len, ThisVarLen);
#endif
if (bufp == NULL)
PARSE_ERROR;
-#ifdef DEBUG_VARS_DECODE
+#if DEBUG_VARS_DECODE
printf("VARS: Adding to list.\n");
#endif
/* Add variable to the list */
*/
#include "acl/Acl.h"
-#ifdef USE_SQUID_EUI
+#if USE_SQUID_EUI
#include "acl/Arp.h"
#include "acl/Eui64.h"
#endif
#include "acl/SourceAsn.h"
#include "acl/SourceDomain.h"
#include "acl/SourceIp.h"
-#ifdef USE_SSL
+#if USE_SSL
#include "acl/SslErrorData.h"
#include "acl/SslError.h"
#include "acl/CertificateData.h"
ACL::Prototype ACLUrlPort::RegistryProtoype(&ACLUrlPort::RegistryEntry_, "port");
ACLStrategised<int> ACLUrlPort::RegistryEntry_(new ACLIntRange, ACLUrlPortStrategy::Instance(), "port");
-#ifdef USE_SSL
+#if USE_SSL
ACL::Prototype ACLSslError::RegistryProtoype(&ACLSslError::RegistryEntry_, "ssl_error");
ACLStrategised<int> ACLSslError::RegistryEntry_(new ACLSslErrorData, ACLSslErrorStrategy::Instance(), "ssl_error");
ACL::Prototype ACLCertificate::UserRegistryProtoype(&ACLCertificate::UserRegistryEntry_, "user_cert");
ACLStrategised<SSL *> ACLCertificate::CARegistryEntry_(new ACLCertificateData (sslGetCAAttribute), ACLCertificateStrategy::Instance(), "ca_cert");
#endif
-#ifdef USE_SQUID_EUI
+#if USE_SQUID_EUI
ACL::Prototype ACLARP::RegistryProtoype(&ACLARP::RegistryEntry_, "arp");
ACLARP ACLARP::RegistryEntry_("arp");
ACL::Prototype ACLEui64::RegistryProtoype(&ACLEui64::RegistryEntry_, "eui64");
#include "squid.h"
-#ifdef HAVE_AUTH_MODULE_BASIC
+#if HAVE_AUTH_MODULE_BASIC
#include "auth/basic/basicScheme.h"
#endif
-#ifdef HAVE_AUTH_MODULE_NTLM
+#if HAVE_AUTH_MODULE_NTLM
#include "auth/ntlm/ntlmScheme.h"
#endif
-#ifdef HAVE_AUTH_MODULE_DIGEST
+#if HAVE_AUTH_MODULE_DIGEST
#include "auth/digest/digestScheme.h"
#endif
-#ifdef HAVE_AUTH_MODULE_NEGOTIATE
+#if HAVE_AUTH_MODULE_NEGOTIATE
#include "auth/negotiate/negotiateScheme.h"
#endif
-#ifdef HAVE_AUTH_MODULE_BASIC
+#if HAVE_AUTH_MODULE_BASIC
static const char *basic_type = basicScheme::GetInstance().type();
#endif
-#ifdef HAVE_AUTH_MODULE_NTLM
+#if HAVE_AUTH_MODULE_NTLM
static const char *ntlm_type = ntlmScheme::GetInstance().type();
#endif
-#ifdef HAVE_AUTH_MODULE_DIGEST
+#if HAVE_AUTH_MODULE_DIGEST
static const char *digest_type = digestScheme::GetInstance().type();
#endif
-#ifdef HAVE_AUTH_MODULE_NEGOTIATE
+#if HAVE_AUTH_MODULE_NEGOTIATE
static const char *negotiate_type = negotiateScheme::GetInstance().type();
#endif
#include "dlink.h"
#include "typedefs.h"
-#ifdef AUFS_IO_THREADS
+#if AUFS_IO_THREADS
#define NUMTHREADS AUFS_IO_THREADS
#else
#define NUMTHREADS (Config.cacheSwap.n_configured*16)
mb->Printf("memBufReport is not yet implemented @?@\n");
}
-#ifndef _USE_INLINE_
+#if !_USE_INLINE_
#include "MemBuf.cci"
#endif
#endif
};
-#ifdef _USE_INLINE_
+#if _USE_INLINE_
#include "MemBuf.cci"
#endif
#include "config.h"
-#ifdef HAVE_SYS_TIME_H
+#if HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#include "squid.h"
-#ifdef USE_XPROF_STATS
+#if USE_XPROF_STATS
#include "CacheManager.h"
#include "event.h"
_SQUID_INLINE_ std::ostream & operator<<(std::ostream& os, String const &aString);
-#ifdef _USE_INLINE_
+#if _USE_INLINE_
#include "String.cci"
#endif
/// \ingroup StoreAPI
SQUIDCEXTERN void storeGetMemSpace(int size);
-#ifdef _USE_INLINE_
+#if _USE_INLINE_
#include "Store.cci"
#endif
-#ifndef _USE_INLINE_
+#if !_USE_INLINE_
#include "String.cci"
#endif
#include "config.h"
#include <cstring>
-#ifdef HAVE_STDINT_H
+#if HAVE_STDINT_H
#include <stdint.h> //for INT_MAX
#else /* HAVE_STDINT_H */
#ifndef INT_MAX
#include "event.h"
#include "SquidTime.h"
-#ifndef _USE_INLINE_
+#if !_USE_INLINE_
#include "auth/User.cci"
#endif
dlink_list ip_list;
};
-#ifdef _USE_INLINE_
+#if _USE_INLINE_
#include "auth/User.cci"
#endif
#endif
static OBJH cbdataDump;
-#ifdef CBDATA_DEBUG
+#if CBDATA_DEBUG
static OBJH cbdataDumpHistory;
#endif
#endif
}
-#ifndef _USE_INLINE_
+#if !_USE_INLINE_
#include "client_side_request.cci"
#endif
SQUIDCEXTERN void tunnelStart(ClientHttpRequest *, int64_t *, int *);
-#ifdef _USE_INLINE_
+#if _USE_INLINE_
#include "Store.h"
#include "client_side_request.cci"
#endif
#if defined(_SQUID_CYGWIN_)
#include <sys/ioctl.h>
#endif
-#ifdef HAVE_NETINET_TCP_H
+#if HAVE_NETINET_TCP_H
#include <netinet/tcp.h>
#endif
static comm_err_t commBind(int s, struct addrinfo &);
static void commSetReuseAddr(int);
static void commSetNoLinger(int);
-#ifdef TCP_NODELAY
+#if TCP_NODELAY
static void commSetTcpNoDelay(int);
#endif
static void commSetTcpRcvbuf(int, int);
int
comm_set_tos(int fd, int tos)
{
-#ifdef IP_TOS
+#if IP_TOS
int x = setsockopt(fd, IPPROTO_IP, IP_TOS, (char *) &tos, sizeof(int));
if (x < 0)
debugs(50, 1, "comm_set_tos: setsockopt(IP_TOS) on FD " << fd << ": " << xstrerror());
void
comm_set_v6only(int fd, int tos)
{
-#ifdef IPV6_V6ONLY
+#if IPV6_V6ONLY
if (setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, (char *) &tos, sizeof(int)) < 0) {
debugs(50, 1, "comm_open: setsockopt(IPV6_V6ONLY) " << (tos?"ON":"OFF") << " for FD " << fd << ": " << xstrerror());
}
PROF_stop(comm_open);
}
-#ifdef TCP_NODELAY
+#if TCP_NODELAY
if (sock_type == SOCK_STREAM)
commSetTcpNoDelay(new_socket);
if (F->flags.nonblocking)
commSetNonBlocking(to);
-#ifdef TCP_NODELAY
+#if TCP_NODELAY
if (F->flags.nodelay)
commSetTcpNoDelay(to);
debugs(50, 1, "commSetTcpRcvbuf: FD " << fd << ", SIZE " << size << ": " << xstrerror());
if (setsockopt(fd, SOL_SOCKET, SO_SNDBUF, (char *) &size, sizeof(size)) < 0)
debugs(50, 1, "commSetTcpRcvbuf: FD " << fd << ", SIZE " << size << ": " << xstrerror());
-#ifdef TCP_WINDOW_CLAMP
+#if TCP_WINDOW_CLAMP
if (setsockopt(fd, SOL_TCP, TCP_WINDOW_CLAMP, (char *) &size, sizeof(size)) < 0)
debugs(50, 1, "commSetTcpRcvbuf: FD " << fd << ", SIZE " << size << ": " << xstrerror());
#endif
void
commSetCloseOnExec(int fd)
{
-#ifdef FD_CLOEXEC
+#if FD_CLOEXEC
int flags;
int dummy = 0;
#endif
}
-#ifdef TCP_NODELAY
+#if TCP_NODELAY
static void
commSetTcpNoDelay(int fd)
{
commSetTcpKeepalive(int fd, int idle, int interval, int timeout)
{
int on = 1;
-#ifdef TCP_KEEPCNT
+#if TCP_KEEPCNT
if (timeout && interval) {
int count = (timeout + interval - 1) / interval;
if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPCNT, &count, sizeof(on)) < 0)
debugs(5, 1, "commSetKeepalive: FD " << fd << ": " << xstrerror());
}
#endif
-#ifdef TCP_KEEPIDLE
+#if TCP_KEEPIDLE
if (idle) {
if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, &idle, sizeof(on)) < 0)
debugs(5, 1, "commSetKeepalive: FD " << fd << ": " << xstrerror());
}
#endif
-#ifdef TCP_KEEPINTVL
+#if TCP_KEEPINTVL
if (interval) {
if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL, &interval, sizeof(on)) < 0)
debugs(5, 1, "commSetKeepalive: FD " << fd << ": " << xstrerror());
case EALREADY:
case EINTR:
-#ifdef ERESTART
+#if ERESTART
case ERESTART:
#endif
}
if (Config.accept_filter && strcmp(Config.accept_filter, "none") != 0) {
-#ifdef SO_ACCEPTFILTER
+#if SO_ACCEPTFILTER
struct accept_filter_arg afa;
bzero(&afa, sizeof(afa));
debugs(5, DBG_CRITICAL, "Installing accept filter '" << Config.accept_filter << "' on FD " << sock);
x = setsockopt(sock, SOL_SOCKET, SO_ACCEPTFILTER, &afa, sizeof(afa));
if (x < 0)
debugs(5, 0, "SO_ACCEPTFILTER '" << Config.accept_filter << "': '" << xstrerror());
-#elif defined(TCP_DEFER_ACCEPT)
+#elif TCP_DEFER_ACCEPT
int seconds = 30;
if (strncmp(Config.accept_filter, "data=", 5) == 0)
seconds = atoi(Config.accept_filter + 5);
#include "fde.h"
#include "SquidTime.h"
-#ifdef USE_EPOLL
+#if USE_EPOLL
#define DEBUG_EPOLL 0
#include "Store.h"
#include "fde.h"
-#ifdef USE_POLL
+#if USE_POLL
static int MAX_POLL_TIME = 1000; /* see also comm_quick_poll_required() */
#include "CacheManager.h"
#include "SquidTime.h"
-#ifdef USE_SELECT
+#if USE_SELECT
#include "Store.h"
#include "fde.h"
#include "CacheManager.h"
#include "SquidTime.h"
-#ifdef USE_SELECT_WIN32
+#if USE_SELECT_WIN32
#include "Store.h"
#include "fde.h"
#ifndef to exclude the internal DNS code from compile process when
using external DNS process.
*/
-#ifndef USE_DNSSERVERS
+#if !USE_DNSSERVERS
#ifdef _SQUID_WIN32_
#include "squid_windows.h"
#define REG_TCPIP_PARA_INTERFACES "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Interfaces"
#if HAVE_LIBC_H
#include <libc.h>
#endif
-#ifdef HAVE_SYS_SYSCALL_H
+#if HAVE_SYS_SYSCALL_H
#include <sys/syscall.h>
#endif
-#ifdef HAVE_STRING_H
+#if HAVE_STRING_H
#include <string.h>
#endif
-#ifdef HAVE_STRINGS_H
+#if HAVE_STRINGS_H
#include <strings.h>
#endif
#if HAVE_BSTRING_H
#include <bstring.h>
#endif
-#ifdef HAVE_CRYPT_H
+#if HAVE_CRYPT_H
#include <crypt.h>
#endif
#if HAVE_SYS_SELECT_H
break;
#if defined(EAI_NODATA) || defined(EAI_NONAME)
-#ifdef EAI_NODATA
+#if EAI_NODATA
/* deprecated. obsolete on some OS */
case EAI_NODATA:
#endif
-#ifdef EAI_NONAME
+#if EAI_NONAME
case EAI_NONAME:
#endif
printf("$fail DNS Domain/IP '%s' exists without any FQDN/IPs: %s.\n", buf, xgai_strerror(res));
#include "fs/ufs/ufscommon.h"
#endif
-#ifdef HAVE_FS_COSS
+#if HAVE_FS_COSS
#include "fs/coss/StoreFScoss.h"
#endif
-#ifdef HAVE_FS_UFS
+#if HAVE_FS_UFS
static StoreFSufs<UFSSwapDir> *UfsInstance;
#endif
-#ifdef HAVE_FS_AUFS
+#if HAVE_FS_AUFS
static StoreFSufs<UFSSwapDir> *AufsInstance;
#endif
-#ifdef HAVE_FS_DISKD
+#if HAVE_FS_DISKD
static StoreFSufs<UFSSwapDir> *DiskdInstance;
#endif
* (b) declare the StoreFScoss::stats as static and
* (c) merge the StoreFScoss::stat() method with the static
* StoreFScoss::Stats() */
-#ifdef HAVE_FS_COSS
+#if HAVE_FS_COSS
StoreFScoss &CossInstance = StoreFScoss::GetInstance();
#endif
void Fs::Init()
{
-#ifdef HAVE_FS_UFS
+#if HAVE_FS_UFS
UfsInstance = new StoreFSufs<UFSSwapDir>("Blocking", "ufs");
#endif
-#ifdef HAVE_FS_AUFS
+#if HAVE_FS_AUFS
AufsInstance = new StoreFSufs<UFSSwapDir>("DiskThreads", "aufs");;
#endif
-#ifdef HAVE_FS_DISKD
+#if HAVE_FS_DISKD
DiskdInstance = new StoreFSufs<UFSSwapDir>("DiskDaemon", "diskd");;
#endif
void Fs::Clean()
{
-#ifdef HAVE_FS_UFS
+#if HAVE_FS_UFS
delete UfsInstance;
#endif
-#ifdef HAVE_FS_AUFS
+#if HAVE_FS_AUFS
delete AufsInstance;
#endif
-#ifdef HAVE_FS_DISKD
+#if HAVE_FS_DISKD
delete DiskdInstance;
#endif
return currentEntry();
}
-#ifndef _USE_INLINE_
+#if !_USE_INLINE_
#include "ufscommon.cci"
#endif
void *cbdata;
};
-#ifdef _USE_INLINE_
+#if _USE_INLINE_
#include "ufscommon.cci"
#endif
#if HAVE_LIBC_H
#include <libc.h>
#endif
-#ifdef HAVE_SYS_SYSCALL_H
+#if HAVE_SYS_SYSCALL_H
#include <sys/syscall.h>
#endif
-#ifdef HAVE_STRING_H
+#if HAVE_STRING_H
#include <string.h>
#endif
-#ifdef HAVE_STRINGS_H
+#if HAVE_STRINGS_H
#include <strings.h>
#endif
#if HAVE_BSTRING_H
* and Squid may be running with a lot more..
* But only for code linked into Squid, not the helpers.. (unlinkd, pinger)
*/
-#ifdef SQUID_FDSET_NOUSE
+#if SQUID_FDSET_NOUSE
# ifndef SQUID_HELPER
# define fd_set ERROR_FD_SET_USED
# endif
ssl_options[] = {
-#ifdef SSL_OP_MICROSOFT_SESS_ID_BUG
+#if SSL_OP_MICROSOFT_SESS_ID_BUG
{
"MICROSOFT_SESS_ID_BUG", SSL_OP_MICROSOFT_SESS_ID_BUG
},
#endif
-#ifdef SSL_OP_NETSCAPE_CHALLENGE_BUG
+#if SSL_OP_NETSCAPE_CHALLENGE_BUG
{
"NETSCAPE_CHALLENGE_BUG", SSL_OP_NETSCAPE_CHALLENGE_BUG
},
#endif
-#ifdef SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG
+#if SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG
{
"NETSCAPE_REUSE_CIPHER_CHANGE_BUG", SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG
},
#endif
-#ifdef SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG
+#if SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG
{
"SSLREF2_REUSE_CERT_TYPE_BUG", SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG
},
#endif
-#ifdef SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER
+#if SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER
{
"MICROSOFT_BIG_SSLV3_BUFFER", SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER
},
#endif
-#ifdef SSL_OP_MSIE_SSLV2_RSA_PADDING
+#if SSL_OP_MSIE_SSLV2_RSA_PADDING
{
"MSIE_SSLV2_RSA_PADDING", SSL_OP_MSIE_SSLV2_RSA_PADDING
},
#endif
-#ifdef SSL_OP_SSLEAY_080_CLIENT_DH_BUG
+#if SSL_OP_SSLEAY_080_CLIENT_DH_BUG
{
"SSLEAY_080_CLIENT_DH_BUG", SSL_OP_SSLEAY_080_CLIENT_DH_BUG
},
#endif
-#ifdef SSL_OP_TLS_D5_BUG
+#if SSL_OP_TLS_D5_BUG
{
"TLS_D5_BUG", SSL_OP_TLS_D5_BUG
},
#endif
-#ifdef SSL_OP_TLS_BLOCK_PADDING_BUG
+#if SSL_OP_TLS_BLOCK_PADDING_BUG
{
"TLS_BLOCK_PADDING_BUG", SSL_OP_TLS_BLOCK_PADDING_BUG
},
#endif
-#ifdef SSL_OP_TLS_ROLLBACK_BUG
+#if SSL_OP_TLS_ROLLBACK_BUG
{
"TLS_ROLLBACK_BUG", SSL_OP_TLS_ROLLBACK_BUG
},
#endif
-#ifdef SSL_OP_ALL
+#if SSL_OP_ALL
{
"ALL", SSL_OP_ALL
},
#endif
-#ifdef SSL_OP_SINGLE_DH_USE
+#if SSL_OP_SINGLE_DH_USE
{
"SINGLE_DH_USE", SSL_OP_SINGLE_DH_USE
},
#endif
-#ifdef SSL_OP_EPHEMERAL_RSA
+#if SSL_OP_EPHEMERAL_RSA
{
"EPHEMERAL_RSA", SSL_OP_EPHEMERAL_RSA
},
#endif
-#ifdef SSL_OP_PKCS1_CHECK_1
+#if SSL_OP_PKCS1_CHECK_1
{
"PKCS1_CHECK_1", SSL_OP_PKCS1_CHECK_1
},
#endif
-#ifdef SSL_OP_PKCS1_CHECK_2
+#if SSL_OP_PKCS1_CHECK_2
{
"PKCS1_CHECK_2", SSL_OP_PKCS1_CHECK_2
},
#endif
-#ifdef SSL_OP_NETSCAPE_CA_DN_BUG
+#if SSL_OP_NETSCAPE_CA_DN_BUG
{
"NETSCAPE_CA_DN_BUG", SSL_OP_NETSCAPE_CA_DN_BUG
},
#endif
-#ifdef SSL_OP_NON_EXPORT_FIRST
+#if SSL_OP_NON_EXPORT_FIRST
{
"NON_EXPORT_FIRST", SSL_OP_NON_EXPORT_FIRST
},
#endif
-#ifdef SSL_OP_CIPHER_SERVER_PREFERENCE
+#if SSL_OP_CIPHER_SERVER_PREFERENCE
{
"CIPHER_SERVER_PREFERENCE", SSL_OP_CIPHER_SERVER_PREFERENCE
},
#endif
-#ifdef SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG
+#if SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG
{
"NETSCAPE_DEMO_CIPHER_CHANGE_BUG", SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG
},
#endif
-#ifdef SSL_OP_NO_SSLv2
+#if SSL_OP_NO_SSLv2
{
"NO_SSLv2", SSL_OP_NO_SSLv2
},
#endif
-#ifdef SSL_OP_NO_SSLv3
+#if SSL_OP_NO_SSLv3
{
"NO_SSLv3", SSL_OP_NO_SSLv3
},
#endif
-#ifdef SSL_OP_NO_TLSv1
+#if SSL_OP_NO_TLSv1
{
"NO_TLSv1", SSL_OP_NO_TLSv1
},
else if (strcmp(flag, "NO_SESSION_REUSE") == 0)
fl |= SSL_FLAG_NO_SESSION_REUSE;
-#ifdef X509_V_FLAG_CRL_CHECK
+#if X509_V_FLAG_CRL_CHECK
else if (strcmp(flag, "VERIFY_CRL") == 0)
fl |= SSL_FLAG_VERIFY_CRL;
ssl_initialized = 1;
SSL_load_error_strings();
SSLeay_add_ssl_algorithms();
-#ifdef HAVE_OPENSSL_ENGINE_H
+#if HAVE_OPENSSL_ENGINE_H
if (Config.SSL.ssl_engine) {
ENGINE *e;
fl |= SSL_FLAG_VERIFY_CRL;
}
-#ifdef X509_V_FLAG_CRL_CHECK
+#if X509_V_FLAG_CRL_CHECK
if (fl & SSL_FLAG_VERIFY_CRL_ALL)
X509_STORE_set_flags(SSL_CTX_get_cert_store(sslContext), X509_V_FLAG_CRL_CHECK|X509_V_FLAG_CRL_CHECK_ALL);
else if (fl & SSL_FLAG_VERIFY_CRL)
fl |= SSL_FLAG_VERIFY_CRL;
}
-#ifdef X509_V_FLAG_CRL_CHECK
+#if X509_V_FLAG_CRL_CHECK
if (fl & SSL_FLAG_VERIFY_CRL_ALL)
X509_STORE_set_flags(SSL_CTX_get_cert_store(sslContext), X509_V_FLAG_CRL_CHECK|X509_V_FLAG_CRL_CHECK_ALL);
else if (fl & SSL_FLAG_VERIFY_CRL)
static OBJH statCountersHistograms;
static OBJH statClientRequests;
-#ifdef XMALLOC_STATISTICS
+#if XMALLOC_STATISTICS
static void info_get_mallstat(int, int, int, void *);
static double xm_time;
static double xm_deltat;
#endif
-#ifdef XMALLOC_STATISTICS
+#if XMALLOC_STATISTICS
static void
info_get_mallstat(int size, int number, int oldnum, void *data)
{
storeAppendPrintf(sentry, "Squid Object Cache: Version %s\n",
version_string);
-#ifdef _SQUID_WIN32_
+#if _SQUID_WIN32_
if (WIN32_run_mode == _WIN_SQUID_RUN_MODE_SERVICE) {
storeAppendPrintf(sentry,"\nRunning as %s Windows System Service on %s\n",
return NULL;
}
-#ifndef _USE_INLINE_
+#if !_USE_INLINE_
#include "Store.cci"
#endif
#include "client_side_request.h"
#include "Store.h"
-#ifndef _USE_INLINE_
+#if !_USE_INLINE_
#include "client_side_request.cci"
#endif
fatal("storeAppendVPrintf: Not implemented");
}
-#ifndef _USE_INLINE_
+#if !_USE_INLINE_
#include "Store.cci"
#endif
CPPUNIT_TEST_SUITE_REGISTRATION( testAuth );
CPPUNIT_TEST_SUITE_REGISTRATION( testAuthConfig );
CPPUNIT_TEST_SUITE_REGISTRATION( testAuthUserRequest );
-#ifdef HAVE_AUTH_MODULE_BASIC
+#if HAVE_AUTH_MODULE_BASIC
CPPUNIT_TEST_SUITE_REGISTRATION( testAuthBasicUserRequest );
#endif
-#ifdef HAVE_AUTH_MODULE_DIGEST
+#if HAVE_AUTH_MODULE_DIGEST
CPPUNIT_TEST_SUITE_REGISTRATION( testAuthDigestUserRequest );
#endif
-#ifdef HAVE_AUTH_MODULE_NTLM
+#if HAVE_AUTH_MODULE_NTLM
CPPUNIT_TEST_SUITE_REGISTRATION( testAuthNTLMUserRequest );
#endif
-#ifdef HAVE_AUTH_MODULE_NEGOTIATE
+#if HAVE_AUTH_MODULE_NEGOTIATE
CPPUNIT_TEST_SUITE_REGISTRATION( testAuthNegotiateUserRequest );
#endif
}
}
-#ifdef HAVE_AUTH_MODULE_BASIC
+#if HAVE_AUTH_MODULE_BASIC
#include "auth/basic/auth_basic.h"
/* AuthBasicUserRequest::AuthBasicUserRequest works
*/
}
#endif /* HAVE_AUTH_MODULE_BASIC */
-#ifdef HAVE_AUTH_MODULE_DIGEST
+#if HAVE_AUTH_MODULE_DIGEST
#include "auth/digest/auth_digest.h"
/* AuthDigestUserRequest::AuthDigestUserRequest works
*/
}
#endif /* HAVE_AUTH_MODULE_DIGEST */
-#ifdef HAVE_AUTH_MODULE_NTLM
+#if HAVE_AUTH_MODULE_NTLM
#include "auth/ntlm/auth_ntlm.h"
/* AuthNTLMUserRequest::AuthNTLMUserRequest works
*/
}
#endif /* HAVE_AUTH_MODULE_NTLM */
-#ifdef HAVE_AUTH_MODULE_NEGOTIATE
+#if HAVE_AUTH_MODULE_NEGOTIATE
#include "auth/negotiate/auth_negotiate.h"
/* AuthNegotiateUserRequest::AuthNegotiateUserRequest works
*/
void construction();
};
-#ifdef HAVE_AUTH_MODULE_BASIC
+#if HAVE_AUTH_MODULE_BASIC
class testAuthBasicUserRequest : public CPPUNIT_NS::TestFixture
{
CPPUNIT_TEST_SUITE( testAuthBasicUserRequest );
};
#endif
-#ifdef HAVE_AUTH_MODULE_DIGEST
+#if HAVE_AUTH_MODULE_DIGEST
class testAuthDigestUserRequest : public CPPUNIT_NS::TestFixture
{
CPPUNIT_TEST_SUITE( testAuthDigestUserRequest );
};
#endif
-#ifdef HAVE_AUTH_MODULE_NTLM
+#if HAVE_AUTH_MODULE_NTLM
class testAuthNTLMUserRequest : public CPPUNIT_NS::TestFixture
{
CPPUNIT_TEST_SUITE( testAuthNTLMUserRequest );
};
#endif
-#ifdef HAVE_AUTH_MODULE_NEGOTIATE
+#if HAVE_AUTH_MODULE_NEGOTIATE
class testAuthNegotiateUserRequest : public CPPUNIT_NS::TestFixture
{
CPPUNIT_TEST_SUITE( testAuthNegotiateUserRequest );
/* no debugs() here; bad things happen if the signal is delivered during _db_print() */
if (state == 0) {
-#ifndef MEM_GEN_TRACE
+#if !MEM_GEN_TRACE
Debug::parseOptions("ALL,7");
#else
state = 1;
} else {
-#ifndef MEM_GEN_TRACE
+#if !MEM_GEN_TRACE
Debug::parseOptions(Debug::debugOptions);
#else
return NULL;
}
-#ifdef HARDCODE_DENY_PORTS
+#if HARDCODE_DENY_PORTS
/* These ports are filtered in the default squid.conf, but
* maybe someone wants them hardcoded... */
if (port == 7 || port == 9 || port == 19) {
break;
case PROTO_HTTPS:
-#ifdef USE_SSL
+#if USE_SSL
rc = 1;
}
-#ifdef USE_HASH_DRIVER
+#if USE_HASH_DRIVER
/*
* hash-driver - Run with a big file as stdin to insert each line into the
* hash table, then prints the whole hash table, then deletes a random item,
#if HAVE_FCNTL_H
#include <fcntl.h>
#endif
-#ifdef HAVE_STRING_H
+#if HAVE_STRING_H
#include <string.h>
#endif
-#ifdef HAVE_STRINGS_H
+#if HAVE_STRINGS_H
#include <strings.h>
#endif
-#ifdef HAVE_BSTRING_H
+#if HAVE_BSTRING_H
#include <bstring.h>
#endif
#if HAVE_SYS_TYPES_H
#if HAVE_FCNTL_H
#include <fcntl.h>
#endif
-#ifdef HAVE_STRING_H
+#if HAVE_STRING_H
#include <string.h>
#endif
-#ifdef HAVE_STRINGS_H
+#if HAVE_STRINGS_H
#include <strings.h>
#endif
#if HAVE_SYS_TYPES_H
#if HAVE_FCNTL_H
#include <fcntl.h>
#endif
-#ifdef HAVE_STRING_H
+#if HAVE_STRING_H
#include <string.h>
#endif
-#ifdef HAVE_STRINGS_H
+#if HAVE_STRINGS_H
#include <strings.h>
#endif
#if HAVE_SYS_TYPES_H