From 42db7235dc9a9a50f1d575a025a13ec5ebce915e Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Thu, 26 May 2005 13:48:55 +0000 Subject: [PATCH] Do not print DPRINT1s on retail builds svn path=/trunk/; revision=15516 --- reactos/include/debug.h | 12 ++++++++++-- reactos/include/ntdll/ntdll.h | 5 +++++ reactos/include/win32k/debug1.h | 6 +++++- reactos/include/wine/debug.h | 4 ++++ 4 files changed, 24 insertions(+), 3 deletions(-) diff --git a/reactos/include/debug.h b/reactos/include/debug.h index 47a1f1513e9..23b75e515d9 100644 --- a/reactos/include/debug.h +++ b/reactos/include/debug.h @@ -48,11 +48,19 @@ #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); diff --git a/reactos/include/ntdll/ntdll.h b/reactos/include/ntdll/ntdll.h index 5a4004f658b..bd7aeac7ff6 100644 --- a/reactos/include/ntdll/ntdll.h +++ b/reactos/include/ntdll/ntdll.h @@ -29,12 +29,17 @@ #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)) diff --git a/reactos/include/win32k/debug1.h b/reactos/include/win32k/debug1.h index 44badb7808b..c314e796cf2 100644 --- a/reactos/include/win32k/debug1.h +++ b/reactos/include/win32k/debug1.h @@ -39,9 +39,13 @@ #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 diff --git a/reactos/include/wine/debug.h b/reactos/include/wine/debug.h index 3af86979922..0d562c67be9 100644 --- a/reactos/include/wine/debug.h +++ b/reactos/include/wine/debug.h @@ -12,7 +12,11 @@ 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__