Do not print DPRINT1s on retail builds
authorAlex Ionescu <aionescu@gmail.com>
Thu, 26 May 2005 13:48:55 +0000 (13:48 +0000)
committerAlex Ionescu <aionescu@gmail.com>
Thu, 26 May 2005 13:48:55 +0000 (13:48 +0000)
svn path=/trunk/; revision=15516

reactos/include/debug.h
reactos/include/ntdll/ntdll.h
reactos/include/win32k/debug1.h
reactos/include/wine/debug.h

index 47a1f15..23b75e5 100644 (file)
 #endif
 #endif
 
-
 /* TODO: Make the output of file/line and the debug message atomic */
+#ifdef DBG
 #define DPRINT1 DbgPrint("(%s:%d) ",__FILE__,__LINE__), DbgPrint
 #define CHECKPOINT1 do { DbgPrint("%s:%d\n",__FILE__,__LINE__); } while(0);
-
+#else
+#ifdef __GNUC__
+#define DPRINT1(args...)
+#define CHECKPOINT1
+#else
+#define DPRINT1
+#define CHECKPOINT1
+#endif /* __GNUC__ */
+#endif
 
 #ifndef NDEBUG
 #define DPRINT(args...) do { DbgPrint("(%s:%d) ",__FILE__,__LINE__); DbgPrint(args); } while(0);
index 5a4004f..bd7aeac 100644 (file)
 #define CHECKPOINT do { DbgPrint("(NTDLL:%s:%d) Checkpoint\n",__FILE__,__LINE__); } while(0)
 #endif
 
+#ifdef DBG
 #if defined(__GNUC__)
 #define DPRINT1(args...) do { DbgPrint("(NTDLL:%s:%d) ",__FILE__,__LINE__); DbgPrint(args); } while(0)
 #else
 #define DPRINT1              DbgPrint("(NTDLL:%s:%d) ",__FILE__,__LINE__); DbgPrint
 #endif
 #define CHECKPOINT1 do { DbgPrint("(NTDLL:%s:%d) Checkpoint\n",__FILE__,__LINE__); } while(0)
+#else
+#define DPRINT1(args...)
+#define CHECKPOINT1(args...)
+#endif
 
 #define ROUNDUP(a,b)   ((((a)+(b)-1)/(b))*(b))
 #define ROUNDDOWN(a,b) (((a)/(b))*(b))
index 44badb7..c314e79 100644 (file)
 #endif
 #endif
 
+#ifdef DBG
 #define DPRINT1 DbgPrint("(%s:%d) ",__FILE__,__LINE__), DbgPrint
 #define CHECKPOINT1 DbgPrint("%s:%d\n",__FILE__,__LINE__);
-
+#else
+#define DPRINT1(args...)
+#define CHECKPOINT1(args...)
+#endif
 
 #ifdef __NTOSKRNL__
 #define DPRINT_CHECKS
index 3af8697..0d562c6 100644 (file)
 
 unsigned long DbgPrint(char *Format,...);
 
+#if DBG
 #define DPRINT1 DbgPrint("(%s:%d:%s) ",__FILE__,__LINE__,__FUNCTION__), DbgPrint
+#else
+#define DPRINT1(args...)
+#endif
 
 #if !defined(DBG) || !defined(YDEBUG)
 #ifdef __GNUC__