From d92103d6ff97ae413e2e6eae602e04b05addaf17 Mon Sep 17 00:00:00 2001 From: Darkvater Date: Wed, 27 Dec 2006 12:22:25 +0000 Subject: (svn r7571) -Fix (r7565): Older GCC versions do not have __VA_ARGS__ support (C99), work around this (tokai) --- debug.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3-70-g09d2