VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/crtdbg.h@ 19711

最後變更 在這個檔案從19711是 19678,由 vboxsync 提交於 16 年 前

opengl: update wine to 1.1.21, add d3d9.dll to build list

  • 屬性 svn:eol-style 設為 native
檔案大小: 4.6 KB
 
1/*
2 * Debug API
3 *
4 * Copyright 2001 Francois Gouget.
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20/*
21 * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
22 * other than GPL or LGPL is available it will apply instead, Sun elects to use only
23 * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
24 * a choice of LGPL license versions is made available with the language indicating
25 * that LGPLv2 or any later version may be used, or where a choice of which version
26 * of the LGPL is applied is otherwise unspecified.
27 */
28
29#ifndef __WINE_CRTDBG_H_
30#define __WINE_CRTDBG_H_
31
32#include <crtdefs.h>
33
34/* The debug API is not implemented in Winelib.
35 * Redirect everything to the regular APIs.
36 */
37
38#define _CRT_WARN 0
39#define _CRT_ERROR 1
40#define _CRT_ASSERT 2
41#define _CRT_ERRCNT 3
42
43#define _FREE_BLOCK 0
44#define _NORMAL_BLOCK 1
45#define _CRT_BLOCK 2
46#define _IGNORE_BLOCK 3
47#define _CLIENT_BLOCK 4
48#define _MAX_BLOCKS 5
49
50#define _BLOCK_TYPE(block) (block & 0xFFFF)
51#define _BLOCK_SUBTYPE(block) (block >> 16 & 0xFFFF)
52
53typedef struct _CrtMemState
54{
55 struct _CrtMemBlockHeader* pBlockHeader;
56 unsigned long lCounts[_MAX_BLOCKS];
57 unsigned long lSizes[_MAX_BLOCKS];
58 unsigned long lHighWaterCount;
59 unsigned long lTotalCount;
60} _CrtMemState;
61
62
63#ifndef _DEBUG
64
65#define _ASSERT(expr) ((void)0)
66#define _ASSERTE(expr) ((void)0)
67#define _CrtDbgBreak() ((void)0)
68
69#define _CrtCheckMemory() ((int)1)
70#define _CrtDbgReport(...) ((int)0)
71#define _CrtDumpMemoryLeaks() ((int)0)
72#define _CrtSetBreakAlloc(a) ((long)0)
73#define _CrtSetDbgFlag(f) ((int)0)
74#define _CrtSetDumpClient(f) ((void)0)
75#define _CrtSetReportMode(t,m) ((int)0)
76
77#else /* _DEBUG */
78
79#include <assert.h>
80#define _ASSERT(expr) assert(expr)
81#define _ASSERTE(expr) assert(expr)
82#if defined(__GNUC__) && defined(__i386__)
83#define _CrtDbgBreak() __asm__ ("\tint $0x3\n")
84#else
85#define _CrtDbgBreak() ((void)0)
86#endif
87
88#ifdef __cplusplus
89extern "C" {
90#endif
91
92extern int _crtAssertBusy;
93extern int _crtBreakAlloc;
94extern int _crtDbgFlag;
95
96int __cdecl _CrtCheckMemory(void);
97int __cdecl _CrtDbgReport(int reportType, const char *filename, int linenumber,
98 const char *moduleName, const char *format, ...);
99int __cdecl _CrtDumpMemoryLeaks(void);
100int __cdecl _CrtSetBreakAlloc(int new);
101int __cdecl _CrtSetDbgFlag(int new);
102void *__cdecl _CrtSetDumpClient(void *dumpClient);
103int __cdecl _CrtSetReportMode(int reportType, int reportMode);
104
105#ifdef __cplusplus
106}
107#endif
108
109#endif /* _DEBUG */
110
111#define _CrtDoForAllClientObjects(f,c) ((void)0)
112#define _CrtIsMemoryBlock(p,s,r,f,l) ((int)1)
113#define _CrtIsValidHeapPointer(p) ((int)1)
114#define _CrtIsValidPointer(p,s,a) ((int)1)
115#define _CrtMemCheckpoint(s) ((void)0)
116#define _CrtMemDifference(s1,s2,s3) ((int)0)
117#define _CrtMemDumpAllObjectsSince(s) ((void)0)
118#define _CrtMemDumpStatistics(s) ((void)0)
119#define _CrtSetAllocHook(f) ((void)0)
120
121#define _RPT0(t,m)
122#define _RPT1(t,m,p1)
123#define _RPT2(t,m,p1,p2)
124#define _RPT3(t,m,p1,p2,p3)
125#define _RPT4(t,m,p1,p2,p3,p4)
126#define _RPTF0(t,m)
127#define _RPTF1(t,m,p1)
128#define _RPTF2(t,m,p1,p2)
129#define _RPTF3(t,m,p1,p2,p3)
130#define _RPTF4(t,m,p1,p2,p3,p4)
131
132
133#define _malloc_dbg(s,t,f,l) malloc(s)
134#define _calloc_dbg(c,s,t,f,l) calloc(c,s)
135#define _expand_dbg(p,s,t,f,l) _expand(p,s)
136#define _free_dbg(p,t) free(p)
137#define _realloc_dbg(p,s,t,f,l) realloc(p,s)
138
139#endif /* __WINE_CRTDBG_H */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette