[ros-diffs] [cfinck] 32514: The C99 __VA_ARGS__ is also supported under GCC, no reason to add a compiler switch here and use ##args for GCC
cfinck at svn.reactos.org
cfinck at svn.reactos.org
Wed Feb 27 20:58:49 CET 2008
Author: cfinck
Date: Wed Feb 27 22:58:48 2008
New Revision: 32514
URL: http://svn.reactos.org/svn/reactos?rev=32514&view=rev
Log:
The C99 __VA_ARGS__ is also supported under GCC, no reason to add a compiler switch here and use ##args for 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=32514&r1=32513&r2=32514&view=diff
==============================================================================
--- trunk/reactos/include/reactos/debug.h (original)
+++ trunk/reactos/include/reactos/debug.h Wed Feb 27 22:58:48 2008
@@ -107,31 +107,16 @@
#define CHECKPOINT
#endif
- #define UNIMPLEMENTED \
- DbgPrint("WARNING: %s at %s:%d is UNIMPLEMENTED!\n",__FUNCTION__,__FILE__,__LINE__);
+ #define UNIMPLEMENTED DbgPrint("WARNING: %s at %s:%d is UNIMPLEMENTED!\n",__FUNCTION__,__FILE__,__LINE__);
- #if defined(__GNUC__)
- #define ERR_(ch, args...) DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_ERROR_LEVEL, "(%s:%d) ", __FILE__, __LINE__), \
- DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_ERROR_LEVEL, ##args)
- #define WARN_(ch, args...) DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_WARNING_LEVEL, "(%s:%d) ", __FILE__, __LINE__), \
- DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_WARNING_LEVEL, ##args)
- #define TRACE_(ch, args...) DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_TRACE_LEVEL, "(%s:%d) ", __FILE__, __LINE__), \
- DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_TRACE_LEVEL, ##args)
- #define INFO_(ch, args...) DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_INFO_LEVEL, "(%s:%d) ", __FILE__, __LINE__), \
- DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_INFO_LEVEL, ##args)
- #elif defined(_MSC_VER)
#define ERR_(ch, ...) DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_ERROR_LEVEL, "(%s:%d) ", __FILE__, __LINE__), \
- DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_ERROR_LEVEL, __VA_ARGS__)
+ DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_ERROR_LEVEL, __VA_ARGS__)
#define WARN_(ch, ...) DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_WARNING_LEVEL, "(%s:%d) ", __FILE__, __LINE__), \
- DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_WARNING_LEVEL, __VA_ARGS__)
+ DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_WARNING_LEVEL, __VA_ARGS__)
#define TRACE_(ch, ...) DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_TRACE_LEVEL, "(%s:%d) ", __FILE__, __LINE__), \
- DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_TRACE_LEVEL, __VA_ARGS__)
+ DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_TRACE_LEVEL, __VA_ARGS__)
#define INFO_(ch, ...) DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_INFO_LEVEL, "(%s:%d) ", __FILE__, __LINE__), \
- DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_INFO_LEVEL, __VA_ARGS__)
- #else
- #error Unknown compiler
- #endif
-
+ DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_INFO_LEVEL, __VA_ARGS__)
#else
/* On non-debug builds, we never show these */
More information about the Ros-diffs
mailing list