aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ephy-debug.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ephy-debug.h')
-rw-r--r--lib/ephy-debug.h22
1 files changed, 17 insertions, 5 deletions
diff --git a/lib/ephy-debug.h b/lib/ephy-debug.h
index f2311e49b..2c49158a7 100644
--- a/lib/ephy-debug.h
+++ b/lib/ephy-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