[ros-diffs] [hbirr] 19635: Define the DPRINT and CHECKPOINT macro depend from NDEBUG for each include of debug.h.

hbirr at svn.reactos.com hbirr at svn.reactos.com
Sat Nov 26 14:27:09 CET 2005


Define the DPRINT and CHECKPOINT macro depend from NDEBUG for each
include of debug.h.
Modified: trunk/reactos/ntoskrnl/include/internal/debug.h
  _____  

Modified: trunk/reactos/ntoskrnl/include/internal/debug.h
--- trunk/reactos/ntoskrnl/include/internal/debug.h	2005-11-26
12:37:49 UTC (rev 19634)
+++ trunk/reactos/ntoskrnl/include/internal/debug.h	2005-11-26
13:26:48 UTC (rev 19635)
@@ -15,6 +15,30 @@

  *        Define NASSERT before including this header to disable
assertions
  */
 
+#ifdef CHECKPOINT
+#undef CHECKPOINT
+#endif
+
+#ifdef DPRINT
+#undef DPRINT
+#endif
+
+#ifndef NDEBUG
+#ifdef __GNUC__ /* using GNU C/C99 macro ellipsis */
+#define DPRINT(args...) do { DbgPrint("(%s:%d) ",__FILE__,__LINE__);
DbgPrint(args); } while(0)
+#else
+#define DPRINT DbgPrint("(%s:%d) ",__FILE__,__LINE__); DbgPrint
+#endif
+#define CHECKPOINT do { DbgPrint("%s:%d\n",__FILE__,__LINE__); }
while(0)
+#else /* NDEBUG */
+#ifdef __GNUC__ /* using GNU C/C99 macro ellipsis */
+#define DPRINT(args...)
+#else
+#define DPRINT
+#endif
+#define CHECKPOINT
+#endif /* NDEBUG */
+
 #ifndef __INTERNAL_DEBUG
 #define __INTERNAL_DEBUG
 
@@ -94,23 +118,6 @@
 
 #define CHECKPOINT1 do { DbgPrint("%s:%d\n",__FILE__,__LINE__); }
while(0)
 
-#ifndef NDEBUG
-#ifdef __GNUC__ /* using GNU C/C99 macro ellipsis */
-#define DPRINT(args...) do { DbgPrint("(%s:%d) ",__FILE__,__LINE__);
DbgPrint(args); } while(0)
-#else
-#define DPRINT DbgPrint("(%s:%d) ",__FILE__,__LINE__); DbgPrint
-#endif
-#define CHECKPOINT do { DbgPrint("%s:%d\n",__FILE__,__LINE__); }
while(0)
-#else /* NDEBUG */
-#ifdef __GNUC__ /* using GNU C/C99 macro ellipsis */
-#define DPRINT(args...)
-#else
-#define DPRINT
-#endif
-#define CHECKPOINT
-#endif /* NDEBUG */
-
-
 /*
  * FUNCTION: Assert a maximum value for the current irql
  * ARGUMENTS:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20051126/4db62a18/attachment.html


More information about the Ros-diffs mailing list