]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Converted many #ifdefs to #ifs
authorFrancesco Chemolli <kinkie@squid-cache.org>
Sat, 26 Dec 2009 00:25:57 +0000 (01:25 +0100)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Sat, 26 Dec 2009 00:25:57 +0000 (01:25 +0100)
88 files changed:
compat/os/aix.h
compat/os/mswin.h
compat/os/openbsd.h
compat/os/solaris.h
compat/stdvarargs.h
helpers/basic_auth/SASL/sasl_auth.c
helpers/external_acl/mswin_ad_group/mswin_check_ad_group.c
helpers/external_acl/mswin_lm_group/win32_check_group.c
helpers/external_acl/session/squid_session.c
helpers/negotiate_auth/kerberos/negotiate_kerberos_auth_test.cc
helpers/ntlm_auth/smb_lm/libntlmssp.c
helpers/ntlm_auth/smb_lm/ntlm_smb_lm_auth.c
include/config.h
include/getaddrinfo.h
include/getnameinfo.h
include/profiling.h
include/snmp_api.h
include/snmp_api_util.h
include/squid_endian.h
include/util.h
lib/Profiler.c
lib/drand48.c
lib/getaddrinfo.c
lib/getnameinfo.c
lib/hash.c
lib/inet_ntop.c
lib/inet_pton.c
lib/initgroups.c
lib/libTrie/include/Trie.h
lib/libTrie/include/TrieCharTransform.h
lib/libTrie/include/TrieNode.cci
lib/libTrie/include/TrieNode.h
lib/libTrie/src/Trie.cc
lib/libTrie/src/TrieNode.cc
lib/ntlmauth.c
lib/rfc1123.c
lib/strsep.c
lib/strtoll.c
lib/win32lib.c
snmplib/asn1.c
snmplib/coexistance.c
snmplib/mib.c
snmplib/parse.c
snmplib/snmp_api.c
snmplib/snmp_api_error.c
snmplib/snmp_msg.c
snmplib/snmp_pdu.c
snmplib/snmp_vars.c
src/AclRegs.cc
src/AuthReg.cc
src/DiskIO/DiskThreads/DiskThreads.h
src/MemBuf.cc
src/MemBuf.h
src/PingData.h
src/ProfStats.cc
src/SquidString.h
src/Store.h
src/String.cc
src/String.cci
src/auth/User.cc
src/auth/User.h
src/cbdata.cc
src/client_side_request.cc
src/client_side_request.h
src/comm.cc
src/comm_epoll.cc
src/comm_poll.cc
src/comm_select.cc
src/comm_select_win32.cc
src/dns_internal.cc
src/dnsserver.cc
src/fs/Module.cc
src/fs/ufs/ufscommon.cc
src/fs/ufs/ufscommon.h
src/squid.h
src/ssl_support.cc
src/stat.cc
src/store.cc
src/tests/stub_client_side_request.cc
src/tests/stub_store.cc
src/tests/testAuth.cc
src/tests/testAuth.h
src/tools.cc
src/url.cc
test-suite/hash.c
test-suite/pconn-banger.c
test-suite/tcp-banger2.c
test-suite/tcp-banger3.c

index 3286eb49a4579ea00bebdc7668657ffaae0004a6..be41cd5dc292f5328c51c01cef27985781f82328 100644 (file)
@@ -17,7 +17,7 @@
 /*
  * 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
index 2c3944ab13ea44a8cf8197d2862054cc8804fbdd..314af223a7b0b2669f77bc0fb232aaa29f97ef27 100644 (file)
@@ -210,7 +210,7 @@ struct statfs {
     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 */
index eae2cdf003bd0042edddce73f60e801d49fe0ded..dc9375459e136be8fb2e4b29ac3b6acbfc9bae9e 100644 (file)
@@ -16,7 +16,7 @@
 /*
  * Don't allow inclusion of malloc.h
  */
-#ifdef HAVE_MALLOC_H
+#if HAVE_MALLOC_H
 #undef HAVE_MALLOC_H
 #endif
 
index fe1c039ea31f98fd97edea3d605fc548e4d705a0..12793ef7b9d4103e14bd1b7d776e619d7b6a2a88 100644 (file)
  * 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];
index c38a2cf2c9a84126471195f0886ff875f7f5dbdc..c8c10f9cef0124ae894605e2952d7140850a6383 100644 (file)
@@ -31,7 +31,7 @@
 #endif
 
 /* Make sure syslog goes after stdarg/varargs */
-#ifdef HAVE_SYSLOG_H
+#if HAVE_SYSLOG_H
 #include <syslog.h>
 #endif
 
index 6efa30dfeaf0bd6522099f69fe43f6855247cbcd..f45f7849ef0b957316c11fdb70f10d5e317976ba 100644 (file)
@@ -34,7 +34,7 @@
 #include "rfc1738.h"
 #include "util.h"
 
-#ifdef HAVE_SASL_SASL_H
+#if HAVE_SASL_SASL_H
 #include <sasl/sasl.h>
 #else
 #include <sasl.h>
index f0edab38b53a2f864ddbabc50468d20e8a164bc3..cc65eb5811e14dbb497b668766ef20578f0a21c5 100644 (file)
@@ -57,7 +57,7 @@ int _wcsicmp(const wchar_t *, const wchar_t *);
 #if HAVE_CTYPE_H
 #include <ctype.h>
 #endif
-#ifdef HAVE_STRING_H
+#if HAVE_STRING_H
 #include <string.h>
 #endif
 #if HAVE_GETOPT_H
index da5d41fc2337e232f74c410fbf571bf17c354924..b8b2267118776740f391dac9225704339f3c58b9 100644 (file)
@@ -78,7 +78,7 @@ int _wcsicmp(const wchar_t *, const wchar_t *);
 #if HAVE_CTYPE_H
 #include <ctype.h>
 #endif
-#ifdef HAVE_STRING_H
+#if HAVE_STRING_H
 #include <string.h>
 #endif
 #if HAVE_GETOPT_H
index f92c0c98c322af69d9eee9e23b1c529451587d41..3af08324cb058ae352aceeaec41daa92a174a7c3 100644 (file)
@@ -18,7 +18,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
  */
 
-#ifdef HAVE_CONFIG_H
+#if HAVE_CONFIG_H
 #include "config.h"
 #endif
 
index dd9c2d84b9aaed9fd474fae3430b3bfdb316eff5..fd075a3e2cc56a602b8517707bd7dae403dbe1ce 100644 (file)
@@ -98,7 +98,7 @@ LogTime()
     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;
@@ -190,7 +190,7 @@ squid_kerb_proxy_auth(char *proxy)
 
     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,
index 11fcd69b191154c248475757ed2db9f9ab885d73..a0d34c13cdb97e9cc847a7194bc259ce8082ac13 100644 (file)
@@ -26,7 +26,7 @@ typedef unsigned char uchar;
 #if HAVE_STDLIB_H
 #include <stdlib.h>
 #endif /* HAVE_STDLIB_H */
-#ifdef HAVE_UNISTD_H
+#if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
 
@@ -63,7 +63,7 @@ int SMB_Negotiate(void *Con_Handle, char *Prots[]);
 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 */
index 597150bf8f42dc05a0603f9f31b17d87eb15a5bd..f14dd6d01b9e9348c76eeb4f314456152b3a32ab 100644 (file)
@@ -41,16 +41,16 @@ extern int RFCNB_Get_Last_Error(void);
 #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
 
@@ -62,12 +62,12 @@ const char * obtain_challenge(void);
 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
 
@@ -112,7 +112,7 @@ lc(char *string)
 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);
@@ -125,7 +125,7 @@ send_bh_or_ld(char const *bhmessage, ntlm_authenticate * failedauth, int authlen
     } else {
 #endif
         SEND2("BH %s", bhmessage);
-#ifdef NTLM_FAIL_OPEN
+#if NTLM_FAIL_OPEN
     }
 #endif
 }
@@ -171,7 +171,7 @@ process_options(int argc, char *argv[])
             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;
@@ -462,7 +462,7 @@ int
 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);
index 215a22a05223cfc4f5faf721efa7e2484d28bc6e..23f5b8f2ca5d43468ea91e8afce76f85b26de685 100644 (file)
@@ -67,7 +67,7 @@
 /* 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
@@ -76,7 +76,7 @@ typedef char int8_t;
 #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
@@ -85,7 +85,7 @@ typedef unsigned char u_int8_t;
 #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
@@ -96,7 +96,7 @@ typedef int int16_t;
 #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
@@ -105,7 +105,7 @@ typedef unsigned int16_t u_int16_t;
 #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
@@ -116,7 +116,7 @@ typedef long int32_t;
 #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
@@ -125,7 +125,7 @@ typedef unsigned int32_t u_int32_t;
 #endif
 
 /* int64_t */
-#ifndef HAVE_INT64_T
+#if !HAVE_INT64_T
 #if HAVE___INT64
 typedef __int64 int64_t;
 #elif HAVE_LONG && SIZEOF_LONG == 8
@@ -138,7 +138,7 @@ typedef long long int64_t;
 #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
@@ -147,35 +147,35 @@ typedef unsigned int64_t u_int64_t;
 #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
 
@@ -197,7 +197,7 @@ typedef long mtyp_t;
 #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))
@@ -205,7 +205,7 @@ typedef long mtyp_t;
 #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))
index a0aabf7347290d78a6b63063cc9e03ff33dd4b44..2148b649d2b8d9c71cd25d807a79f6b029995bcb 100644 (file)
@@ -44,7 +44,7 @@
 
 /* Structure and prototypes taken from RFC 2553 */
 
-#ifdef HAVE_GETADDRINFO
+#if HAVE_GETADDRINFO
 
 /* These functions are provided by the OS */
 #define xgetaddrinfo   getaddrinfo
index 7d9c750871f961bd0757409b66f7cc7eb9a7c003..c95d4245bcde07832cc31598f8ddfbfeb45f6aa8 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "config.h"
 
-#ifdef HAVE_GETNAMEINFO
+#if HAVE_GETNAMEINFO
 
 /* These functions are provided by the OS */
 #define xgetnameinfo   getnameinfo
index 5e617120de97554bb23b66089538b195f1f8b2c6..03b0f861c500c56420fca0cf72b43e8cd87c19c3 100644 (file)
@@ -10,7 +10,7 @@
 class CacheManager;
 #endif
 
-#ifdef USE_XPROF_STATS
+#if USE_XPROF_STATS
 
 #if !defined(_SQUID_SOLARIS_)
 typedef int64_t  hrtime_t;
@@ -77,7 +77,7 @@ get_tick(void)
 
 #endif /* USE_XPROF_STATS - maybe disabled above */
 
-#ifdef USE_XPROF_STATS
+#if USE_XPROF_STATS
 
 typedef enum {
     XPROF_PROF_UNACCOUNTED,
index 7614c4fd0698ece052919d70657e0e7212ca1f5c..e738f90e3907526c222f71537f119a35a3310548 100644 (file)
@@ -6,7 +6,7 @@
 #define SQUID_SNMP_API_H
 
 #include "config.h"
-#ifdef HAVE_SYS_TIME_H
+#if HAVE_SYS_TIME_H
 #include <sys/time.h>
 #endif
 
index 52b745129eeec2f7311e7fc70bb73fe85a93f610..40a7a99d971a270aff05935c3d17214e748fe15a 100644 (file)
@@ -79,7 +79,7 @@ struct snmp_internal_session {
 #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 */
index e0e92c70a1859f543912a6ac4f98c65536140781..027b30542d0d8a0213887be3d9dd68dfb58f26c9 100644 (file)
@@ -68,7 +68,7 @@
 #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
index 0bf570b4c272bc99b2a012f74441aeb1f315c56e..e4d28827962a26037fc3e5ef58b94e6b2aaeecfe 100644 (file)
@@ -157,7 +157,7 @@ int statMemoryAccounted(void);
 #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);
index 0e5b7aec5ba9b4daeac20403d131a1405964965f..f274b03947537569ab4be06341c51c6db2032565 100644 (file)
 
 #include <assert.h>
 
-#ifdef USE_XPROF_STATS
+#if USE_XPROF_STATS
 
 
 #if HAVE_GNUMALLLOC_H
index 0a9927eec7f0d14544f6a984fb0ffed044f58f38..febb86bada86839b1a86219ce1cd9c7809f62759 100644 (file)
@@ -4,7 +4,7 @@
  * 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)
index 25917df2afe1521a9e55cfe85eb9468894507ab8..7c3ea520ef1e4c3583226364159d92ad6bdce28b 100644 (file)
@@ -43,7 +43,7 @@
 /* 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
index ab8ac0f2185ab9050b7c7ff1958d1fa0347df634..33c97d0fa762323b1ed76c5bdab9b2bb0af88302 100644 (file)
@@ -75,7 +75,7 @@
  *     - 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
@@ -135,7 +135,7 @@ static const struct afd {
     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)},
@@ -146,7 +146,7 @@ static const struct afd {
     {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));
@@ -175,7 +175,7 @@ int flags;
     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
@@ -232,7 +232,7 @@ found:
         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;
@@ -270,11 +270,11 @@ found:
 
         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;
@@ -303,13 +303,13 @@ found:
             }
 #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 {
@@ -318,7 +318,7 @@ found:
 
 numeric:
             switch (afd->a_af) {
-#ifdef INET6
+#if INET6
             case AF_INET6: {
                 int error;
 
@@ -340,7 +340,7 @@ numeric:
     return(0);
 }
 
-#ifdef INET6
+#if INET6
 static int
 ip6_parsenumeric(sa, addr, host, hostlen, flags)
 const struct sockaddr *sa;
@@ -397,7 +397,7 @@ int flags;
     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)
index 0db0e8476cdde357daefaed58a51f3b0088b5b3b..be3a3c01725744d34ba41f4fde2ecae7f4d1350b 100644 (file)
@@ -362,7 +362,7 @@ hashKeyStr(hash_link * hl)
 }
 
 
-#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,
index cc0b60a525955e24f2e4a18974300c45109ac610..6e1fe0ef663e895e2cdd4ab11e661a69be6078c8 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "config.h"
 
-#ifndef HAVE_INET_NTOP
+#if !HAVE_INET_NTOP
 #include "inet_ntop.h"
 
 /*
index e12873618b12d99c29f9ea072cf3bd67297b71b3..4753b74346afc339f0dacc538806a7d848022193 100644 (file)
@@ -20,7 +20,7 @@
 
 #include "config.h"
 
-#ifndef HAVE_INET_PTON
+#if !HAVE_INET_PTON
 
 /*
  * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
index 41f8e3f68b123751fe8d33b087c3ef295427aaab..e93d0fb2cb9bbc21b43f178a89849b9f112ab2a4 100644 (file)
@@ -24,7 +24,7 @@
 
 int initgroups(const char *name, gid_t basegid)
 {
-#ifdef HAVE_SETGROUPS
+#if HAVE_SETGROUPS
 #ifndef NGROUPS_MAX
 #define NGROUPS_MAX 16
 #endif
index 927aea4437cd77490bf12e33cb3cf5d4bfb2ebc9..a794c068148148848234de2e6d3dac73e8407ffb 100644 (file)
@@ -25,7 +25,7 @@
  * bindings. libtrie itself is written in C++.
  */
 
-#ifdef HAVE_CONFIG_H
+#if HAVE_CONFIG_H
 #include "config.h"
 #endif
 
index d4f18f86dfda4d0c8eb7122dad99f7b2d6216b67..71174f8cf96c0ad4117e8e1977f713a7f2851eba 100644 (file)
@@ -27,7 +27,7 @@
  * For C bindings see Trie.h
  */
 
-#ifdef HAVE_CONFIG_H
+#if HAVE_CONFIG_H
 #include "config.h"
 #endif
 
index 6efe3751500053336810735e8acba3a3457e092f..c5f36e46bb6ea7f5f5a0b01e4933070f8c2141f6 100644 (file)
@@ -20,7 +20,7 @@
 #ifdef __cplusplus
 #include "TrieNode.h"
 #include "TrieCharTransform.h"
-#ifdef HAVE_UNISTD_H
+#if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
 #include <ctype.h>
index 548bda7827f752026aaa514da5360b60bbccd61a..a1cbe5a6abd720b2f3afcbcd307ccc5d19954dcf 100644 (file)
@@ -27,7 +27,7 @@
  * For C bindings see Trei.h
  */
 
-#ifdef HAVE_CONFIG_H
+#if HAVE_CONFIG_H
 #include "config.h"
 #endif
 
index 5d5c6dc133c48abdde704ce42bc69ddfabe5ff6c..1df38968c6d82ca60ae69528364a39fc042d4ce6 100644 (file)
@@ -18,7 +18,7 @@
  */
 
 #include "Trie.h"
-#ifdef HAVE_UNISTD_H
+#if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
 #include "TrieNode.h"
index bc1af21a9f7e706eb787be7bddc2b390fc42da08..3d6bea5c77b9e2d2a8cfb276c5cc377a14dd2b4b 100644 (file)
@@ -19,7 +19,7 @@
 
 #include "TrieNode.h"
 #include "TrieCharTransform.h"
-#ifdef HAVE_UNISTD_H
+#if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
 
index 983822192e68284dbfea721d19ea9abb9a00e9e0..8eaf1e5fc482af3f54a3247205420b041f801aeb 100644 (file)
 
 #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
 
index dd98d360ae007b4c5ccb370a1163e03be1be168f..c7cf1589a178a9a6948ae3e932f64773aec4bc0e 100644 (file)
@@ -204,7 +204,7 @@ parse_rfc1123(const char *str)
     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);
@@ -261,7 +261,7 @@ mkhttpdlogtime(const time_t * t)
 
     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;
index 6335cbeda404beeaa8e8fdd9a00394cc5d04be2d..8d134814a65b690f5dad85a942de4942aebbac74 100644 (file)
@@ -21,7 +21,7 @@
  * USA.
  */
 
-#ifdef HAVE_CONFIG_H
+#if HAVE_CONFIG_H
 #include <config.h>
 #endif
 
index 50f705da9bd0275401ecffefff8ed4733297ad2f..1b46fd79579b694688894ab23219f8536ebbabd2 100644 (file)
@@ -33,7 +33,7 @@
 
 /* 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
index 55526e5e61f3766ca25aedd6119945340c076f66..69af1de0d6c556d03618021bde5f6201630add2d 100644 (file)
@@ -182,7 +182,7 @@ kill(pid_t pid, int sig)
         return 0;
 }
 
-#ifndef HAVE_GETTIMEOFDAY
+#if !HAVE_GETTIMEOFDAY
 int
 gettimeofday(struct timeval *pcur_time, void *tzp)
 {
index 6cc84d0dbbf08f0121118796e9c21afc402120e9..b2ccfde3dc78838cda6cca03951f515421d7b629 100644 (file)
 #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
index 89a8702012067713bc59615c8697dbcdec8838bc..429d78d77f1fcd1cf162b5cb141efcfdec78334c 100644 (file)
 #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
@@ -109,7 +109,7 @@ snmp_coexist_V2toV1(struct snmp_pdu *PDU)
 
     case SNMP_PDU_GET:
     case SNMP_PDU_GETNEXT:
-#ifdef SNMP_PDU_SET
+#if SNMP_PDU_SET
     case SNMP_PDU_SET:
 #endif
         return (1);
index f4b1337975a077c5584823ff3839df33564988e0..58cffae36201d11fff58c28eea906c52538da564 100644 (file)
@@ -45,10 +45,10 @@ SOFTWARE.
 #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
index 517b01d2ad6c2b89f0b9fec585b592501f0e3461..9c56c957afcc42ac777ac630de66a9b09382d52a 100644 (file)
@@ -47,10 +47,10 @@ SOFTWARE.
 #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
@@ -271,7 +271,7 @@ print_error(const char *string, const char *token, int type)
         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;
@@ -424,7 +424,7 @@ do_subtree(struct snmp_mib_tree *root, struct node **nodes)
         xfree(oldnp);
 }
 
-#ifndef TEST
+#if !TEST
 static
 #endif
 struct snmp_mib_tree *
@@ -447,7 +447,7 @@ build_tree(struct node *nodes) {
     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 */
@@ -974,7 +974,7 @@ parse_objecttype(register FILE *fp, char *name) {
  * 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 *
@@ -1042,7 +1042,7 @@ parse(FILE *fp) {
             return NULL;
         }
     }
-#ifdef TEST
+#if TEST
     {
         struct enum_list *ep;
 
index 5e6d5081dd02588d0572c5825e10c9f8083fffea..c22d7e9a749280259a5fe63692924d14901a7195 100644 (file)
 #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
index 260117e9517d2329fd30e7bee4ecd730b07bfec8..e9a23e0094b3fe70d4e9c68969485006fd64bfa2 100644 (file)
@@ -30,7 +30,7 @@
  *
  ***************************************************************************/
 
-#ifdef HAVE_CONFIG_H
+#if HAVE_CONFIG_H
 #include "config.h"
 #endif /* HAVE_CONFIG_H */
 
index bc8ef64128a193eb43a64d20d9703f8cf84ae73c..2fb85665b549492411a1064f6bbce2f9e79ffe60 100644 (file)
 #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
@@ -206,7 +206,7 @@ snmp_msg_Encode(u_char * Buffer, int *BufLenP,
 
     /* 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",
@@ -219,7 +219,7 @@ snmp_msg_Encode(u_char * Buffer, int *BufLenP,
     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
index a52ba24a7745ff9a373ce0d0e9c3ad36031d78c4..418e4969c2183cfd8945f684dddb3b1d80e7d777 100644 (file)
 #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
@@ -107,7 +107,7 @@ struct snmp_pdu *
 snmp_pdu_create(int command) {
     struct snmp_pdu *pdu;
 
-#ifdef DEBUG_PDU
+#if DEBUG_PDU
     snmplib_debug(8, "PDU:  Creating\n");
 #endif
 
@@ -126,7 +126,7 @@ snmp_pdu_create(int command) {
     pdu->enterprise_length = 0;
     pdu->variables = NULL;
 
-#ifdef DEBUG_PDU
+#if DEBUG_PDU
     snmplib_debug(8, "PDU:  Created %x\n", (unsigned int) pdu);
 #endif
 
@@ -141,7 +141,7 @@ struct snmp_pdu *
 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
 
@@ -152,7 +152,7 @@ snmp_pdu_clone(struct snmp_pdu *Src) {
     }
     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);
@@ -183,7 +183,7 @@ snmp_fix_pdu(struct snmp_pdu *pdu, int command) {
     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
@@ -256,7 +256,7 @@ snmp_fix_pdu(struct snmp_pdu *pdu, int command) {
         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
@@ -347,7 +347,7 @@ snmp_pdu_encode(u_char * DestBuf, int *DestBufLen,
 {
     u_char *bufp;
 
-#ifdef DEBUG_PDU_ENCODE
+#if DEBUG_PDU_ENCODE
     snmplib_debug(8, "PDU: Encoding %d\n", PDU->command);
 #endif
 
@@ -355,7 +355,7 @@ snmp_pdu_encode(u_char * DestBuf, int *DestBufLen,
     switch (PDU->command) {
 
         /**********************************************************************/
-#ifdef TRP_REQ_MSG
+#if TRP_REQ_MSG
     case TRP_REQ_MSG:
 
         /* SNMPv1 Trap */
@@ -436,7 +436,7 @@ snmp_pdu_encode(u_char * DestBuf, int *DestBufLen,
         /* 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,
@@ -446,7 +446,7 @@ snmp_pdu_encode(u_char * DestBuf, int *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,
@@ -456,7 +456,7 @@ snmp_pdu_encode(u_char * DestBuf, int *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,
@@ -485,7 +485,7 @@ snmp_pdu_decode(u_char * Packet,    /* data */
     u_char *bufp;
     u_char PDUType;
     u_char ASNType;
-#ifdef UNUSED_CODE
+#if UNUSED_CODE
     int four;
     oid objid[MAX_NAME_LEN];
 #endif
@@ -494,14 +494,14 @@ snmp_pdu_decode(u_char * Packet,  /* data */
     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 */
@@ -596,7 +596,7 @@ snmp_pdu_decode(u_char * Packet,    /* data */
         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
 
@@ -607,7 +607,7 @@ snmp_pdu_decode(u_char * Packet,    /* data */
         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
 
@@ -618,7 +618,7 @@ snmp_pdu_decode(u_char * Packet,    /* data */
         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
 
index 0c89ee26ed26572bf9a4c4c46e7bb35233fdf872..09d5680051823e6e862d26673e40c0803e411c3b 100644 (file)
 #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
@@ -108,7 +108,7 @@ struct variable_list *
 snmp_var_new(oid * Name, int Len) {
     struct variable_list *New;
 
-#ifdef DEBUG_VARS
+#if DEBUG_VARS
     printf("VARS: Creating.\n");
 #endif
 
@@ -135,7 +135,7 @@ snmp_var_new(oid * Name, int Len) {
         snmp_set_api_error(SNMPERR_OS_ERR);
         return (NULL);
     }
-#ifdef DEBUG_VARS
+#if DEBUG_VARS
     printf("VARS: Copying name, size (%d)\n", Len);
 #endif
 
@@ -165,7 +165,7 @@ struct variable_list *
 snmp_var_clone(struct variable_list *Src) {
     struct variable_list *Dest;
 
-#ifdef DEBUG_VARS
+#if DEBUG_VARS
     printf("VARS: Cloning.\n");
 #endif
 
@@ -174,7 +174,7 @@ snmp_var_clone(struct variable_list *Src) {
         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
@@ -188,7 +188,7 @@ snmp_var_clone(struct variable_list *Src) {
             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,
@@ -204,15 +204,15 @@ snmp_var_clone(struct variable_list *Src) {
             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
@@ -382,7 +382,7 @@ snmp_var_DecodeVarBind(u_char * Buffer, int *BufLen,
     int ThisVarLen = 0;
 
     VarLastP = VarP;
-#ifdef DEBUG_VARS_DECODE
+#if DEBUG_VARS_DECODE
     printf("VARS: Decoding buffer of length %d\n", *BufLen);
 #endif
 
@@ -395,7 +395,7 @@ snmp_var_DecodeVarBind(u_char * Buffer, int *BufLen,
         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
 
@@ -426,7 +426,7 @@ snmp_var_DecodeVarBind(u_char * Buffer, int *BufLen,
             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
 
@@ -442,7 +442,7 @@ snmp_var_DecodeVarBind(u_char * Buffer, int *BufLen,
             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
@@ -457,7 +457,7 @@ snmp_var_DecodeVarBind(u_char * Buffer, int *BufLen,
             PARSE_ERROR;
         ThisVarLen = DataLen;
 
-#ifdef DEBUG_VARS_DECODE
+#if DEBUG_VARS_DECODE
         printf("VARS: Data type %d\n", Var->type);
 #endif
 
@@ -475,7 +475,7 @@ snmp_var_DecodeVarBind(u_char * Buffer, int *BufLen,
             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
@@ -494,7 +494,7 @@ snmp_var_DecodeVarBind(u_char * Buffer, int *BufLen,
             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
@@ -512,7 +512,7 @@ snmp_var_DecodeVarBind(u_char * Buffer, int *BufLen,
             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
@@ -532,7 +532,7 @@ snmp_var_DecodeVarBind(u_char * Buffer, int *BufLen,
             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
@@ -558,7 +558,7 @@ snmp_var_DecodeVarBind(u_char * Buffer, int *BufLen,
         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 */
index 842069c8aa1b8cf21c7080f5eeede7fef6795e19..139dad8e7021c17cb17ad5973eb35a00714b7c17 100644 (file)
@@ -6,7 +6,7 @@
 */
 
 #include "acl/Acl.h"
-#ifdef USE_SQUID_EUI
+#if USE_SQUID_EUI
 #include "acl/Arp.h"
 #include "acl/Eui64.h"
 #endif
@@ -48,7 +48,7 @@
 #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"
@@ -129,7 +129,7 @@ ACLStrategised<char const *> ACLUrlPath::RegistryEntry_(new ACLRegexData, ACLUrl
 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");
@@ -138,7 +138,7 @@ ACL::Prototype ACLCertificate::CARegistryProtoype(&ACLCertificate::CARegistryEnt
 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");
index dce94ec32f39ed26d3042482f869ee23749142e6..6590df16af6927ab5e4265319e54f1cd1264e6b6 100644 (file)
@@ -1,35 +1,35 @@
 #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
 
index 8654257ed7a3f5b6263b2486a09faa3765269e31..15210ec97b0d233b7319eb2ee7c01732a32d512d 100644 (file)
@@ -11,7 +11,7 @@
 #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)
index 4bce79907ed06b28cd698edd806041f017fffee2..1a2713a7af37a7e526e30880ab3f5e01836e3e0e 100644 (file)
@@ -421,6 +421,6 @@ memBufReport(MemBuf * mb)
     mb->Printf("memBufReport is not yet implemented @?@\n");
 }
 
-#ifndef _USE_INLINE_
+#if !_USE_INLINE_
 #include "MemBuf.cci"
 #endif
index bd8c41ac68eeb3dd5abf53add75469aae0d39a8e..c682a7bdf020a4246b6c7c77942f61b8ff42b1e5 100644 (file)
@@ -169,7 +169,7 @@ public:
 #endif
 };
 
-#ifdef _USE_INLINE_
+#if _USE_INLINE_
 #include "MemBuf.cci"
 #endif
 
index bca2e1c859f04108485eab78b4ad20e3654c6aee..6d7eddd4900bf7f6824151ddf4013f5234fc9dab 100644 (file)
@@ -35,7 +35,7 @@
 
 #include "config.h"
 
-#ifdef HAVE_SYS_TIME_H
+#if HAVE_SYS_TIME_H
 #include <sys/time.h>
 #endif
 
index 5e35ba731ea7ed23689ba80c96f1ba897d409428..8ea82a64d5d747462bd4190bd54158780850e557 100644 (file)
@@ -35,7 +35,7 @@
 
 #include "squid.h"
 
-#ifdef USE_XPROF_STATS
+#if USE_XPROF_STATS
 
 #include "CacheManager.h"
 #include "event.h"
index 657cd7dfcc079c11911f3400d90c10edfe8059d7..60da24a9786994732efca0f442b5c21421948ded 100644 (file)
@@ -181,7 +181,7 @@ private:
 
 _SQUID_INLINE_ std::ostream & operator<<(std::ostream& os, String const &aString);
 
-#ifdef _USE_INLINE_
+#if _USE_INLINE_
 #include "String.cci"
 #endif
 
index 854b4fd896bad3e9da0526a80e44669376732270..0941059169972532f63e31ac4347b1d8f8e52f85 100644 (file)
@@ -380,7 +380,7 @@ SQUIDCEXTERN void packerToStoreInit(Packer * p, StoreEntry * e);
 /// \ingroup StoreAPI
 SQUIDCEXTERN void storeGetMemSpace(int size);
 
-#ifdef _USE_INLINE_
+#if _USE_INLINE_
 #include "Store.cci"
 #endif
 
index 40eae2c59e644b40278cdc9bbd4f15a8b1743ed5..0d16b695545ece73d5e18442cef8b51fb8d4c07a 100644 (file)
@@ -492,6 +492,6 @@ String::rfind(char const ch) const
 
 
 
-#ifndef _USE_INLINE_
+#if !_USE_INLINE_
 #include "String.cci"
 #endif
index 085f383517e5557fc7813dcd970d88455f4e89bb..2875a71237346e6be10be67c0b4462abd742a822 100644 (file)
@@ -35,7 +35,7 @@
 #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
index 71094e1c0653ab20992a29561cdb52f0d2f573f5..ae457240120fb365bb62076b2e6d58cadcda6dac 100644 (file)
@@ -43,7 +43,7 @@
 #include "event.h"
 #include "SquidTime.h"
 
-#ifndef _USE_INLINE_
+#if !_USE_INLINE_
 #include "auth/User.cci"
 #endif
 
index 47a99337e93b54e3b0655b04fcf4b0cc53adb74f..92c7a0d939c6fd67c6a1759e0517604de2b783a6 100644 (file)
@@ -111,7 +111,7 @@ private:
     dlink_list ip_list;
 };
 
-#ifdef _USE_INLINE_
+#if _USE_INLINE_
 #include "auth/User.cci"
 #endif
 
index ab5ee3a6e80a6dd26921aa68c85a84f704b890a2..c876e618c5204c206b229f92b972474c0569841d 100644 (file)
@@ -173,7 +173,7 @@ MEMPROXY_CLASS_INLINE(cbdata);
 #endif
 
 static OBJH cbdataDump;
-#ifdef CBDATA_DEBUG
+#if CBDATA_DEBUG
 static OBJH cbdataDumpHistory;
 #endif
 
index 434c1ce2026a29575592806c8767250158f5968e..9ee3741cab0ec9f680d6aac4cc50533a32d0d20d 100644 (file)
@@ -1329,7 +1329,7 @@ ClientHttpRequest::doCallouts()
 #endif
 }
 
-#ifndef _USE_INLINE_
+#if !_USE_INLINE_
 #include "client_side_request.cci"
 #endif
 
index f30335d171311e7651f64257416651f31e322d6b..76cd869e2a910bbea612130e38fe5b18caa23e67 100644 (file)
@@ -198,7 +198,7 @@ SQUIDCEXTERN void redirectStart(ClientHttpRequest *, RH *, void *);
 
 SQUIDCEXTERN void tunnelStart(ClientHttpRequest *, int64_t *, int *);
 
-#ifdef _USE_INLINE_
+#if _USE_INLINE_
 #include "Store.h"
 #include "client_side_request.cci"
 #endif
index 6d6da26ac6cc8ccd35799d374817809bc9eff73c..78be1f1d5d853abd6e88862179ef5bca5df731fc 100644 (file)
@@ -52,7 +52,7 @@
 #if defined(_SQUID_CYGWIN_)
 #include <sys/ioctl.h>
 #endif
-#ifdef HAVE_NETINET_TCP_H
+#if HAVE_NETINET_TCP_H
 #include <netinet/tcp.h>
 #endif
 
@@ -234,7 +234,7 @@ static void commPlanHalfClosedCheck();
 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);
@@ -658,7 +658,7 @@ limitError(int const anErrno)
 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());
@@ -672,7 +672,7 @@ comm_set_tos(int fd, int tos)
 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());
     }
@@ -830,7 +830,7 @@ comm_openex(int sock_type,
             PROF_stop(comm_open);
         }
 
-#ifdef TCP_NODELAY
+#if TCP_NODELAY
     if (sock_type == SOCK_STREAM)
         commSetTcpNoDelay(new_socket);
 
@@ -957,7 +957,7 @@ copyFDFlags(int to, fde *F)
     if (F->flags.nonblocking)
         commSetNonBlocking(to);
 
-#ifdef TCP_NODELAY
+#if TCP_NODELAY
 
     if (F->flags.nodelay)
         commSetTcpNoDelay(to);
@@ -1784,7 +1784,7 @@ commSetTcpRcvbuf(int fd, int size)
         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
@@ -1868,7 +1868,7 @@ commUnsetNonBlocking(int fd)
 void
 commSetCloseOnExec(int fd)
 {
-#ifdef FD_CLOEXEC
+#if FD_CLOEXEC
     int flags;
     int dummy = 0;
 
@@ -1885,7 +1885,7 @@ commSetCloseOnExec(int fd)
 #endif
 }
 
-#ifdef TCP_NODELAY
+#if TCP_NODELAY
 static void
 commSetTcpNoDelay(int fd)
 {
@@ -1903,20 +1903,20 @@ void
 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());
@@ -2107,7 +2107,7 @@ ignoreErrno(int ierrno)
     case EALREADY:
 
     case EINTR:
-#ifdef ERESTART
+#if ERESTART
 
     case ERESTART:
 #endif
@@ -2226,7 +2226,7 @@ comm_listen(int sock)
     }
 
     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);
@@ -2234,7 +2234,7 @@ comm_listen(int 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);
index 9d9031430b7ccdb3756db0d376bc1a4055543d6c..c0e72db30ddb306edde63f99fc9efebd5377949f 100644 (file)
@@ -59,7 +59,7 @@
 #include "fde.h"
 #include "SquidTime.h"
 
-#ifdef USE_EPOLL
+#if USE_EPOLL
 
 #define DEBUG_EPOLL 0
 
index 9be098844e3e1a196c3a426d5387479418f52dba..99c4ea43916d1fbb592fbbee6ab4f73b81d5bc3f 100644 (file)
@@ -39,7 +39,7 @@
 #include "Store.h"
 #include "fde.h"
 
-#ifdef USE_POLL
+#if USE_POLL
 
 static int MAX_POLL_TIME = 1000;       /* see also comm_quick_poll_required() */
 
index b62af37594f122ab1992241537fe051beb5483c6..2e5df7358a1062b35f1dffc600fb53a6bc8f2295 100644 (file)
@@ -37,7 +37,7 @@
 #include "CacheManager.h"
 #include "SquidTime.h"
 
-#ifdef USE_SELECT
+#if USE_SELECT
 #include "Store.h"
 #include "fde.h"
 
index cb6e9fa02350d96cc7397610abcdda3aa1ad382b..c0a550f3e5bc6d2e7e88f43f2edce3c8a2cb7f3b 100644 (file)
@@ -37,7 +37,7 @@
 #include "CacheManager.h"
 #include "SquidTime.h"
 
-#ifdef USE_SELECT_WIN32
+#if USE_SELECT_WIN32
 #include "Store.h"
 #include "fde.h"
 
index 3ca09df98a85698636d9a4b86bca63ebd75ccdbc..40aa53803913b843d45d6311da323a1dc5c6f30b 100644 (file)
@@ -56,7 +56,7 @@
    #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"
index d112d59ce22666882f0d2e8edc7ef51d55940268..44369f69bda3b1f1b8949ef21f52dca6076498c6 100644 (file)
 #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
@@ -331,11 +331,11 @@ lookup(const char *buf)
         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));
index 8833a1bbefe213d13cca5e3a9853da55c5d5d573..f1c65fb839590186ffc8303c45ca8c0d59a7082b 100644 (file)
@@ -5,20 +5,20 @@
 #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
 
@@ -27,7 +27,7 @@ static StoreFSufs<UFSSwapDir> *DiskdInstance;
  * (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
 
@@ -35,16 +35,16 @@ StoreFScoss &CossInstance = StoreFScoss::GetInstance();
 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
 
@@ -53,16 +53,16 @@ void Fs::Init()
 
 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
 
index d994e97d0af1f209e79ad84a83e264f272261cc6..7f215693cbb6d526af3d7c97636c88bf210b78bb 100644 (file)
@@ -821,6 +821,6 @@ RebuildState::currentItem()
     return currentEntry();
 }
 
-#ifndef _USE_INLINE_
+#if !_USE_INLINE_
 #include "ufscommon.cci"
 #endif
index 815e3b2d641402220bf88a49f7abbd995089368c..1d21ea3f10ab3f71ca78e9e3884d5719ca0547dd 100644 (file)
@@ -422,7 +422,7 @@ private:
     void *cbdata;
 };
 
-#ifdef _USE_INLINE_
+#if _USE_INLINE_
 #include "ufscommon.cci"
 #endif
 
index d8c4bedf97bc303c0c25d0fc42fa57714429e7c5..86b033ba93cf0dd43147c8617a169b25dd057ec5 100644 (file)
@@ -121,13 +121,13 @@ using namespace Squid;
 #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
@@ -191,7 +191,7 @@ using namespace Squid;
  * 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
index fa76d97e7f6eab7f368f675709b29db6c5995682..f578da07825234ab97310580951f28c097418f2c 100644 (file)
@@ -241,112 +241,112 @@ static struct ssl_option {
 
 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
     },
@@ -480,7 +480,7 @@ ssl_parse_flags(const char *flags)
         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;
@@ -577,7 +577,7 @@ ssl_initialize(void)
         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;
@@ -787,7 +787,7 @@ sslCreateServerContext(const char *certfile, const char *keyfile, int version, c
             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)
@@ -951,7 +951,7 @@ sslCreateClientContext(const char *certfile, const char *keyfile, int version, c
         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)
index b90b2d8eec72e14cdc109fc06965e5e85178a5ba..44dde166213a7e16ad3b7b52dcf4c11d841233c5 100644 (file)
@@ -107,7 +107,7 @@ static OBJH statUtilization;
 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;
@@ -425,7 +425,7 @@ statOpenfdObj(StoreEntry * sentry)
 
 #endif
 
-#ifdef XMALLOC_STATISTICS
+#if XMALLOC_STATISTICS
 static void
 info_get_mallstat(int size, int number, int oldnum, void *data)
 {
@@ -462,7 +462,7 @@ info_get(StoreEntry * sentry)
     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",
index 2876b802e12f1103112b4ab87eb22c167e1ab528..d8032eda65ba3e967039f6da57bc83d8baa2c1c1 100644 (file)
@@ -1957,6 +1957,6 @@ NullStoreEntry::getSerialisedMetaData()
     return NULL;
 }
 
-#ifndef _USE_INLINE_
+#if !_USE_INLINE_
 #include "Store.cci"
 #endif
index 46260b72762b4ed33fd7b7792a7313e0e0b1fe32..3c685908d851aeb8f6de128757d20a69358d2ec2 100644 (file)
@@ -34,7 +34,7 @@
 #include "client_side_request.h"
 #include "Store.h"
 
-#ifndef _USE_INLINE_
+#if !_USE_INLINE_
 #include "client_side_request.cci"
 #endif
 
index d6c5ffc356d9df35188b76093a84d483750ee729..ec8407daa44bd97502ac83780b6b419cd513b04f 100644 (file)
@@ -49,6 +49,6 @@ storeAppendVPrintf(StoreEntry * e, const char *fmt, va_list vargs)
     fatal("storeAppendVPrintf: Not implemented");
 }
 
-#ifndef _USE_INLINE_
+#if !_USE_INLINE_
 #include "Store.cci"
 #endif
index 161bd0aa9d9bcbfc54fd38e1e74f24154635ff08..a6089e1e5d5d636e1ef8c448e5c3a0d20488f795 100644 (file)
 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
 
@@ -182,7 +182,7 @@ testAuthUserRequest::scheme()
     }
 }
 
-#ifdef HAVE_AUTH_MODULE_BASIC
+#if HAVE_AUTH_MODULE_BASIC
 #include "auth/basic/auth_basic.h"
 /* AuthBasicUserRequest::AuthBasicUserRequest works
  */
@@ -208,7 +208,7 @@ testAuthBasicUserRequest::username()
 }
 #endif /* HAVE_AUTH_MODULE_BASIC */
 
-#ifdef HAVE_AUTH_MODULE_DIGEST
+#if HAVE_AUTH_MODULE_DIGEST
 #include "auth/digest/auth_digest.h"
 /* AuthDigestUserRequest::AuthDigestUserRequest works
  */
@@ -234,7 +234,7 @@ testAuthDigestUserRequest::username()
 }
 #endif /* HAVE_AUTH_MODULE_DIGEST */
 
-#ifdef HAVE_AUTH_MODULE_NTLM
+#if HAVE_AUTH_MODULE_NTLM
 #include "auth/ntlm/auth_ntlm.h"
 /* AuthNTLMUserRequest::AuthNTLMUserRequest works
  */
@@ -260,7 +260,7 @@ testAuthNTLMUserRequest::username()
 }
 #endif /* HAVE_AUTH_MODULE_NTLM */
 
-#ifdef HAVE_AUTH_MODULE_NEGOTIATE
+#if HAVE_AUTH_MODULE_NEGOTIATE
 #include "auth/negotiate/auth_negotiate.h"
 /* AuthNegotiateUserRequest::AuthNegotiateUserRequest works
  */
index b1704aa0cab801730ee0089c8e2a906b4c8c79ab..44086e760a1494b6d0cb78d965be4039a41fbd35 100644 (file)
@@ -47,7 +47,7 @@ protected:
     void construction();
 };
 
-#ifdef HAVE_AUTH_MODULE_BASIC
+#if HAVE_AUTH_MODULE_BASIC
 class testAuthBasicUserRequest : public CPPUNIT_NS::TestFixture
 {
     CPPUNIT_TEST_SUITE( testAuthBasicUserRequest );
@@ -63,7 +63,7 @@ protected:
 };
 #endif
 
-#ifdef HAVE_AUTH_MODULE_DIGEST
+#if HAVE_AUTH_MODULE_DIGEST
 class testAuthDigestUserRequest : public CPPUNIT_NS::TestFixture
 {
     CPPUNIT_TEST_SUITE( testAuthDigestUserRequest );
@@ -79,7 +79,7 @@ protected:
 };
 #endif
 
-#ifdef HAVE_AUTH_MODULE_NTLM
+#if HAVE_AUTH_MODULE_NTLM
 class testAuthNTLMUserRequest : public CPPUNIT_NS::TestFixture
 {
     CPPUNIT_TEST_SUITE( testAuthNTLMUserRequest );
@@ -95,7 +95,7 @@ protected:
 };
 #endif
 
-#ifdef HAVE_AUTH_MODULE_NEGOTIATE
+#if HAVE_AUTH_MODULE_NEGOTIATE
 class testAuthNegotiateUserRequest : public CPPUNIT_NS::TestFixture
 {
     CPPUNIT_TEST_SUITE( testAuthNegotiateUserRequest );
index 91c2110e8162c8547ffd69a20672ed0d450e9e4d..7d3fd962305b1297c4824bb359f9e180a8f044aa 100644 (file)
@@ -405,7 +405,7 @@ sigusr2_handle(int sig)
     /* 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
 
@@ -414,7 +414,7 @@ sigusr2_handle(int sig)
 
         state = 1;
     } else {
-#ifndef MEM_GEN_TRACE
+#if !MEM_GEN_TRACE
         Debug::parseOptions(Debug::debugOptions);
 #else
 
index d9ac26f6d782e5a8eb59aef7a5b7b6e80d7a443e..43b0f465c8ec94b54a11172f4c580ffeda4a1c57 100644 (file)
@@ -369,7 +369,7 @@ urlParse(const HttpRequestMethod& method, char *url, HttpRequest *request)
         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) {
@@ -810,7 +810,7 @@ urlCheckRequest(const HttpRequest * r)
         break;
 
     case PROTO_HTTPS:
-#ifdef USE_SSL
+#if USE_SSL
 
         rc = 1;
 
index f69dc0b1c33c74c2a50f08e56f235422a15f7f8b..7429aab9a76fe13b54c9dcda480f5c9a2dd08e11 100644 (file)
@@ -348,7 +348,7 @@ hashFreeMemory(hash_table * hid)
 }
 
 
-#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,
index ca9a72274a56f43f3da815698cd0afa778afc8fe..e5a95f999638067805ede71a22c6f33615ccebed 100644 (file)
 #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
index aff3fbfc04ca396abd1fe5bede555a739bbe0cbb..62a335938a631f89d2b51b6cab1bfe6a44bf266d 100644 (file)
 #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
index d3ac5b21a2687437b0b83016b2e0f537e8544cbe..731685d5ec418cc591076ab4c5ffafa8f4f81ae9 100644 (file)
 #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