From 25f5cca19d5702e6e4bb4e9ebb0d711672c92383 Mon Sep 17 00:00:00 2001 From: Colin Finck Date: Thu, 19 Jun 2008 22:03:22 +0000 Subject: [PATCH] Put a comment and an #if around the lines I changed in my previous commit, because the ##__VA_ARGS__ syntax was only tested with MSVC and GCC svn path=/trunk/; revision=34032 --- reactos/include/reactos/debug.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/reactos/include/reactos/debug.h b/reactos/include/reactos/debug.h index 5c090ee82d4..47d12eda3b0 100644 --- a/reactos/include/reactos/debug.h +++ b/reactos/include/reactos/debug.h @@ -109,10 +109,13 @@ RtlAssert( #define UNIMPLEMENTED DbgPrint("WARNING: %s at %s:%d is UNIMPLEMENTED!\n",__FUNCTION__,__FILE__,__LINE__); - #define ERR_(ch, fmt, ...) DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_ERROR_LEVEL, "(%s:%d) " fmt, __FILE__, __LINE__, ##__VA_ARGS__) - #define WARN_(ch, fmt, ...) DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_WARNING_LEVEL, "(%s:%d) " fmt, __FILE__, __LINE__, ##__VA_ARGS__) - #define TRACE_(ch, fmt, ...) DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_TRACE_LEVEL, "(%s:%d) " fmt, __FILE__, __LINE__, ##__VA_ARGS__) - #define INFO_(ch, fmt, ...) DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_INFO_LEVEL, "(%s:%d) " fmt, __FILE__, __LINE__, ##__VA_ARGS__) + /* The ##__VA_ARGS__ syntax is not a standard and was only tested with MSVC and GCC. If other compilers support them as well, add them to this #if block. */ + #if defined(_MSC_VER) || defined(__GNUC__) + #define ERR_(ch, fmt, ...) DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_ERROR_LEVEL, "(%s:%d) " fmt, __FILE__, __LINE__, ##__VA_ARGS__) + #define WARN_(ch, fmt, ...) DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_WARNING_LEVEL, "(%s:%d) " fmt, __FILE__, __LINE__, ##__VA_ARGS__) + #define TRACE_(ch, fmt, ...) DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_TRACE_LEVEL, "(%s:%d) " fmt, __FILE__, __LINE__, ##__VA_ARGS__) + #define INFO_(ch, fmt, ...) DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_INFO_LEVEL, "(%s:%d) " fmt, __FILE__, __LINE__, ##__VA_ARGS__) + #endif #else /* On non-debug builds, we never show these */