- Various Microsoft DDK/PSDK compatibility fixes and some MSVC stuff too.
[reactos.git] / reactos / lib / kernel32 / include / debug.h
1 #ifndef _KERNEL32_INCLUDE_DEBUG_H
2 #define _KERNEL32_INCLUDE_DEBUG_H
3
4 #define UNIMPLEMENTED DbgPrint("%s at %s:%d is unimplemented\n",__FUNCTION__,__FILE__,__LINE__);
5
6 #ifdef NDEBUG
7 #ifdef __GNUC__
8 #define DPRINT(args...)
9 #else
10 #define DPRINT
11 #endif
12 #define CHECKPOINT
13 #ifdef ASSERT
14 #undef ASSERT
15 #endif
16 #define ASSERT(x)
17 #else
18 #define DPRINT(...) do { DbgPrint("(KERNEL32:%s:%d) ",__FILE__,__LINE__); DbgPrint(__VA_ARGS__); } while(0);
19 #define CHECKPOINT do { DbgPrint("(KERNEL32:%s:%d) Checkpoint\n",__FILE__,__LINE__); } while(0);
20 #ifdef ASSERT
21 #undef ASSERT
22 #endif
23 #define ASSERT(x) do { if(!x) RtlAssert("#x", __FILE__,__LINE__, ""); } while(0);
24 #endif
25
26 #define DPRINT1(...) do { DbgPrint("(KERNEL32:%s:%d) ",__FILE__,__LINE__); DbgPrint(__VA_ARGS__); } while(0);
27 #define CHECKPOINT1 do { DbgPrint("(KERNEL32:%s:%d) Checkpoint\n",__FILE__,__LINE__); } while(0);
28
29 #endif /* ndef _KERNEL32_INCLUDE_DEBUG_H */