summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarkvater <Darkvater@openttd.org>2006-12-27 12:22:25 +0000
committerDarkvater <Darkvater@openttd.org>2006-12-27 12:22:25 +0000
commit98e6c790e09e550a6cc0585b2084d26f8c7e51f5 (patch)
tree8bb33008fa505f37fe6a12e36ff0a7e0900cccfa
parent8f2bb7fd433b4faac25a87729c6eec7fa1f07458 (diff)
downloadopenttd-98e6c790e09e550a6cc0585b2084d26f8c7e51f5.tar.xz
(svn r7571) -Fix (r7565): Older GCC versions do not have __VA_ARGS__ support (C99), work around
this (tokai)
-rw-r--r--debug.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/debug.h b/debug.h
index f45db4d3f..87c2862e5 100644
--- a/debug.h
+++ b/debug.h
@@ -20,7 +20,11 @@
#ifdef NO_DEBUG_MESSAGES
#define DEBUG(name, level, ...)
#else
- #define DEBUG(name, level, ...) if (level == 0 || _debug_ ## name ## _level >= level) debug(#name, __VA_ARGS__)
+ #if defined(__GNUC__) && (__GNUC__ < 3)
+ #define DEBUG(name, level, args...) if ((level == 0) || ( _debug_ ## name ## _level >= level)) debug(#name, args)
+ #else
+ #define DEBUG(name, level, ...) if (level == 0 || _debug_ ## name ## _level >= level) debug(#name, __VA_ARGS__)
+ #endif
extern int _debug_ai_level;
extern int _debug_driver_level;