triton-windows 3.5.1.post21__cp313-cp313-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (217) hide show
  1. triton/_C/libtriton.pyd +0 -0
  2. triton/__init__.py +82 -0
  3. triton/_filecheck.py +97 -0
  4. triton/_internal_testing.py +255 -0
  5. triton/_utils.py +126 -0
  6. triton/backends/__init__.py +47 -0
  7. triton/backends/amd/__init__.py +0 -0
  8. triton/backends/amd/compiler.py +461 -0
  9. triton/backends/amd/driver.c +283 -0
  10. triton/backends/amd/driver.py +724 -0
  11. triton/backends/amd/lib/asanrtl.bc +0 -0
  12. triton/backends/amd/lib/ockl.bc +0 -0
  13. triton/backends/amd/lib/ocml.bc +0 -0
  14. triton/backends/compiler.py +90 -0
  15. triton/backends/driver.py +66 -0
  16. triton/backends/nvidia/__init__.py +0 -0
  17. triton/backends/nvidia/bin/ptxas.exe +0 -0
  18. triton/backends/nvidia/compiler.py +533 -0
  19. triton/backends/nvidia/driver.c +517 -0
  20. triton/backends/nvidia/driver.py +799 -0
  21. triton/backends/nvidia/include/cuda.h +26280 -0
  22. triton/backends/nvidia/lib/libdevice.10.bc +0 -0
  23. triton/backends/nvidia/lib/x64/cuda.lib +0 -0
  24. triton/compiler/__init__.py +7 -0
  25. triton/compiler/code_generator.py +1614 -0
  26. triton/compiler/compiler.py +509 -0
  27. triton/compiler/errors.py +51 -0
  28. triton/compiler/make_launcher.py +0 -0
  29. triton/errors.py +5 -0
  30. triton/experimental/__init__.py +0 -0
  31. triton/experimental/gluon/__init__.py +5 -0
  32. triton/experimental/gluon/_compiler.py +0 -0
  33. triton/experimental/gluon/_runtime.py +102 -0
  34. triton/experimental/gluon/language/__init__.py +119 -0
  35. triton/experimental/gluon/language/_core.py +490 -0
  36. triton/experimental/gluon/language/_layouts.py +583 -0
  37. triton/experimental/gluon/language/_math.py +20 -0
  38. triton/experimental/gluon/language/_semantic.py +380 -0
  39. triton/experimental/gluon/language/_standard.py +80 -0
  40. triton/experimental/gluon/language/amd/__init__.py +4 -0
  41. triton/experimental/gluon/language/amd/_layouts.py +96 -0
  42. triton/experimental/gluon/language/amd/cdna3/__init__.py +100 -0
  43. triton/experimental/gluon/language/amd/cdna4/__init__.py +48 -0
  44. triton/experimental/gluon/language/amd/cdna4/async_copy.py +151 -0
  45. triton/experimental/gluon/language/extra/__init__.py +3 -0
  46. triton/experimental/gluon/language/nvidia/__init__.py +4 -0
  47. triton/experimental/gluon/language/nvidia/ampere/__init__.py +3 -0
  48. triton/experimental/gluon/language/nvidia/ampere/async_copy.py +74 -0
  49. triton/experimental/gluon/language/nvidia/ampere/mbarrier.py +80 -0
  50. triton/experimental/gluon/language/nvidia/blackwell/__init__.py +387 -0
  51. triton/experimental/gluon/language/nvidia/blackwell/tma.py +52 -0
  52. triton/experimental/gluon/language/nvidia/hopper/__init__.py +132 -0
  53. triton/experimental/gluon/language/nvidia/hopper/mbarrier.py +34 -0
  54. triton/experimental/gluon/language/nvidia/hopper/tma.py +97 -0
  55. triton/experimental/gluon/nvidia/__init__.py +4 -0
  56. triton/experimental/gluon/nvidia/blackwell.py +3 -0
  57. triton/experimental/gluon/nvidia/hopper.py +45 -0
  58. triton/knobs.py +546 -0
  59. triton/language/__init__.py +342 -0
  60. triton/language/core.py +3405 -0
  61. triton/language/extra/__init__.py +26 -0
  62. triton/language/extra/cuda/__init__.py +16 -0
  63. triton/language/extra/cuda/gdc.py +42 -0
  64. triton/language/extra/cuda/libdevice.py +1629 -0
  65. triton/language/extra/cuda/utils.py +109 -0
  66. triton/language/extra/hip/__init__.py +5 -0
  67. triton/language/extra/hip/libdevice.py +491 -0
  68. triton/language/extra/hip/utils.py +35 -0
  69. triton/language/extra/libdevice.py +790 -0
  70. triton/language/math.py +249 -0
  71. triton/language/random.py +218 -0
  72. triton/language/semantic.py +1939 -0
  73. triton/language/standard.py +534 -0
  74. triton/language/target_info.py +54 -0
  75. triton/runtime/__init__.py +23 -0
  76. triton/runtime/_allocation.py +44 -0
  77. triton/runtime/_async_compile.py +55 -0
  78. triton/runtime/autotuner.py +476 -0
  79. triton/runtime/build.py +168 -0
  80. triton/runtime/cache.py +317 -0
  81. triton/runtime/driver.py +38 -0
  82. triton/runtime/errors.py +36 -0
  83. triton/runtime/interpreter.py +1414 -0
  84. triton/runtime/jit.py +1107 -0
  85. triton/runtime/tcc/include/_mingw.h +168 -0
  86. triton/runtime/tcc/include/assert.h +62 -0
  87. triton/runtime/tcc/include/conio.h +409 -0
  88. triton/runtime/tcc/include/ctype.h +281 -0
  89. triton/runtime/tcc/include/dir.h +31 -0
  90. triton/runtime/tcc/include/direct.h +68 -0
  91. triton/runtime/tcc/include/dirent.h +135 -0
  92. triton/runtime/tcc/include/dos.h +55 -0
  93. triton/runtime/tcc/include/errno.h +75 -0
  94. triton/runtime/tcc/include/excpt.h +123 -0
  95. triton/runtime/tcc/include/fcntl.h +52 -0
  96. triton/runtime/tcc/include/fenv.h +108 -0
  97. triton/runtime/tcc/include/float.h +75 -0
  98. triton/runtime/tcc/include/inttypes.h +297 -0
  99. triton/runtime/tcc/include/io.h +418 -0
  100. triton/runtime/tcc/include/iso646.h +36 -0
  101. triton/runtime/tcc/include/limits.h +116 -0
  102. triton/runtime/tcc/include/locale.h +91 -0
  103. triton/runtime/tcc/include/malloc.h +181 -0
  104. triton/runtime/tcc/include/math.h +497 -0
  105. triton/runtime/tcc/include/mem.h +13 -0
  106. triton/runtime/tcc/include/memory.h +40 -0
  107. triton/runtime/tcc/include/process.h +176 -0
  108. triton/runtime/tcc/include/sec_api/conio_s.h +42 -0
  109. triton/runtime/tcc/include/sec_api/crtdbg_s.h +19 -0
  110. triton/runtime/tcc/include/sec_api/io_s.h +33 -0
  111. triton/runtime/tcc/include/sec_api/mbstring_s.h +52 -0
  112. triton/runtime/tcc/include/sec_api/search_s.h +25 -0
  113. triton/runtime/tcc/include/sec_api/stdio_s.h +145 -0
  114. triton/runtime/tcc/include/sec_api/stdlib_s.h +67 -0
  115. triton/runtime/tcc/include/sec_api/stralign_s.h +30 -0
  116. triton/runtime/tcc/include/sec_api/string_s.h +41 -0
  117. triton/runtime/tcc/include/sec_api/sys/timeb_s.h +34 -0
  118. triton/runtime/tcc/include/sec_api/tchar_s.h +266 -0
  119. triton/runtime/tcc/include/sec_api/time_s.h +61 -0
  120. triton/runtime/tcc/include/sec_api/wchar_s.h +128 -0
  121. triton/runtime/tcc/include/setjmp.h +160 -0
  122. triton/runtime/tcc/include/share.h +28 -0
  123. triton/runtime/tcc/include/signal.h +63 -0
  124. triton/runtime/tcc/include/stdalign.h +16 -0
  125. triton/runtime/tcc/include/stdarg.h +14 -0
  126. triton/runtime/tcc/include/stdatomic.h +171 -0
  127. triton/runtime/tcc/include/stdbool.h +11 -0
  128. triton/runtime/tcc/include/stddef.h +42 -0
  129. triton/runtime/tcc/include/stdint.h +212 -0
  130. triton/runtime/tcc/include/stdio.h +429 -0
  131. triton/runtime/tcc/include/stdlib.h +591 -0
  132. triton/runtime/tcc/include/stdnoreturn.h +7 -0
  133. triton/runtime/tcc/include/string.h +164 -0
  134. triton/runtime/tcc/include/sys/fcntl.h +13 -0
  135. triton/runtime/tcc/include/sys/file.h +14 -0
  136. triton/runtime/tcc/include/sys/locking.h +30 -0
  137. triton/runtime/tcc/include/sys/stat.h +290 -0
  138. triton/runtime/tcc/include/sys/time.h +69 -0
  139. triton/runtime/tcc/include/sys/timeb.h +133 -0
  140. triton/runtime/tcc/include/sys/types.h +123 -0
  141. triton/runtime/tcc/include/sys/unistd.h +14 -0
  142. triton/runtime/tcc/include/sys/utime.h +146 -0
  143. triton/runtime/tcc/include/tcc/tcc_libm.h +618 -0
  144. triton/runtime/tcc/include/tccdefs.h +342 -0
  145. triton/runtime/tcc/include/tcclib.h +80 -0
  146. triton/runtime/tcc/include/tchar.h +1102 -0
  147. triton/runtime/tcc/include/tgmath.h +89 -0
  148. triton/runtime/tcc/include/time.h +287 -0
  149. triton/runtime/tcc/include/uchar.h +33 -0
  150. triton/runtime/tcc/include/unistd.h +1 -0
  151. triton/runtime/tcc/include/vadefs.h +11 -0
  152. triton/runtime/tcc/include/values.h +4 -0
  153. triton/runtime/tcc/include/varargs.h +12 -0
  154. triton/runtime/tcc/include/wchar.h +873 -0
  155. triton/runtime/tcc/include/wctype.h +172 -0
  156. triton/runtime/tcc/include/winapi/basetsd.h +149 -0
  157. triton/runtime/tcc/include/winapi/basetyps.h +85 -0
  158. triton/runtime/tcc/include/winapi/guiddef.h +156 -0
  159. triton/runtime/tcc/include/winapi/poppack.h +8 -0
  160. triton/runtime/tcc/include/winapi/pshpack1.h +8 -0
  161. triton/runtime/tcc/include/winapi/pshpack2.h +8 -0
  162. triton/runtime/tcc/include/winapi/pshpack4.h +8 -0
  163. triton/runtime/tcc/include/winapi/pshpack8.h +8 -0
  164. triton/runtime/tcc/include/winapi/qos.h +72 -0
  165. triton/runtime/tcc/include/winapi/shellapi.h +59 -0
  166. triton/runtime/tcc/include/winapi/winbase.h +2958 -0
  167. triton/runtime/tcc/include/winapi/wincon.h +309 -0
  168. triton/runtime/tcc/include/winapi/windef.h +293 -0
  169. triton/runtime/tcc/include/winapi/windows.h +127 -0
  170. triton/runtime/tcc/include/winapi/winerror.h +3166 -0
  171. triton/runtime/tcc/include/winapi/wingdi.h +4080 -0
  172. triton/runtime/tcc/include/winapi/winnls.h +778 -0
  173. triton/runtime/tcc/include/winapi/winnt.h +5837 -0
  174. triton/runtime/tcc/include/winapi/winreg.h +272 -0
  175. triton/runtime/tcc/include/winapi/winsock2.h +1474 -0
  176. triton/runtime/tcc/include/winapi/winuser.h +5651 -0
  177. triton/runtime/tcc/include/winapi/winver.h +160 -0
  178. triton/runtime/tcc/include/winapi/ws2ipdef.h +21 -0
  179. triton/runtime/tcc/include/winapi/ws2tcpip.h +391 -0
  180. triton/runtime/tcc/lib/cuda.def +697 -0
  181. triton/runtime/tcc/lib/gdi32.def +337 -0
  182. triton/runtime/tcc/lib/kernel32.def +770 -0
  183. triton/runtime/tcc/lib/libtcc1.a +0 -0
  184. triton/runtime/tcc/lib/msvcrt.def +1399 -0
  185. triton/runtime/tcc/lib/python3.def +810 -0
  186. triton/runtime/tcc/lib/python310.def +1610 -0
  187. triton/runtime/tcc/lib/python311.def +1633 -0
  188. triton/runtime/tcc/lib/python312.def +1703 -0
  189. triton/runtime/tcc/lib/python313.def +1651 -0
  190. triton/runtime/tcc/lib/python313t.def +1656 -0
  191. triton/runtime/tcc/lib/python314.def +1800 -0
  192. triton/runtime/tcc/lib/python314t.def +1809 -0
  193. triton/runtime/tcc/lib/python39.def +1644 -0
  194. triton/runtime/tcc/lib/python3t.def +905 -0
  195. triton/runtime/tcc/lib/user32.def +658 -0
  196. triton/runtime/tcc/libtcc.dll +0 -0
  197. triton/runtime/tcc/tcc.exe +0 -0
  198. triton/testing.py +543 -0
  199. triton/tools/__init__.py +0 -0
  200. triton/tools/build_extern.py +365 -0
  201. triton/tools/compile.py +210 -0
  202. triton/tools/disasm.py +143 -0
  203. triton/tools/extra/cuda/compile.c +70 -0
  204. triton/tools/extra/cuda/compile.h +14 -0
  205. triton/tools/extra/hip/compile.cpp +66 -0
  206. triton/tools/extra/hip/compile.h +13 -0
  207. triton/tools/link.py +322 -0
  208. triton/tools/mxfp.py +301 -0
  209. triton/tools/ragged_tma.py +92 -0
  210. triton/tools/tensor_descriptor.py +34 -0
  211. triton/windows_utils.py +405 -0
  212. triton_windows-3.5.1.post21.dist-info/METADATA +46 -0
  213. triton_windows-3.5.1.post21.dist-info/RECORD +217 -0
  214. triton_windows-3.5.1.post21.dist-info/WHEEL +5 -0
  215. triton_windows-3.5.1.post21.dist-info/entry_points.txt +3 -0
  216. triton_windows-3.5.1.post21.dist-info/licenses/LICENSE +23 -0
  217. triton_windows-3.5.1.post21.dist-info/top_level.txt +1 -0
