4 * Copyright 2001 Francois Gouget.
6 #ifndef __WINE_CRTDBG_H_
7 #define __WINE_CRTDBG_H_
8 #define __WINE_USE_MSVCRT
11 /* The debug API is not implemented in Winelib.
12 * Redirect everything to the regular APIs.
21 #define _NORMAL_BLOCK 1
23 #define _IGNORE_BLOCK 3
24 #define _CLIENT_BLOCK 4
28 typedef struct _CrtMemState
30 struct _CrtMemBlockHeader
* pBlockHeader
;
31 unsigned long lCounts
[_MAX_BLOCKS
];
32 unsigned long lSizes
[_MAX_BLOCKS
];
33 unsigned long lHighWaterCount
;
34 unsigned long lTotalCount
;
40 #define _ASSERT(expr) (0)
41 #define _ASSERTE(expr) (0)
42 #define _CrtDbgBreak() (0)
47 #define _ASSERT(expr) assert(expr)
48 #define _ASSERTE(expr) assert(expr)
49 #if defined(__GNUC__) && defined(__i386__)
50 #define _CrtDbgBreak() __asm__ ("\tint $0x3\n")
52 #define _CrtDbgBreak() (0)
57 #define _CrtCheckMemory() (1)
58 #define _CrtDbgReport(...) (0)
59 #define _CrtDoForAllClientObjects(f,c) (0)
60 #define _CrtDumpMemoryLeaks() (0)
61 #define _CrtIsMemoryBlock(p,s,r,f,l) (1)
62 #define _CrtIsValidHeapPointer(p) (1)
63 #define _CrtIsValidPointer(p,s,a) (1)
64 #define _CrtMemCheckpoint(s) (0)
65 #define _CrtMemDifference(s1,s2,s3) (0)
66 #define _CrtMemDumpAllObjectsSince(s) (0)
67 #define _CrtMemDumpStatistics(s) (0)
68 #define _CrtSetAllocHook(f) (0)
69 #define _CrtSetBreakAlloc(a) (0)
70 #define _CrtSetDbgFlag(f) (0)
71 #define _CrtSetDumpClient(f) (0)
72 #define _CrtSetReportMode(t,m) (0)
76 #define _RPT2(t,m,p1,p2)
77 #define _RPT3(t,m,p1,p2,p3)
78 #define _RPT4(t,m,p1,p2,p3,p4)
80 #define _RPTF1(t,m,p1)
81 #define _RPTF2(t,m,p1,p2)
82 #define _RPTF3(t,m,p1,p2,p3)
83 #define _RPTF4(t,m,p1,p2,p3,p4)
86 #define _malloc_dbg(s,t,f,l) malloc(s)
87 #define _calloc_dbg(c,s,t,f,l) calloc(c,s)
88 #define _expand_dbg(p,s,t,f,l) _expand(p,s)
89 #define _free_dbg(p,t) free(p)
90 #define _realloc_dbg(p,s,t,f,l) realloc(p,s)
92 #endif /* __WINE_CRTDBG_H */