Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/lib/ev-debug.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ev-debug.h')
-rw-r--r--lib/ev-debug.h22
1 files changed, 17 insertions, 5 deletions
diff --git a/lib/ev-debug.h b/lib/ev-debug.h
index 2c4c521..53c1e61 100644
--- a/lib/ev-debug.h
+++ b/lib/ev-debug.h
@@ -32,13 +32,25 @@ G_BEGIN_DECLS
#define DISABLE_PROFILING
#endif
+#if defined(G_HAVE_GNUC_VARARGS)
+
#ifdef DISABLE_LOGGING
-#define LOG(msg, args...)
+#define LOG(msg, args...) G_STMT_START { } G_STMT_END
#else
-#define LOG(msg, args...) \
-g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \
- "[ %s ] " msg, \
- __FILE__ , ## args);
+#define LOG(msg, args...) \
+g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \
+ "[ %s ] " msg, \
+ __FILE__ , ## args)
+#endif
+
+#elif defined(G_HAVE_ISO_VARARGS)
+
+#define LOG(...) G_STMT_START { } G_STMT_END
+
+#else /* no varargs macros */
+
+static void LOG(const char *format, ...) {}
+
#endif
#ifdef DISABLE_PROFILING