From: Amos Jeffries Date: Tue, 22 Apr 2014 05:02:28 +0000 (-0700) Subject: Fix high_memory_warning parsing X-Git-Tag: SQUID_3_5_0_1~274 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f2228f3b9d5822e3e65f2e0ab67c1cb9c6f39d46;p=thirdparty%2Fsquid.git Fix high_memory_warning parsing The squid.conf parser does not accept whitespace in the IFDEF: parameter values. This was hiding parse issues when high_memory_warning was used without gnumalloc.h availability. Also, sort the cf_gen_defines array alphabetically by IFDEF: value for easier maintenance. --- diff --git a/src/cf.data.pre b/src/cf.data.pre index d5931c3328..c0c296d9eb 100644 --- a/src/cf.data.pre +++ b/src/cf.data.pre @@ -9036,7 +9036,7 @@ DOC_END NAME: high_memory_warning TYPE: b_size_t LOC: Config.warnings.high_memory -IFDEF: HAVE_MSTATS && HAVE_GNUMALLOC_H +IFDEF: HAVE_MSTATS&&HAVE_GNUMALLOC_H DEFAULT: 0 KB DEFAULT_DOC: disabled. DOC_START diff --git a/src/cf_gen_defines b/src/cf_gen_defines index 7896b76a0b..5b8ddc1539 100644 --- a/src/cf_gen_defines +++ b/src/cf_gen_defines @@ -5,33 +5,34 @@ BEGIN { print "*/" print "#include \"autoconf.h\"" print "static struct { const char *name; const char *enable; int defined;} defines[] = {" - define["USE_DELAY_POOLS"]="--enable-delay-pools" + define["_SQUID_WINDOWS_"]="MS Windows" define["FOLLOW_X_FORWARDED_FOR"]="--enable-follow-x-forwarded-for" - define["FOLLOW_X_FORWARDED_FOR&&USE_DELAY_POOLS"]="--enable-follow-x-forwarded-for and --enable-delay-pools" - define["FOLLOW_X_FORWARDED_FOR&&USE_ADAPTATION"]="--enable-follow-x-forwarded-for and (--enable-icap-client and/or --enable-ecap)" define["FOLLOW_X_FORWARDED_FOR&&LINUX_NETFILTER"]="--enable-follow-x-forwarded-for and --enable-linux-netfilter" - define["USE_HTTP_VIOLATIONS"]="--enable-http-violations" + define["FOLLOW_X_FORWARDED_FOR&&USE_ADAPTATION"]="--enable-follow-x-forwarded-for and (--enable-icap-client and/or --enable-ecap)" + define["FOLLOW_X_FORWARDED_FOR&&USE_DELAY_POOLS"]="--enable-follow-x-forwarded-for and --enable-delay-pools" + define["HAVE_MSTATS&&HAVE_GNUMALLOC_H"]="GNU Malloc with mstats()" define["ICAP_CLIENT"]="--enable-icap-client" + define["SO_MARK&&USE_LIBCAP"]="Packet MARK (Linux)" define["SQUID_SNMP"]="--enable-snmp" define["USE_ADAPTATION"]="--enable-ecap or --enable-icap-client" define["USE_AUTH"]="--enable-auth" define["USE_CACHE_DIGESTS"]="--enable-cache-digests" + define["USE_DELAY_POOLS"]="--enable-delay-pools" define["USE_ECAP"]="--enable-ecap" define["USE_ERR_LOCALES"]="--enable-auto-locale" define["USE_HTCP"]="--enable-htcp" + define["USE_HTTP_VIOLATIONS"]="--enable-http-violations" define["USE_ICMP"]="--enable-icmp" define["USE_IDENT"]="--enable-ident-lookups" define["USE_LOADABLE_MODULES"]="--enable-loadable-modules" + define["USE_OPENSSL"]="--with-openssl" + define["USE_QOS_TOS"]="--enable-zph-qos" define["USE_SQUID_ESI"]="--enable-esi" define["USE_SQUID_EUI"]="--enable-eui" define["USE_SSL_CRTD"]="--enable-ssl-crtd" - define["USE_OPENSSL"]="--with-openssl" define["USE_UNLINKD"]="--enable-unlinkd" define["USE_WCCP"]="--enable-wccp" define["USE_WCCPv2"]="--enable-wccpv2" - define["USE_QOS_TOS"]="--enable-zph-qos" - define["_SQUID_WINDOWS_"]="MS Windows" - define["SO_MARK&&USE_LIBCAP"]="Packet MARK (Linux)" } /^IFDEF:/ { if (define[$2] != "")