comparison fuhtark_test/include/crtdbg.h @ 1500:91c8c3b7cbf0

add: futhark tests for generating vulkan api
author sam <sam@basx.dev>
date Wed, 26 Nov 2025 21:36:48 +0700
parents
children
comparison
equal deleted inserted replaced
1499:1f58458b7ef7 1500:91c8c3b7cbf0
1 /**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the w64 mingw-runtime package.
4 * No warranty is given; refer to the file DISCLAIMER within this package.
5 */
6 #include <_mingw.h>
7
8 #ifndef _INC_CRTDBG
9 #define _INC_CRTDBG
10
11 #pragma pack(push,_CRT_PACKING)
12
13 #ifndef NULL
14 #ifdef __cplusplus
15 #ifndef _WIN64
16 #define NULL 0
17 #else
18 #define NULL 0LL
19 #endif /* W64 */
20 #else
21 #define NULL ((void *)0)
22 #endif
23 #endif
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29 typedef void *_HFILE;
30
31 #define _CRT_WARN 0
32 #define _CRT_ERROR 1
33 #define _CRT_ASSERT 2
34 #define _CRT_ERRCNT 3
35
36 #define _CRTDBG_MODE_FILE 0x1
37 #define _CRTDBG_MODE_DEBUG 0x2
38 #define _CRTDBG_MODE_WNDW 0x4
39 #define _CRTDBG_REPORT_MODE -1
40
41 #define _CRTDBG_INVALID_HFILE ((_HFILE)-1)
42 #define _CRTDBG_HFILE_ERROR ((_HFILE)-2)
43 #define _CRTDBG_FILE_STDOUT ((_HFILE)-4)
44 #define _CRTDBG_FILE_STDERR ((_HFILE)-5)
45 #define _CRTDBG_REPORT_FILE ((_HFILE)-6)
46
47 typedef int (__cdecl *_CRT_REPORT_HOOK)(int,char *,int *);
48 typedef int (__cdecl *_CRT_REPORT_HOOKW)(int,wchar_t *,int *);
49
50 #define _CRT_RPTHOOK_INSTALL 0
51 #define _CRT_RPTHOOK_REMOVE 1
52
53 #define _HOOK_ALLOC 1
54 #define _HOOK_REALLOC 2
55 #define _HOOK_FREE 3
56
57 typedef int (__cdecl *_CRT_ALLOC_HOOK)(int,void *,size_t,int,long,const unsigned char *,int);
58
59 #define _CRTDBG_ALLOC_MEM_DF 0x01
60 #define _CRTDBG_DELAY_FREE_MEM_DF 0x02
61 #define _CRTDBG_CHECK_ALWAYS_DF 0x04
62 #define _CRTDBG_RESERVED_DF 0x08
63 #define _CRTDBG_CHECK_CRT_DF 0x10
64 #define _CRTDBG_LEAK_CHECK_DF 0x20
65
66 #define _CRTDBG_CHECK_EVERY_16_DF 0x00100000
67 #define _CRTDBG_CHECK_EVERY_128_DF 0x00800000
68 #define _CRTDBG_CHECK_EVERY_1024_DF 0x04000000
69
70 #define _CRTDBG_CHECK_DEFAULT_DF 0
71
72 #define _CRTDBG_REPORT_FLAG -1
73
74 #define _BLOCK_TYPE(block) (block & 0xFFFF)
75 #define _BLOCK_SUBTYPE(block) (block >> 16 & 0xFFFF)
76
77 #define _FREE_BLOCK 0
78 #define _NORMAL_BLOCK 1
79 #define _CRT_BLOCK 2
80 #define _IGNORE_BLOCK 3
81 #define _CLIENT_BLOCK 4
82 #define _MAX_BLOCKS 5
83
84 typedef void (__cdecl *_CRT_DUMP_CLIENT)(void *,size_t);
85
86 struct _CrtMemBlockHeader;
87
88 typedef struct _CrtMemState {
89 struct _CrtMemBlockHeader *pBlockHeader;
90 size_t lCounts[_MAX_BLOCKS];
91 size_t lSizes[_MAX_BLOCKS];
92 size_t lHighWaterCount;
93 size_t lTotalCount;
94 } _CrtMemState;
95
96 #ifndef _STATIC_ASSERT
97 #define _STATIC_ASSERT(expr) typedef char __static_assert_t[(expr)]
98 #endif
99
100 #ifndef _ASSERT
101 #define _ASSERT(expr) ((void)0)
102 #endif
103
104 #ifndef _ASSERTE
105 #define _ASSERTE(expr) ((void)0)
106 #endif
107
108 #ifndef _ASSERT_EXPR
109 #define _ASSERT_EXPR(expr,expr_str) ((void)0)
110 #endif
111
112 #ifndef _ASSERT_BASE
113 #define _ASSERT_BASE _ASSERT_EXPR
114 #endif
115
116 #define _RPT0(rptno,msg)
117 #define _RPTW0(rptno,msg)
118
119 #define _RPT1(rptno,msg,arg1)
120 #define _RPTW1(rptno,msg,arg1)
121 #define _RPT2(rptno,msg,arg1,arg2)
122 #define _RPTW2(rptno,msg,arg1,arg2)
123 #define _RPT3(rptno,msg,arg1,arg2,arg3)
124 #define _RPTW3(rptno,msg,arg1,arg2,arg3)
125 #define _RPT4(rptno,msg,arg1,arg2,arg3,arg4)
126 #define _RPTW4(rptno,msg,arg1,arg2,arg3,arg4)
127 #define _RPTF0(rptno,msg)
128 #define _RPTFW0(rptno,msg)
129 #define _RPTF1(rptno,msg,arg1)
130 #define _RPTFW1(rptno,msg,arg1)
131 #define _RPTF2(rptno,msg,arg1,arg2)
132 #define _RPTFW2(rptno,msg,arg1,arg2)
133 #define _RPTF3(rptno,msg,arg1,arg2,arg3)
134 #define _RPTFW3(rptno,msg,arg1,arg2,arg3)
135 #define _RPTF4(rptno,msg,arg1,arg2,arg3,arg4)
136 #define _RPTFW4(rptno,msg,arg1,arg2,arg3,arg4)
137
138 #define _malloc_dbg(s,t,f,l) malloc(s)
139 #define _calloc_dbg(c,s,t,f,l) calloc(c,s)
140 #define _realloc_dbg(p,s,t,f,l) realloc(p,s)
141 #define _recalloc_dbg(p,c,s,t,f,l) _recalloc(p,c,s)
142 #define _expand_dbg(p,s,t,f,l) _expand(p,s)
143 #define _free_dbg(p,t) free(p)
144 #define _msize_dbg(p,t) _msize(p)
145
146 #define _aligned_malloc_dbg(s,a,f,l) _aligned_malloc(s,a)
147 #define _aligned_realloc_dbg(p,s,a,f,l) _aligned_realloc(p,s,a)
148 #define _aligned_recalloc_dbg(p,c,s,a,f,l) _aligned_realloc(p,c,s,a)
149 #define _aligned_free_dbg(p) _aligned_free(p)
150 #define _aligned_offset_malloc_dbg(s,a,o,f,l) _aligned_offset_malloc(s,a,o)
151 #define _aligned_offset_realloc_dbg(p,s,a,o,f,l) _aligned_offset_realloc(p,s,a,o)
152 #define _aligned_offset_recalloc_dbg(p,c,s,a,o,f,l) _aligned_offset_recalloc(p,c,s,a,o)
153
154 #define _malloca_dbg(s,t,f,l) _malloca(s)
155 #define _freea_dbg(p,t) _freea(p)
156
157 #define _strdup_dbg(s,t,f,l) _strdup(s)
158 #define _wcsdup_dbg(s,t,f,l) _wcsdup(s)
159 #define _mbsdup_dbg(s,t,f,l) _mbsdup(s)
160 #define _tempnam_dbg(s1,s2,t,f,l) _tempnam(s1,s2)
161 #define _wtempnam_dbg(s1,s2,t,f,l) _wtempnam(s1,s2)
162 #define _fullpath_dbg(s1,s2,le,t,f,l) _fullpath(s1,s2,le)
163 #define _wfullpath_dbg(s1,s2,le,t,f,l) _wfullpath(s1,s2,le)
164 #define _getcwd_dbg(s,le,t,f,l) _getcwd(s,le)
165 #define _wgetcwd_dbg(s,le,t,f,l) _wgetcwd(s,le)
166 #define _getdcwd_dbg(d,s,le,t,f,l) _getdcwd(d,s,le)
167 #define _wgetdcwd_dbg(d,s,le,t,f,l) _wgetdcwd(d,s,le)
168 #define _getdcwd_lk_dbg(d,s,le,t,f,l) _getdcwd_nolock(d,s,le)
169 #define _wgetdcwd_lk_dbg(d,s,le,t,f,l) _wgetdcwd_nolock(d,s,le)
170
171 #define _CrtSetReportHook(f) ((_CRT_REPORT_HOOK)0)
172 #define _CrtGetReportHook() ((_CRT_REPORT_HOOK)0)
173 #define _CrtSetReportHook2(t,f) ((int)0)
174 #define _CrtSetReportHookW2(t,f) ((int)0)
175 #define _CrtSetReportMode(t,f) ((int)0)
176 #define _CrtSetReportFile(t,f) ((_HFILE)0)
177
178 #define _CrtDbgBreak() ((void)0)
179
180 #define _CrtSetBreakAlloc(a) ((long)0)
181 #define _CrtSetAllocHook(f) ((_CRT_ALLOC_HOOK)0)
182 #define _CrtGetAllocHook() ((_CRT_ALLOC_HOOK)0)
183 #define _CrtCheckMemory() ((int)1)
184 #define _CrtSetDbgFlag(f) ((int)0)
185 #define _CrtDoForAllClientObjects(f,c) ((void)0)
186 #define _CrtIsValidPointer(p,n,r) ((int)1)
187 #define _CrtIsValidHeapPointer(p) ((int)1)
188 #define _CrtIsMemoryBlock(p,t,r,f,l) ((int)1)
189 #define _CrtReportBlockType(p) ((int)-1)
190 #define _CrtSetDumpClient(f) ((_CRT_DUMP_CLIENT)0)
191 #define _CrtGetDumpClient() ((_CRT_DUMP_CLIENT)0)
192 #define _CrtMemCheckpoint(s) ((void)0)
193 #define _CrtMemDifference(s1,s2,s3) ((int)0)
194 #define _CrtMemDumpAllObjectsSince(s) ((void)0)
195 #define _CrtMemDumpStatistics(s) ((void)0)
196 #define _CrtDumpMemoryLeaks() ((int)0)
197 #define _CrtSetDebugFillThreshold(t) ((size_t)0)
198 #define _CrtSetCheckCount(f) ((int)0)
199 #define _CrtGetCheckCount() ((int)0)
200
201 #ifdef __cplusplus
202 }
203
204 void *__cdecl operator new[](size_t _Size);
205 inline void *__cdecl operator new(size_t _Size,int,const char *,int) { return ::operator new(_Size); }
206 inline void *__cdecl operator new[](size_t _Size,int,const char *,int) { return ::operator new[](_Size); }
207 void __cdecl operator delete[](void *);
208 inline void __cdecl operator delete(void *_P,int,const char *,int) { ::operator delete(_P); }
209 inline void __cdecl operator delete[](void *_P,int,const char *,int) { ::operator delete[](_P); }
210 #endif
211
212 #pragma pack(pop)
213
214 #include <sec_api/crtdbg_s.h>
215
216 #endif