[ros-diffs] [cfinck] 34032: 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
cfinck at svn.reactos.org
cfinck at svn.reactos.org
Fri Jun 20 00:03:22 CEST 2008
Author: cfinck
Date: Thu Jun 19 17:03:22 2008
New Revision: 34032
URL: http://svn.reactos.org/svn/reactos?rev=34032&view=rev
Log:
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
Modified:
trunk/reactos/include/reactos/debug.h
Modified: trunk/reactos/include/reactos/debug.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/debug.h?rev=34032&r1=34031&r2=34032&view=diff
==============================================================================
--- trunk/reactos/include/reactos/debug.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/debug.h [iso-8859-1] Thu Jun 19 17:03:22 2008
@@ -109,10 +109,13 @@
#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 */
More information about the Ros-diffs
mailing list