@@ -0,0 +1,591 @@
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
+ #ifndef _INC_STDLIB
7
+ #define _INC_STDLIB
8
+
9
+ #include <_mingw.h>
10
+ #include <limits.h>
11
+
12
+ #pragma pack(push,_CRT_PACKING)
13
+
14
+ #ifdef __cplusplus
15
+ extern "C" {
16
+ #endif
17
+
18
+ #ifndef NULL
19
+ #ifdef __cplusplus
20
+ #define NULL 0
21
+ #else
22
+ #define NULL ((void *)0)
23
+ #endif
24
+ #endif
25
+
26
+ #define EXIT_SUCCESS 0
27
+ #define EXIT_FAILURE 1
28
+
29
+ #ifndef _ONEXIT_T_DEFINED
30
+ #define _ONEXIT_T_DEFINED
31
+
32
+ typedef int (__cdecl *_onexit_t)(void);
33
+
34
+ #ifndef NO_OLDNAMES
35
+ #define onexit_t _onexit_t
36
+ #endif
37
+ #endif
38
+
39
+ #ifndef _DIV_T_DEFINED
40
+ #define _DIV_T_DEFINED
41
+
42
+ typedef struct _div_t {
43
+ int quot;
44
+ int rem;
45
+ } div_t;
46
+
47
+ typedef struct _ldiv_t {
48
+ long quot;
49
+ long rem;
50
+ } ldiv_t;
51
+ #endif
52
+
53
+ #ifndef _CRT_DOUBLE_DEC
54
+ #define _CRT_DOUBLE_DEC
55
+
56
+ #pragma pack(4)
57
+ typedef struct {
58
+ unsigned char ld[10];
59
+ } _LDOUBLE;
60
+ #pragma pack()
61
+
62
+ #define _PTR_LD(x) ((unsigned char *)(&(x)->ld))
63
+
64
+ typedef struct {
65
+ double x;
66
+ } _CRT_DOUBLE;
67
+
68
+ typedef struct {
69
+ float f;
70
+ } _CRT_FLOAT;
71
+
72
+ #pragma push_macro("long")
73
+ #undef long
74
+
75
+ typedef struct {
76
+ long double x;
77
+ } _LONGDOUBLE;
78
+
79
+ #pragma pop_macro("long")
80
+
81
+ #pragma pack(4)
82
+ typedef struct {
83
+ unsigned char ld12[12];
84
+ } _LDBL12;
85
+ #pragma pack()
86
+ #endif
87
+
88
+ #define RAND_MAX 0x7fff
89
+
90
+ #ifndef MB_CUR_MAX
91
+ #define MB_CUR_MAX ___mb_cur_max_func()
92
+ #ifndef __mb_cur_max
93
+ #ifdef _MSVCRT_
94
+ extern int __mb_cur_max;
95
+ #else
96
+ #define __mb_cur_max (*_imp____mb_cur_max)
97
+ extern int *_imp____mb_cur_max;
98
+ #endif
99
+ #endif
100
+ #ifdef _MSVCRT_
101
+ extern int __mbcur_max;
102
+ #define ___mb_cur_max_func() (__mb_cur_max)
103
+ #else
104
+ extern int* _imp____mbcur_max;
105
+ #define ___mb_cur_max_func() (*_imp____mb_cur_max)
106
+ #endif
107
+ #endif
108
+
109
+ #define __max(a,b) (((a) > (b)) ? (a) : (b))
110
+ #define __min(a,b) (((a) < (b)) ? (a) : (b))
111
+
112
+ #define _MAX_PATH 260
113
+ #define _MAX_DRIVE 3
114
+ #define _MAX_DIR 256
115
+ #define _MAX_FNAME 256
116
+ #define _MAX_EXT 256
117
+
118
+ #define _OUT_TO_DEFAULT 0
119
+ #define _OUT_TO_STDERR 1
120
+ #define _OUT_TO_MSGBOX 2
121
+ #define _REPORT_ERRMODE 3
122
+
123
+ #define _WRITE_ABORT_MSG 0x1
124
+ #define _CALL_REPORTFAULT 0x2
125
+
126
+ #define _MAX_ENV 32767
127
+
128
+ typedef void (__cdecl *_purecall_handler)(void);
129
+
130
+ _CRTIMP _purecall_handler __cdecl _set_purecall_handler(_purecall_handler _Handler);
131
+ _CRTIMP _purecall_handler __cdecl _get_purecall_handler(void);
132
+
133
+ typedef void (__cdecl *_invalid_parameter_handler)(const wchar_t *,const wchar_t *,const wchar_t *,unsigned int,uintptr_t);
134
+ _invalid_parameter_handler __cdecl _set_invalid_parameter_handler(_invalid_parameter_handler _Handler);
135
+ _invalid_parameter_handler __cdecl _get_invalid_parameter_handler(void);
136
+
137
+ #ifndef _CRT_ERRNO_DEFINED
138
+ #define _CRT_ERRNO_DEFINED
139
+ _CRTIMP int *__cdecl _errno(void);
140
+ #define errno (*_errno())
141
+ errno_t __cdecl _set_errno(int _Value);
142
+ errno_t __cdecl _get_errno(int *_Value);
143
+ #endif
144
+ _CRTIMP unsigned long *__cdecl __doserrno(void);
145
+ #define _doserrno (*__doserrno())
146
+ errno_t __cdecl _set_doserrno(unsigned long _Value);
147
+ errno_t __cdecl _get_doserrno(unsigned long *_Value);
148
+ #ifdef _MSVCRT_
149
+ extern char *_sys_errlist[];
150
+ extern int _sys_nerr;
151
+ #else
152
+ _CRTIMP char *_sys_errlist[1];
153
+ _CRTIMP int _sys_nerr;
154
+ #endif
155
+ #if (defined(_X86_) && !defined(__x86_64))
156
+ _CRTIMP int *__cdecl __p___argc(void);
157
+ _CRTIMP char ***__cdecl __p___argv(void);
158
+ _CRTIMP wchar_t ***__cdecl __p___wargv(void);
159
+ _CRTIMP char ***__cdecl __p__environ(void);
160
+ _CRTIMP wchar_t ***__cdecl __p__wenviron(void);
161
+ _CRTIMP char **__cdecl __p__pgmptr(void);
162
+ _CRTIMP wchar_t **__cdecl __p__wpgmptr(void);
163
+ #endif
164
+ #ifndef __argc
165
+ #ifdef _MSVCRT_
166
+ extern int __argc;
167
+ #else
168
+ #define __argc (*_imp____argc)
169
+ extern int *_imp____argc;
170
+ #endif
171
+ #endif
172
+ #ifndef __argv
173
+ #ifdef _MSVCRT_
174
+ extern char **__argv;
175
+ #else
176
+ #define __argv (*_imp____argv)
177
+ extern char ***_imp____argv;
178
+ #endif
179
+ #endif
180
+ #ifndef __wargv
181
+ #ifdef _MSVCRT_
182
+ extern wchar_t **__wargv;
183
+ #else
184
+ #define __wargv (*_imp____wargv)
185
+ extern wchar_t ***_imp____wargv;
186
+ #endif
187
+ #endif
188
+
189
+ #ifdef _POSIX_
190
+ extern char **environ;
191
+ #else
192
+ #ifndef _environ
193
+ #ifdef _MSVCRT_
194
+ extern char **_environ;
195
+ #else
196
+ #define _environ (*_imp___environ)
197
+ extern char ***_imp___environ;
198
+ #endif
199
+ #endif
200
+
201
+ #ifndef _wenviron
202
+ #ifdef _MSVCRT_
203
+ extern wchar_t **_wenviron;
204
+ #else
205
+ #define _wenviron (*_imp___wenviron)
206
+ extern wchar_t ***_imp___wenviron;
207
+ #endif
208
+ #endif
209
+ #endif
210
+ #ifndef _pgmptr
211
+ #ifdef _MSVCRT_
212
+ extern char *_pgmptr;
213
+ #else
214
+ #define _pgmptr (*_imp___pgmptr)
215
+ extern char **_imp___pgmptr;
216
+ #endif
217
+ #endif
218
+
219
+ #ifndef _wpgmptr
220
+ #ifdef _MSVCRT_
221
+ extern wchar_t *_wpgmptr;
222
+ #else
223
+ #define _wpgmptr (*_imp___wpgmptr)
224
+ extern wchar_t **_imp___wpgmptr;
225
+ #endif
226
+ #endif
227
+ errno_t __cdecl _get_pgmptr(char **_Value);
228
+ errno_t __cdecl _get_wpgmptr(wchar_t **_Value);
229
+ #ifndef _fmode
230
+ #ifdef _MSVCRT_
231
+ extern int _fmode;
232
+ #else
233
+ #define _fmode (*_imp___fmode)
234
+ extern int *_imp___fmode;
235
+ #endif
236
+ #endif
237
+ _CRTIMP errno_t __cdecl _set_fmode(int _Mode);
238
+ _CRTIMP errno_t __cdecl _get_fmode(int *_PMode);
239
+
240
+ #ifndef _osplatform
241
+ #ifdef _MSVCRT_
242
+ extern unsigned int _osplatform;
243
+ #else
244
+ #define _osplatform (*_imp___osplatform)
245
+ extern unsigned int *_imp___osplatform;
246
+ #endif
247
+ #endif
248
+
249
+ #ifndef _osver
250
+ #ifdef _MSVCRT_
251
+ extern unsigned int _osver;
252
+ #else
253
+ #define _osver (*_imp___osver)
254
+ extern unsigned int *_imp___osver;
255
+ #endif
256
+ #endif
257
+
258
+ #ifndef _winver
259
+ #ifdef _MSVCRT_
260
+ extern unsigned int _winver;
261
+ #else
262
+ #define _winver (*_imp___winver)
263
+ extern unsigned int *_imp___winver;
264
+ #endif
265
+ #endif
266
+
267
+ #ifndef _winmajor
268
+ #ifdef _MSVCRT_
269
+ extern unsigned int _winmajor;
270
+ #else
271
+ #define _winmajor (*_imp___winmajor)
272
+ extern unsigned int *_imp___winmajor;
273
+ #endif
274
+ #endif
275
+
276
+ #ifndef _winminor
277
+ #ifdef _MSVCRT_
278
+ extern unsigned int _winminor;
279
+ #else
280
+ #define _winminor (*_imp___winminor)
281
+ extern unsigned int *_imp___winminor;
282
+ #endif
283
+ #endif
284
+
285
+ errno_t __cdecl _get_osplatform(unsigned int *_Value);
286
+ errno_t __cdecl _get_osver(unsigned int *_Value);
287
+ errno_t __cdecl _get_winver(unsigned int *_Value);
288
+ errno_t __cdecl _get_winmajor(unsigned int *_Value);
289
+ errno_t __cdecl _get_winminor(unsigned int *_Value);
290
+ #ifndef _countof
291
+ #ifndef __cplusplus
292
+ #define _countof(_Array) (sizeof(_Array) / sizeof(_Array[0]))
293
+ #else
294
+ extern "C++" {
295
+ template <typename _CountofType,size_t _SizeOfArray> char (*__countof_helper(UNALIGNED _CountofType (&_Array)[_SizeOfArray]))[_SizeOfArray];
296
+ #define _countof(_Array) sizeof(*__countof_helper(_Array))
297
+ }
298
+ #endif
299
+ #endif
300
+
301
+ #ifndef _CRT_TERMINATE_DEFINED
302
+ #define _CRT_TERMINATE_DEFINED
303
+ void __cdecl __MINGW_NOTHROW exit(int _Code) __MINGW_ATTRIB_NORETURN;
304
+ _CRTIMP void __cdecl __MINGW_NOTHROW _exit(int _Code) __MINGW_ATTRIB_NORETURN;
305
+ #if !defined __NO_ISOCEXT /* extern stub in static libmingwex.a */
306
+ /* C99 function name */
307
+ void __cdecl _Exit(int) __MINGW_ATTRIB_NORETURN;
308
+ __CRT_INLINE __MINGW_ATTRIB_NORETURN void __cdecl _Exit(int status)
309
+ { _exit(status); }
310
+ #endif
311
+
312
+ #pragma push_macro("abort")
313
+ #undef abort
314
+ void __cdecl __declspec(noreturn) abort(void);
315
+ #pragma pop_macro("abort")
316
+
317
+ #endif
318
+
319
+ _CRTIMP unsigned int __cdecl _set_abort_behavior(unsigned int _Flags,unsigned int _Mask);
320
+
321
+ #ifndef _CRT_ABS_DEFINED
322
+ #define _CRT_ABS_DEFINED
323
+ int __cdecl abs(int _X);
324
+ long __cdecl labs(long _X);
325
+ #endif
326
+
327
+ #if _INTEGRAL_MAX_BITS >= 64
328
+ __int64 __cdecl _abs64(__int64);
329
+ #endif
330
+ int __cdecl atexit(void (__cdecl *)(void));
331
+ #ifndef _CRT_ATOF_DEFINED
332
+ #define _CRT_ATOF_DEFINED
333
+ double __cdecl atof(const char *_String);
334
+ double __cdecl _atof_l(const char *_String,_locale_t _Locale);
335
+ #endif
336
+ int __cdecl atoi(const char *_Str);
337
+ _CRTIMP int __cdecl _atoi_l(const char *_Str,_locale_t _Locale);
338
+ long __cdecl atol(const char *_Str);
339
+ _CRTIMP long __cdecl _atol_l(const char *_Str,_locale_t _Locale);
340
+ #ifndef _CRT_ALGO_DEFINED
341
+ #define _CRT_ALGO_DEFINED
342
+ void *__cdecl bsearch(const void *_Key,const void *_Base,size_t _NumOfElements,size_t _SizeOfElements,int (__cdecl *_PtFuncCompare)(const void *,const void *));
343
+ void __cdecl qsort(void *_Base,size_t _NumOfElements,size_t _SizeOfElements,int (__cdecl *_PtFuncCompare)(const void *,const void *));
344
+ #endif
345
+ unsigned short __cdecl _byteswap_ushort(unsigned short _Short);
346
+ /*unsigned long __cdecl _byteswap_ulong (unsigned long _Long); */
347
+ #if _INTEGRAL_MAX_BITS >= 64
348
+ unsigned __int64 __cdecl _byteswap_uint64(unsigned __int64 _Int64);
349
+ #endif
350
+ div_t __cdecl div(int _Numerator,int _Denominator);
351
+ char *__cdecl getenv(const char *_VarName);
352
+ _CRTIMP char *__cdecl _itoa(int _Value,char *_Dest,int _Radix);
353
+ #if _INTEGRAL_MAX_BITS >= 64
354
+ _CRTIMP char *__cdecl _i64toa(__int64 _Val,char *_DstBuf,int _Radix);
355
+ _CRTIMP char *__cdecl _ui64toa(unsigned __int64 _Val,char *_DstBuf,int _Radix);
356
+ _CRTIMP __int64 __cdecl _atoi64(const char *_String);
357
+ _CRTIMP __int64 __cdecl _atoi64_l(const char *_String,_locale_t _Locale);
358
+ _CRTIMP __int64 __cdecl _strtoi64(const char *_String,char **_EndPtr,int _Radix);
359
+ _CRTIMP __int64 __cdecl _strtoi64_l(const char *_String,char **_EndPtr,int _Radix,_locale_t _Locale);
360
+ _CRTIMP unsigned __int64 __cdecl _strtoui64(const char *_String,char **_EndPtr,int _Radix);
361
+ _CRTIMP unsigned __int64 __cdecl _strtoui64_l(const char *_String,char **_EndPtr,int _Radix,_locale_t _Locale);
362
+ #endif
363
+ ldiv_t __cdecl ldiv(long _Numerator,long _Denominator);
364
+ _CRTIMP char *__cdecl _ltoa(long _Value,char *_Dest,int _Radix);
365
+ int __cdecl mblen(const char *_Ch,size_t _MaxCount);
366
+ _CRTIMP int __cdecl _mblen_l(const char *_Ch,size_t _MaxCount,_locale_t _Locale);
367
+ _CRTIMP size_t __cdecl _mbstrlen(const char *_Str);
368
+ _CRTIMP size_t __cdecl _mbstrlen_l(const char *_Str,_locale_t _Locale);
369
+ _CRTIMP size_t __cdecl _mbstrnlen(const char *_Str,size_t _MaxCount);
370
+ _CRTIMP size_t __cdecl _mbstrnlen_l(const char *_Str,size_t _MaxCount,_locale_t _Locale);
371
+ int __cdecl mbtowc(wchar_t *_DstCh,const char *_SrcCh,size_t _SrcSizeInBytes);
372
+ _CRTIMP int __cdecl _mbtowc_l(wchar_t *_DstCh,const char *_SrcCh,size_t _SrcSizeInBytes,_locale_t _Locale);
373
+ size_t __cdecl mbstowcs(wchar_t *_Dest,const char *_Source,size_t _MaxCount);
374
+ _CRTIMP size_t __cdecl _mbstowcs_l(wchar_t *_Dest,const char *_Source,size_t _MaxCount,_locale_t _Locale);
375
+ int __cdecl rand(void);
376
+ _CRTIMP int __cdecl _set_error_mode(int _Mode);
377
+ void __cdecl srand(unsigned int _Seed);
378
+ double __cdecl strtod(const char *_Str,char **_EndPtr);
379
+ #if !defined __NO_ISOCEXT /* in libmingwex.a */
380
+ #if __TINYC__
381
+ __CRT_INLINE float __cdecl strtof (const char *p, char ** e) { return strtod(p, e); }
382
+ __CRT_INLINE long double __cdecl strtold(const char *p, char ** e) { return strtod(p, e); }
383
+ #else
384
+ float __cdecl strtof (const char * __restrict__, char ** __restrict__);
385
+ long double __cdecl strtold(const char * __restrict__, char ** __restrict__);
386
+ #endif
387
+ #else
388
+ float __cdecl strtof(const char *nptr, char **endptr);
389
+ #endif /* __NO_ISOCEXT */
390
+ _CRTIMP double __cdecl _strtod_l(const char *_Str,char **_EndPtr,_locale_t _Locale);
391
+ long __cdecl strtol(const char *_Str,char **_EndPtr,int _Radix);
392
+ _CRTIMP long __cdecl _strtol_l(const char *_Str,char **_EndPtr,int _Radix,_locale_t _Locale);
393
+ unsigned long __cdecl strtoul(const char *_Str,char **_EndPtr,int _Radix);
394
+ _CRTIMP unsigned long __cdecl _strtoul_l(const char *_Str,char **_EndPtr,int _Radix,_locale_t _Locale);
395
+ #ifndef _CRT_SYSTEM_DEFINED
396
+ #define _CRT_SYSTEM_DEFINED
397
+ int __cdecl system(const char *_Command);
398
+ #endif
399
+ _CRTIMP char *__cdecl _ultoa(unsigned long _Value,char *_Dest,int _Radix);
400
+ int __cdecl wctomb(char *_MbCh,wchar_t _WCh);
401
+ _CRTIMP int __cdecl _wctomb_l(char *_MbCh,wchar_t _WCh,_locale_t _Locale);
402
+ size_t __cdecl wcstombs(char *_Dest,const wchar_t *_Source,size_t _MaxCount);
403
+ _CRTIMP size_t __cdecl _wcstombs_l(char *_Dest,const wchar_t *_Source,size_t _MaxCount,_locale_t _Locale);
404
+
405
+ #ifndef _CRT_ALLOCATION_DEFINED
406
+ #define _CRT_ALLOCATION_DEFINED
407
+ void *__cdecl calloc(size_t _NumOfElements,size_t _SizeOfElements);
408
+ void __cdecl free(void *_Memory);
409
+ void *__cdecl malloc(size_t _Size);
410
+ void *__cdecl realloc(void *_Memory,size_t _NewSize);
411
+ _CRTIMP void *__cdecl _recalloc(void *_Memory,size_t _Count,size_t _Size);
412
+ _CRTIMP void __cdecl _aligned_free(void *_Memory);
413
+ _CRTIMP void *__cdecl _aligned_malloc(size_t _Size,size_t _Alignment);
414
+ _CRTIMP void *__cdecl _aligned_offset_malloc(size_t _Size,size_t _Alignment,size_t _Offset);
415
+ _CRTIMP void *__cdecl _aligned_realloc(void *_Memory,size_t _Size,size_t _Alignment);
416
+ _CRTIMP void *__cdecl _aligned_recalloc(void *_Memory,size_t _Count,size_t _Size,size_t _Alignment);
417
+ _CRTIMP void *__cdecl _aligned_offset_realloc(void *_Memory,size_t _Size,size_t _Alignment,size_t _Offset);
418
+ _CRTIMP void *__cdecl _aligned_offset_recalloc(void *_Memory,size_t _Count,size_t _Size,size_t _Alignment,size_t _Offset);
419
+ #endif
420
+
421
+ #ifndef _WSTDLIB_DEFINED
422
+ #define _WSTDLIB_DEFINED
423
+
424
+ _CRTIMP wchar_t *__cdecl _itow(int _Value,wchar_t *_Dest,int _Radix);
425
+ _CRTIMP wchar_t *__cdecl _ltow(long _Value,wchar_t *_Dest,int _Radix);
426
+ _CRTIMP wchar_t *__cdecl _ultow(unsigned long _Value,wchar_t *_Dest,int _Radix);
427
+ double __cdecl wcstod(const wchar_t *_Str,wchar_t **_EndPtr);
428
+ float __cdecl wcstof(const wchar_t *nptr, wchar_t **endptr);
429
+ #if !defined __NO_ISOCEXT /* in libmingwex.a */
430
+ float __cdecl wcstof( const wchar_t * __restrict__, wchar_t ** __restrict__);
431
+ long double __cdecl wcstold(const wchar_t * __restrict__, wchar_t ** __restrict__);
432
+ #endif /* __NO_ISOCEXT */
433
+ _CRTIMP double __cdecl _wcstod_l(const wchar_t *_Str,wchar_t **_EndPtr,_locale_t _Locale);
434
+ long __cdecl wcstol(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix);
435
+ _CRTIMP long __cdecl _wcstol_l(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix,_locale_t _Locale);
436
+ unsigned long __cdecl wcstoul(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix);
437
+ _CRTIMP unsigned long __cdecl _wcstoul_l(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix,_locale_t _Locale);
438
+ _CRTIMP wchar_t *__cdecl _wgetenv(const wchar_t *_VarName);
439
+ #ifndef _CRT_WSYSTEM_DEFINED
440
+ #define _CRT_WSYSTEM_DEFINED
441
+ _CRTIMP int __cdecl _wsystem(const wchar_t *_Command);
442
+ #endif
443
+ _CRTIMP double __cdecl _wtof(const wchar_t *_Str);
444
+ _CRTIMP double __cdecl _wtof_l(const wchar_t *_Str,_locale_t _Locale);
445
+ _CRTIMP int __cdecl _wtoi(const wchar_t *_Str);
446
+ _CRTIMP int __cdecl _wtoi_l(const wchar_t *_Str,_locale_t _Locale);
447
+ _CRTIMP long __cdecl _wtol(const wchar_t *_Str);
448
+ _CRTIMP long __cdecl _wtol_l(const wchar_t *_Str,_locale_t _Locale);
449
+
450
+ #if _INTEGRAL_MAX_BITS >= 64
451
+ _CRTIMP wchar_t *__cdecl _i64tow(__int64 _Val,wchar_t *_DstBuf,int _Radix);
452
+ _CRTIMP wchar_t *__cdecl _ui64tow(unsigned __int64 _Val,wchar_t *_DstBuf,int _Radix);
453
+ _CRTIMP __int64 __cdecl _wtoi64(const wchar_t *_Str);
454
+ _CRTIMP __int64 __cdecl _wtoi64_l(const wchar_t *_Str,_locale_t _Locale);
455
+ _CRTIMP __int64 __cdecl _wcstoi64(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix);
456
+ _CRTIMP __int64 __cdecl _wcstoi64_l(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix,_locale_t _Locale);
457
+ _CRTIMP unsigned __int64 __cdecl _wcstoui64(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix);
458
+ _CRTIMP unsigned __int64 __cdecl _wcstoui64_l(const wchar_t *_Str ,wchar_t **_EndPtr,int _Radix,_locale_t _Locale);
459
+ #endif
460
+ #endif
461
+
462
+ #ifndef _POSIX_
463
+ #define _CVTBUFSIZE (309+40)
464
+ _CRTIMP char *__cdecl _fullpath(char *_FullPath,const char *_Path,size_t _SizeInBytes);
465
+ _CRTIMP char *__cdecl _ecvt(double _Val,int _NumOfDigits,int *_PtDec,int *_PtSign);
466
+ _CRTIMP char *__cdecl _fcvt(double _Val,int _NumOfDec,int *_PtDec,int *_PtSign);
467
+ _CRTIMP char *__cdecl _gcvt(double _Val,int _NumOfDigits,char *_DstBuf);
468
+ _CRTIMP int __cdecl _atodbl(_CRT_DOUBLE *_Result,char *_Str);
469
+ _CRTIMP int __cdecl _atoldbl(_LDOUBLE *_Result,char *_Str);
470
+ _CRTIMP int __cdecl _atoflt(_CRT_FLOAT *_Result,char *_Str);
471
+ _CRTIMP int __cdecl _atodbl_l(_CRT_DOUBLE *_Result,char *_Str,_locale_t _Locale);
472
+ _CRTIMP int __cdecl _atoldbl_l(_LDOUBLE *_Result,char *_Str,_locale_t _Locale);
473
+ _CRTIMP int __cdecl _atoflt_l(_CRT_FLOAT *_Result,char *_Str,_locale_t _Locale);
474
+ unsigned long __cdecl _lrotl(unsigned long _Val,int _Shift);
475
+ unsigned long __cdecl _lrotr(unsigned long _Val,int _Shift);
476
+ _CRTIMP void __cdecl _makepath(char *_Path,const char *_Drive,const char *_Dir,const char *_Filename,const char *_Ext);
477
+ _onexit_t __cdecl _onexit(_onexit_t _Func);
478
+
479
+ #ifndef _CRT_PERROR_DEFINED
480
+ #define _CRT_PERROR_DEFINED
481
+ void __cdecl perror(const char *_ErrMsg);
482
+ #endif
483
+ _CRTIMP int __cdecl _putenv(const char *_EnvString);
484
+ unsigned int __cdecl _rotl(unsigned int _Val,int _Shift);
485
+ #if _INTEGRAL_MAX_BITS >= 64
486
+ unsigned __int64 __cdecl _rotl64(unsigned __int64 _Val,int _Shift);
487
+ #endif
488
+ unsigned int __cdecl _rotr(unsigned int _Val,int _Shift);
489
+ #if _INTEGRAL_MAX_BITS >= 64
490
+ unsigned __int64 __cdecl _rotr64(unsigned __int64 _Val,int _Shift);
491
+ #endif
492
+ _CRTIMP void __cdecl _searchenv(const char *_Filename,const char *_EnvVar,char *_ResultPath);
493
+ _CRTIMP void __cdecl _splitpath(const char *_FullPath,char *_Drive,char *_Dir,char *_Filename,char *_Ext);
494
+ _CRTIMP void __cdecl _swab(char *_Buf1,char *_Buf2,int _SizeInBytes);
495
+
496
+ #ifndef _WSTDLIBP_DEFINED
497
+ #define _WSTDLIBP_DEFINED
498
+ _CRTIMP wchar_t *__cdecl _wfullpath(wchar_t *_FullPath,const wchar_t *_Path,size_t _SizeInWords);
499
+ _CRTIMP void __cdecl _wmakepath(wchar_t *_ResultPath,const wchar_t *_Drive,const wchar_t *_Dir,const wchar_t *_Filename,const wchar_t *_Ext);
500
+ #ifndef _CRT_WPERROR_DEFINED
501
+ #define _CRT_WPERROR_DEFINED
502
+ _CRTIMP void __cdecl _wperror(const wchar_t *_ErrMsg);
503
+ #endif
504
+ _CRTIMP int __cdecl _wputenv(const wchar_t *_EnvString);
505
+ _CRTIMP void __cdecl _wsearchenv(const wchar_t *_Filename,const wchar_t *_EnvVar,wchar_t *_ResultPath);
506
+ _CRTIMP void __cdecl _wsplitpath(const wchar_t *_FullPath,wchar_t *_Drive,wchar_t *_Dir,wchar_t *_Filename,wchar_t *_Ext);
507
+ #endif
508
+
509
+ _CRTIMP void __cdecl _beep(unsigned _Frequency,unsigned _Duration) __MINGW_ATTRIB_DEPRECATED;
510
+ /* Not to be confused with _set_error_mode (int). */
511
+ _CRTIMP void __cdecl _seterrormode(int _Mode) __MINGW_ATTRIB_DEPRECATED;
512
+ _CRTIMP void __cdecl _sleep(unsigned long _Duration) __MINGW_ATTRIB_DEPRECATED;
513
+ #endif
514
+
515
+ #ifndef NO_OLDNAMES
516
+ #ifndef _POSIX_
517
+ #if 0
518
+ #ifndef __cplusplus
519
+ #ifndef NOMINMAX
520
+ #ifndef max
521
+ #define max(a,b) (((a) > (b)) ? (a) : (b))
522
+ #endif
523
+ #ifndef min
524
+ #define min(a,b) (((a) < (b)) ? (a) : (b))
525
+ #endif
526
+ #endif
527
+ #endif
528
+ #endif
529
+
530
+ #define sys_errlist _sys_errlist
531
+ #define sys_nerr _sys_nerr
532
+ #define environ _environ
533
+ char *__cdecl ecvt(double _Val,int _NumOfDigits,int *_PtDec,int *_PtSign);
534
+ char *__cdecl fcvt(double _Val,int _NumOfDec,int *_PtDec,int *_PtSign);
535
+ char *__cdecl gcvt(double _Val,int _NumOfDigits,char *_DstBuf);
536
+ char *__cdecl itoa(int _Val,char *_DstBuf,int _Radix);
537
+ char *__cdecl ltoa(long _Val,char *_DstBuf,int _Radix);
538
+ int __cdecl putenv(const char *_EnvString);
539
+ void __cdecl swab(char *_Buf1,char *_Buf2,int _SizeInBytes);
540
+ char *__cdecl ultoa(unsigned long _Val,char *_Dstbuf,int _Radix);
541
+ onexit_t __cdecl onexit(onexit_t _Func);
542
+ #endif
543
+ #endif
544
+
545
+ #if !defined __NO_ISOCEXT /* externs in static libmingwex.a */
546
+
547
+ typedef struct { long long quot, rem; } lldiv_t;
548
+
549
+ lldiv_t __cdecl lldiv(long long, long long);
550
+
551
+ __CRT_INLINE long long __cdecl llabs(long long _j) { return (_j >= 0 ? _j : -_j); }
552
+
553
+ #ifdef __TINYC__ /* gr */
554
+ #define strtoll _strtoi64
555
+ #define strtoull _strtoui64
556
+ #else
557
+ long long __cdecl strtoll(const char* __restrict__, char** __restrict, int);
558
+ unsigned long long __cdecl strtoull(const char* __restrict__, char** __restrict__, int);
559
+ #endif
560
+
561
+ /* these are stubs for MS _i64 versions */
562
+ long long __cdecl atoll (const char *);
563
+
564
+ #ifndef __STRICT_ANSI__
565
+ long long __cdecl wtoll (const wchar_t *);
566
+ char *__cdecl lltoa (long long, char *, int);
567
+ char *__cdecl ulltoa (unsigned long long , char *, int);
568
+ wchar_t *__cdecl lltow (long long, wchar_t *, int);
569
+ wchar_t *__cdecl ulltow (unsigned long long, wchar_t *, int);
570
+
571
+ /* __CRT_INLINE using non-ansi functions */
572
+ __CRT_INLINE long long __cdecl atoll (const char * _c) { return _atoi64 (_c); }
573
+ __CRT_INLINE char *__cdecl lltoa (long long _n, char * _c, int _i) { return _i64toa (_n, _c, _i); }
574
+ __CRT_INLINE char *__cdecl ulltoa (unsigned long long _n, char * _c, int _i) { return _ui64toa (_n, _c, _i); }
575
+ __CRT_INLINE long long __cdecl wtoll (const wchar_t * _w) { return _wtoi64 (_w); }
576
+ __CRT_INLINE wchar_t *__cdecl lltow (long long _n, wchar_t * _w, int _i) { return _i64tow (_n, _w, _i); }
577
+ __CRT_INLINE wchar_t *__cdecl ulltow (unsigned long long _n, wchar_t * _w, int _i) { return _ui64tow (_n, _w, _i); }
578
+ #endif /* (__STRICT_ANSI__) */
579
+
580
+ #endif /* !__NO_ISOCEXT */
581
+
582
+ #ifdef __cplusplus
583
+ }
584
+ #endif
585
+
586
+ #pragma pack(pop)
587
+
588
+ #include <sec_api/stdlib_s.h>
589
+ #include <malloc.h>
590
+
591
+ #endif
@@ -0,0 +1,7 @@
1
+ #ifndef _STDNORETURN_H
2
+ #define _STDNORETURN_H
3
+
4
+ /* ISOC11 noreturn */
5
+ #define noreturn _Noreturn
6
+
7
+ #endif /* _STDNORETURN_H */