Revision: 14570
Author: adrian.chadd
Date: Sat Apr 10 18:08:58 2010
Log: Issue #94 - conditionally compile the debug syslog source file entirely, rather than just compiling in the relevant bits. Win32 native doesn't even have syslog.h.


http://code.google.com/p/lusca-cache/source/detail?r=14570

Modified:
 /branches/LUSCA_HEAD/libsqdebug/debug_syslog.c

=======================================
--- /branches/LUSCA_HEAD/libsqdebug/debug_syslog.c      Wed Jul 22 07:37:20 2009
+++ /branches/LUSCA_HEAD/libsqdebug/debug_syslog.c      Sat Apr 10 18:08:58 2010
@@ -35,6 +35,8 @@

 #include "../include/config.h"

+#if HAVE_SYSLOG
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <sys/types.h>
@@ -50,7 +52,6 @@
 int opt_syslog_enable = 0;
 int syslog_facility = LOG_LOCAL4;

-#if HAVE_SYSLOG
 void
 _db_print_syslog(const char *format, va_list args)
 {
@@ -65,9 +66,7 @@
     tmpbuf[BUFSIZ - 1] = '\0';
syslog((_db_level == 0 ? LOG_WARNING : LOG_NOTICE) | syslog_facility, "%s", tmpbuf);
 }
-#endif /* HAVE_SYSLOG */
-
-#if HAVE_SYSLOG
+
 void
 _db_set_syslog(const char *facility)
 {
@@ -91,4 +90,5 @@
        fprintf(stderr, "syslog facility type not supported on your system\n");
 #endif
 }
-#endif
+
+#endif /* HAVE_SYSLOG */

--
You received this message because you are subscribed to the Google Groups 
"lusca-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/lusca-commit?hl=en.

Reply via email to