AM_CXXFLAGS = $(SQUID_CXXFLAGS)
DEFS = @DEFS@
+# Make ./configure location settings above available to the code
+DEFS += -DDEFAULT_CONFIG_FILE=\"$(DEFAULT_CONFIG_FILE)\" \
+ -DDEFAULT_SQUID_DATA_DIR=\"$(datadir)\" \
+ -DDEFAULT_SQUID_CONFIG_DIR=\"$(sysconfdir)\"
+
## so that others can always use += for these variables
CLEANFILES =
check_PROGRAMS =
mib.txt \
mime.conf.default
-# Make location configure settings available to the code
-DEFS += -DDEFAULT_CONFIG_FILE=\"$(DEFAULT_CONFIG_FILE)\" -DDEFAULT_SQUID_DATA_DIR=\"$(datadir)\" -DDEFAULT_SQUID_CONFIG_DIR=\"$(sysconfdir)\"
-
snmp_core.o snmp_agent.o: ../lib/snmplib/libsnmplib.la $(top_srcdir)/include/cache_snmp.h
globals.cc: globals.h mk-globals-c.awk
ConfigFile = static_cast<char *>(xmalloc(Size));
RegQueryValueEx(hndKey, CONFIGFILE, NULL, &Type, (unsigned char *)ConfigFile, &Size);
} else
- ConfigFile = xstrdup(DefaultConfigFile);
+ ConfigFile = xstrdup(DEFAULT_CONFIG_FILE);
Size = 0;
RegCloseKey(hndKey);
} else {
- ConfigFile = xstrdup(DefaultConfigFile);
+ ConfigFile = xstrdup(DEFAULT_CONFIG_FILE);
WIN32_Service_Command_Line = xstrdup("");
}
/* Now store the config file location in the registry */
if (!ConfigFile)
- ConfigFile = xstrdup(DefaultConfigFile);
+ ConfigFile = xstrdup(DEFAULT_CONFIG_FILE);
WIN32_StoreKey(CONFIGFILE, REG_SZ, (unsigned char *) ConfigFile, strlen(ConfigFile) + 1);
extern char config_input_line[BUFSIZ];
/// During parsing, the name of the current squid.conf directive being parsed.
extern const char *cfg_directive; /* NULL */
-extern const char *DefaultConfigFile; /* DEFAULT_CONFIG_FILE */
extern const char *cfg_filename; /* NULL */
extern const char *dash_str; /* "-" */
extern const char *null_string; /* "" */
include $(top_srcdir)/src/Common.am
include $(top_srcdir)/src/TestHeaders.am
-# TODO: get rid of this when config filename is no longer a global constant.
-# its only here so the pinger globals.cc will link.
-DEFS += -DDEFAULT_CONFIG_FILE=NULL
-
-
# ICMP Specific Configurations
if ENABLE_PINGER
" -S Double-check swap during rebuild.\n"
" -X Force full debugging.\n"
" -Y Only return UDP_HIT or UDP_MISS_NOFETCH during fast reload.\n",
- APP_SHORTNAME, CACHE_HTTP_PORT, DefaultConfigFile, CACHE_ICP_PORT);
+ APP_SHORTNAME, CACHE_HTTP_PORT, DEFAULT_CONFIG_FILE, CACHE_ICP_PORT);
exit(EXIT_FAILURE);
}
int parse_err;
if (!ConfigFile)
- ConfigFile = xstrdup(DefaultConfigFile);
+ ConfigFile = xstrdup(DEFAULT_CONFIG_FILE);
assert(!configured_once);
#endif
#endif /* __cplusplus */
-
-#if !defined(DEFAULT_SQUID_CONF)
-#define DEFAULT_SQUID_CONF "/usr/local/squid/etc/squid.conf"
-#endif
-
#include <vector>
struct CacheDir {
int
readConfigFile( CacheDirVector& cachedir,
- const char* fn = DEFAULT_SQUID_CONF,
+ const char* fn,
FILE* debug = 0 );
// purpose: read squid.conf file and extract cache_dir entries
// paramtr: cachedir (OUT): vector with an entry for each cache_dir found
"\t0 and 1 are recommended - slow rebuild your cache with other modes.\n"
" -s\tshow all options after option parsing, but before really starting.\n"
" -v\tshow more information about the file, e.g. MD5, timestamps and flags.\n"
- "\n", DEFAULT_SQUID_CONF, DEFAULTHOST, DEFAULTPORT );
+ "\n", DEFAULT_CONFIG_FILE, DEFAULTHOST, DEFAULTPORT );
}
{
// setup variables
REList* list = 0;
- char* conffile = xstrdup( DEFAULT_SQUID_CONF );
+ char* conffile = xstrdup(DEFAULT_CONFIG_FILE);
serverPort = htons(DEFAULTPORT);
if ( convertHostname(DEFAULTHOST,serverHost) == -1 ) {
fprintf( stderr, "unable to resolve host %s!\n", DEFAULTHOST );