]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/debug.c
Stop accepting attributes in collections (Issue #5630)
[thirdparty/cups.git] / cups / debug.c
index d2069271a07972af34333826de1359acbbf8a0a2..6b3914ed5110b9600b2b7dee7ab3fc9ed03ad914 100644 (file)
@@ -1,9 +1,10 @@
 /*
  * Debugging functions for CUPS.
  *
- * Copyright 2008-2015 by Apple Inc.
+ * Copyright © 2008-2018 by Apple Inc.
  *
- * Licensed under Apache License v2.0.  See the file "LICENSE" for more information.
+ * Licensed under Apache License v2.0.  See the file "LICENSE" for more
+ * information.
  */
 
 /*
@@ -11,8 +12,9 @@
  */
 
 #include "cups-private.h"
+#include "debug-internal.h"
 #include "thread-private.h"
-#ifdef WIN32
+#ifdef _WIN32
 #  include <sys/timeb.h>
 #  include <time.h>
 #  include <io.h>
@@ -30,11 +32,12 @@ _cups_gettimeofday(struct timeval *tv,      /* I  - Timeval struct */
 #else
 #  include <sys/time.h>
 #  include <unistd.h>
-#endif /* WIN32 */
+#endif /* _WIN32 */
 #include <regex.h>
 #include <fcntl.h>
 
 
+#ifdef DEBUG
 /*
  * Globals...
  */
@@ -45,7 +48,6 @@ int                   _cups_debug_level = 1;
                                        /* Log level (0 to 9) */
 
 
-#ifdef DEBUG
 /*
  * Local globals...
  */
@@ -77,7 +79,7 @@ debug_thread_id(void)
  * '_cups_debug_printf()' - Write a formatted line to the log.
  */
 
-void DLLExport
+void
 _cups_debug_printf(const char *format, /* I - Printf-style format string */
                    ...)                        /* I - Additional arguments as needed */
 {
@@ -162,7 +164,7 @@ _cups_debug_printf(const char *format,      /* I - Printf-style format string */
  * '_cups_debug_puts()' - Write a single line to the log.
  */
 
-void DLLExport
+void
 _cups_debug_puts(const char *s)                /* I - String to output */
 {
   struct timeval       curtime;        /* Current time */
@@ -242,7 +244,7 @@ _cups_debug_puts(const char *s)             /* I - String to output */
  * '_cups_debug_set()' - Enable or disable debug logging.
  */
 
-void DLLExport
+void
 _cups_debug_set(const char *logfile,   /* I - Log file or NULL */
                 const char *level,     /* I - Log level or NULL */
                const char *filter,     /* I - Filter string or NULL */
@@ -312,6 +314,24 @@ _cups_debug_set(const char *logfile,       /* I - Log file or NULL */
 
   _cupsMutexUnlock(&debug_init_mutex);
 }
+
+
+#else
+/*
+ * '_cups_debug_set()' - Enable or disable debug logging.
+ */
+
+void
+_cups_debug_set(const char *logfile,   /* I - Log file or NULL */
+               const char *level,      /* I - Log level or NULL */
+               const char *filter,     /* I - Filter string or NULL */
+               int        force)       /* I - Force initialization */
+{
+  (void)logfile;
+  (void)level;
+  (void)filter;
+  (void)force;
+}
 #endif /* DEBUG */