From c307aec3b4c927c168ab7d5facdfb80fb1d694c4 Mon Sep 17 00:00:00 2001 From: hno <> Date: Sun, 14 Jul 2002 23:19:06 +0000 Subject: [PATCH] From Guido: This patch avoids confusion when using -s Squid switch on platforms without syslog. --- src/globals.h | 4 +++- src/main.cc | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/globals.h b/src/globals.h index a8e3cceb1b..28d843bcb0 100644 --- a/src/globals.h +++ b/src/globals.h @@ -1,6 +1,6 @@ /* - * $Id: globals.h,v 1.110 2002/04/13 23:07:50 hno Exp $ + * $Id: globals.h,v 1.111 2002/07/14 17:19:06 hno Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -86,7 +86,9 @@ extern int opt_dns_tests; /* 1 */ extern int opt_foreground_rebuild; /* 0 */ extern int opt_forwarded_for; /* 1 */ extern int opt_reload_hit_only; /* 0 */ +#if HAVE_SYSLOG extern int opt_syslog_enable; /* 0 */ +#endif extern int opt_udp_hit_obj; /* 0 */ extern int opt_create_swap_dirs; /* 0 */ extern int opt_store_doublecheck; /* 0 */ diff --git a/src/main.cc b/src/main.cc index 837dc94174..7e84d513df 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1,6 +1,6 @@ /* - * $Id: main.cc,v 1.351 2002/06/23 13:32:24 hno Exp $ + * $Id: main.cc,v 1.352 2002/07/14 17:19:06 hno Exp $ * * DEBUG: section 1 Startup and Main Loop * AUTHOR: Harvest Derived @@ -205,8 +205,13 @@ mainParseOptions(int argc, char *argv[]) #endif } case 's': +#if HAVE_SYSLOG opt_syslog_enable = 1; break; +#else + fatal("Logging to syslog not available on this platform"); + /* NOTREACHED */ +#endif case 'u': icpPortNumOverride = atoi(optarg); if (icpPortNumOverride < 0) -- 2.47.3