From 07183d05b99850d2b82af478b41cbfcafb86c375 Mon Sep 17 00:00:00 2001 From: Hartmut Birr Date: Sat, 26 Nov 2005 13:26:48 +0000 Subject: [PATCH] Define the DPRINT and CHECKPOINT macro depend from NDEBUG for each include of debug.h. svn path=/trunk/; revision=19635 --- reactos/ntoskrnl/include/internal/debug.h | 41 +++++++++++++---------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/reactos/ntoskrnl/include/internal/debug.h b/reactos/ntoskrnl/include/internal/debug.h index b050d819bd2..283b8ba016b 100644 --- a/reactos/ntoskrnl/include/internal/debug.h +++ b/reactos/ntoskrnl/include/internal/debug.h @@ -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: -- 2.17.1