triton-windows 3.3.0a0.post12__cp311-cp311-win_amd64.whl → 3.3.0a0.post13__cp311-cp311-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.

Potentially problematic release.


This version of triton-windows might be problematic. Click here for more details.

Files changed (99) hide show
  1. triton/_C/libtriton.pyd +0 -0
  2. triton/__init__.py +0 -12
  3. triton/backends/nvidia/compiler.py +3 -1
  4. triton/compiler/compiler.py +4 -4
  5. triton/runtime/build.py +29 -10
  6. triton/runtime/tcc/include/_mingw.h +170 -0
  7. triton/runtime/tcc/include/assert.h +57 -0
  8. triton/runtime/tcc/include/conio.h +409 -0
  9. triton/runtime/tcc/include/ctype.h +281 -0
  10. triton/runtime/tcc/include/dir.h +31 -0
  11. triton/runtime/tcc/include/direct.h +68 -0
  12. triton/runtime/tcc/include/dirent.h +135 -0
  13. triton/runtime/tcc/include/dos.h +55 -0
  14. triton/runtime/tcc/include/errno.h +75 -0
  15. triton/runtime/tcc/include/excpt.h +123 -0
  16. triton/runtime/tcc/include/fcntl.h +52 -0
  17. triton/runtime/tcc/include/fenv.h +108 -0
  18. triton/runtime/tcc/include/float.h +57 -0
  19. triton/runtime/tcc/include/inttypes.h +297 -0
  20. triton/runtime/tcc/include/io.h +418 -0
  21. triton/runtime/tcc/include/limits.h +111 -0
  22. triton/runtime/tcc/include/locale.h +91 -0
  23. triton/runtime/tcc/include/malloc.h +181 -0
  24. triton/runtime/tcc/include/math.h +737 -0
  25. triton/runtime/tcc/include/mem.h +13 -0
  26. triton/runtime/tcc/include/memory.h +40 -0
  27. triton/runtime/tcc/include/process.h +176 -0
  28. triton/runtime/tcc/include/sec_api/conio_s.h +42 -0
  29. triton/runtime/tcc/include/sec_api/crtdbg_s.h +19 -0
  30. triton/runtime/tcc/include/sec_api/io_s.h +33 -0
  31. triton/runtime/tcc/include/sec_api/mbstring_s.h +52 -0
  32. triton/runtime/tcc/include/sec_api/search_s.h +25 -0
  33. triton/runtime/tcc/include/sec_api/stdio_s.h +145 -0
  34. triton/runtime/tcc/include/sec_api/stdlib_s.h +67 -0
  35. triton/runtime/tcc/include/sec_api/stralign_s.h +30 -0
  36. triton/runtime/tcc/include/sec_api/string_s.h +41 -0
  37. triton/runtime/tcc/include/sec_api/sys/timeb_s.h +34 -0
  38. triton/runtime/tcc/include/sec_api/tchar_s.h +266 -0
  39. triton/runtime/tcc/include/sec_api/time_s.h +61 -0
  40. triton/runtime/tcc/include/sec_api/wchar_s.h +128 -0
  41. triton/runtime/tcc/include/setjmp.h +160 -0
  42. triton/runtime/tcc/include/share.h +28 -0
  43. triton/runtime/tcc/include/signal.h +63 -0
  44. triton/runtime/tcc/include/stdarg.h +79 -0
  45. triton/runtime/tcc/include/stdbool.h +11 -0
  46. triton/runtime/tcc/include/stddef.h +54 -0
  47. triton/runtime/tcc/include/stdint.h +212 -0
  48. triton/runtime/tcc/include/stdio.h +429 -0
  49. triton/runtime/tcc/include/stdlib.h +580 -0
  50. triton/runtime/tcc/include/string.h +164 -0
  51. triton/runtime/tcc/include/sys/fcntl.h +13 -0
  52. triton/runtime/tcc/include/sys/file.h +14 -0
  53. triton/runtime/tcc/include/sys/locking.h +30 -0
  54. triton/runtime/tcc/include/sys/stat.h +290 -0
  55. triton/runtime/tcc/include/sys/time.h +69 -0
  56. triton/runtime/tcc/include/sys/timeb.h +133 -0
  57. triton/runtime/tcc/include/sys/types.h +118 -0
  58. triton/runtime/tcc/include/sys/unistd.h +14 -0
  59. triton/runtime/tcc/include/sys/utime.h +146 -0
  60. triton/runtime/tcc/include/tcc/tcc_libm.h +201 -0
  61. triton/runtime/tcc/include/tcclib.h +80 -0
  62. triton/runtime/tcc/include/tchar.h +1102 -0
  63. triton/runtime/tcc/include/time.h +287 -0
  64. triton/runtime/tcc/include/vadefs.h +11 -0
  65. triton/runtime/tcc/include/values.h +4 -0
  66. triton/runtime/tcc/include/varargs.h +12 -0
  67. triton/runtime/tcc/include/wchar.h +873 -0
  68. triton/runtime/tcc/include/wctype.h +172 -0
  69. triton/runtime/tcc/include/winapi/basetsd.h +149 -0
  70. triton/runtime/tcc/include/winapi/basetyps.h +85 -0
  71. triton/runtime/tcc/include/winapi/guiddef.h +156 -0
  72. triton/runtime/tcc/include/winapi/poppack.h +8 -0
  73. triton/runtime/tcc/include/winapi/pshpack1.h +8 -0
  74. triton/runtime/tcc/include/winapi/pshpack2.h +8 -0
  75. triton/runtime/tcc/include/winapi/pshpack4.h +8 -0
  76. triton/runtime/tcc/include/winapi/pshpack8.h +8 -0
  77. triton/runtime/tcc/include/winapi/winbase.h +2951 -0
  78. triton/runtime/tcc/include/winapi/wincon.h +301 -0
  79. triton/runtime/tcc/include/winapi/windef.h +293 -0
  80. triton/runtime/tcc/include/winapi/windows.h +127 -0
  81. triton/runtime/tcc/include/winapi/winerror.h +3166 -0
  82. triton/runtime/tcc/include/winapi/wingdi.h +4080 -0
  83. triton/runtime/tcc/include/winapi/winnt.h +5835 -0
  84. triton/runtime/tcc/include/winapi/winreg.h +272 -0
  85. triton/runtime/tcc/include/winapi/winuser.h +5651 -0
  86. triton/runtime/tcc/include/winapi/winver.h +160 -0
  87. triton/runtime/tcc/lib/cuda.def +697 -0
  88. triton/runtime/tcc/lib/gdi32.def +337 -0
  89. triton/runtime/tcc/lib/kernel32.def +770 -0
  90. triton/runtime/tcc/lib/libtcc1-64.a +0 -0
  91. triton/runtime/tcc/lib/msvcrt.def +1399 -0
  92. triton/runtime/tcc/lib/python3.def +810 -0
  93. triton/runtime/tcc/lib/user32.def +658 -0
  94. triton/runtime/tcc/libtcc.dll +0 -0
  95. triton/runtime/tcc/tcc.exe +0 -0
  96. {triton_windows-3.3.0a0.post12.dist-info → triton_windows-3.3.0a0.post13.dist-info}/METADATA +1 -1
  97. {triton_windows-3.3.0a0.post12.dist-info → triton_windows-3.3.0a0.post13.dist-info}/RECORD +99 -9
  98. {triton_windows-3.3.0a0.post12.dist-info → triton_windows-3.3.0a0.post13.dist-info}/WHEEL +0 -0
  99. {triton_windows-3.3.0a0.post12.dist-info → triton_windows-3.3.0a0.post13.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,28 @@
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_SHARE
7
+ #define _INC_SHARE
8
+
9
+ #ifndef _WIN32
10
+ #error Only Win32 target is supported!
11
+ #endif
12
+
13
+ #define _SH_COMPAT 0x00
14
+ #define _SH_DENYRW 0x10
15
+ #define _SH_DENYWR 0x20
16
+ #define _SH_DENYRD 0x30
17
+ #define _SH_DENYNO 0x40
18
+ #define _SH_SECURE 0x80
19
+
20
+ #ifndef NO_OLDNAMES
21
+ #define SH_COMPAT _SH_COMPAT
22
+ #define SH_DENYRW _SH_DENYRW
23
+ #define SH_DENYWR _SH_DENYWR
24
+ #define SH_DENYRD _SH_DENYRD
25
+ #define SH_DENYNO _SH_DENYNO
26
+ #endif
27
+
28
+ #endif
@@ -0,0 +1,63 @@
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_SIGNAL
7
+ #define _INC_SIGNAL
8
+
9
+ #include <_mingw.h>
10
+
11
+ #ifdef __cplusplus
12
+ extern "C" {
13
+ #endif
14
+
15
+ #ifndef _SIG_ATOMIC_T_DEFINED
16
+ #define _SIG_ATOMIC_T_DEFINED
17
+ typedef int sig_atomic_t;
18
+ #endif
19
+
20
+ #define NSIG 23
21
+
22
+ #define SIGHUP 1 /* hangup */
23
+ #define SIGINT 2
24
+ #define SIGQUIT 3 /* quit */
25
+ #define SIGILL 4
26
+ #define SIGTRAP 5 /* trace trap (not reset when caught) */
27
+ #define SIGIOT 6 /* IOT instruction */
28
+ #define SIGABRT 6 /* used by abort, replace SIGIOT in the future */
29
+ #define SIGEMT 7 /* EMT instruction */
30
+ #define SIGFPE 8
31
+ #define SIGKILL 9 /* kill (cannot be caught or ignored) */
32
+ #define SIGBUS 10 /* bus error */
33
+ #define SIGSEGV 11
34
+ #define SIGSYS 12 /* bad argument to system call */
35
+ #define SIGPIPE 13 /* write on a pipe with no one to read it */
36
+ #ifdef __USE_MINGW_ALARM
37
+ #define SIGALRM 14 /* alarm clock */
38
+ #endif
39
+ #define SIGTERM 15
40
+ #define SIGBREAK 21
41
+ #define SIGABRT2 22
42
+
43
+ #define SIGABRT_COMPAT 6
44
+
45
+ typedef void (*__p_sig_fn_t)(int);
46
+
47
+ #define SIG_DFL (__p_sig_fn_t)0
48
+ #define SIG_IGN (__p_sig_fn_t)1
49
+ #define SIG_GET (__p_sig_fn_t)2
50
+ #define SIG_SGE (__p_sig_fn_t)3
51
+ #define SIG_ACK (__p_sig_fn_t)4
52
+ #define SIG_ERR (__p_sig_fn_t)-1
53
+
54
+ extern void **__cdecl __pxcptinfoptrs(void);
55
+ #define _pxcptinfoptrs (*__pxcptinfoptrs())
56
+
57
+ __p_sig_fn_t __cdecl signal(int _SigNum,__p_sig_fn_t _Func);
58
+ int __cdecl raise(int _SigNum);
59
+
60
+ #ifdef __cplusplus
61
+ }
62
+ #endif
63
+ #endif
@@ -0,0 +1,79 @@
1
+ #ifndef _STDARG_H
2
+ #define _STDARG_H
3
+
4
+ #ifdef __x86_64__
5
+ #ifndef _WIN64
6
+
7
+ //This should be in sync with the declaration on our lib/libtcc1.c
8
+ /* GCC compatible definition of va_list. */
9
+ typedef struct {
10
+ unsigned int gp_offset;
11
+ unsigned int fp_offset;
12
+ union {
13
+ unsigned int overflow_offset;
14
+ char *overflow_arg_area;
15
+ };
16
+ char *reg_save_area;
17
+ } __va_list_struct;
18
+
19
+ typedef __va_list_struct va_list[1];
20
+
21
+ void __va_start(__va_list_struct *ap, void *fp);
22
+ void *__va_arg(__va_list_struct *ap, int arg_type, int size, int align);
23
+
24
+ #define va_start(ap, last) __va_start(ap, __builtin_frame_address(0))
25
+ #define va_arg(ap, type) \
26
+ (*(type *)(__va_arg(ap, __builtin_va_arg_types(type), sizeof(type), __alignof__(type))))
27
+ #define va_copy(dest, src) (*(dest) = *(src))
28
+ #define va_end(ap)
29
+
30
+ /* avoid conflicting definition for va_list on Macs. */
31
+ #define _VA_LIST_T
32
+
33
+ #else /* _WIN64 */
34
+ typedef char *va_list;
35
+ #define va_start(ap,last) __builtin_va_start(ap,last)
36
+ #define va_arg(ap, t) ((sizeof(t) > 8 || (sizeof(t) & (sizeof(t) - 1))) \
37
+ ? **(t **)((ap += 8) - 8) : *(t *)((ap += 8) - 8))
38
+ #define va_copy(dest, src) ((dest) = (src))
39
+ #define va_end(ap)
40
+ #endif
41
+
42
+ #elif __arm__
43
+ typedef char *va_list;
44
+ #define _tcc_alignof(type) ((int)&((struct {char c;type x;} *)0)->x)
45
+ #define _tcc_align(addr,type) (((unsigned)addr + _tcc_alignof(type) - 1) \
46
+ & ~(_tcc_alignof(type) - 1))
47
+ #define va_start(ap,last) ap = ((char *)&(last)) + ((sizeof(last)+3)&~3)
48
+ #define va_arg(ap,type) (ap = (void *) ((_tcc_align(ap,type)+sizeof(type)+3) \
49
+ &~3), *(type *)(ap - ((sizeof(type)+3)&~3)))
50
+ #define va_copy(dest, src) (dest) = (src)
51
+ #define va_end(ap)
52
+
53
+ #elif defined(__aarch64__)
54
+ typedef struct {
55
+ void *__stack;
56
+ void *__gr_top;
57
+ void *__vr_top;
58
+ int __gr_offs;
59
+ int __vr_offs;
60
+ } va_list;
61
+ #define va_start(ap, last) __va_start(ap, last)
62
+ #define va_arg(ap, type) __va_arg(ap, type)
63
+ #define va_end(ap)
64
+ #define va_copy(dest, src) ((dest) = (src))
65
+
66
+ #else /* __i386__ */
67
+ typedef char *va_list;
68
+ /* only correct for i386 */
69
+ #define va_start(ap,last) ap = ((char *)&(last)) + ((sizeof(last)+3)&~3)
70
+ #define va_arg(ap,type) (ap += (sizeof(type)+3)&~3, *(type *)(ap - ((sizeof(type)+3)&~3)))
71
+ #define va_copy(dest, src) (dest) = (src)
72
+ #define va_end(ap)
73
+ #endif
74
+
75
+ /* fix a buggy dependency on GCC in libio.h */
76
+ typedef va_list __gnuc_va_list;
77
+ #define _VA_LIST_DEFINED
78
+
79
+ #endif /* _STDARG_H */
@@ -0,0 +1,11 @@
1
+ #ifndef _STDBOOL_H
2
+ #define _STDBOOL_H
3
+
4
+ /* ISOC99 boolean */
5
+
6
+ #define bool _Bool
7
+ #define true 1
8
+ #define false 0
9
+ #define __bool_true_false_are_defined 1
10
+
11
+ #endif /* _STDBOOL_H */
@@ -0,0 +1,54 @@
1
+ #ifndef _STDDEF_H
2
+ #define _STDDEF_H
3
+
4
+ typedef __SIZE_TYPE__ size_t;
5
+ typedef __PTRDIFF_TYPE__ ssize_t;
6
+ typedef __WCHAR_TYPE__ wchar_t;
7
+ typedef __PTRDIFF_TYPE__ ptrdiff_t;
8
+ typedef __PTRDIFF_TYPE__ intptr_t;
9
+ typedef __SIZE_TYPE__ uintptr_t;
10
+
11
+ #ifndef __int8_t_defined
12
+ #define __int8_t_defined
13
+ typedef signed char int8_t;
14
+ typedef signed short int int16_t;
15
+ typedef signed int int32_t;
16
+ #ifdef __LP64__
17
+ typedef signed long int int64_t;
18
+ #else
19
+ typedef signed long long int int64_t;
20
+ #endif
21
+ typedef unsigned char uint8_t;
22
+ typedef unsigned short int uint16_t;
23
+ typedef unsigned int uint32_t;
24
+ #ifdef __LP64__
25
+ typedef unsigned long int uint64_t;
26
+ #else
27
+ typedef unsigned long long int uint64_t;
28
+ #endif
29
+ #endif
30
+
31
+ #ifndef NULL
32
+ #define NULL ((void*)0)
33
+ #endif
34
+
35
+ #define offsetof(type, field) ((size_t)&((type *)0)->field)
36
+
37
+ void *alloca(size_t size);
38
+
39
+ #endif
40
+
41
+ /* Older glibc require a wint_t from <stddef.h> (when requested
42
+ by __need_wint_t, as otherwise stddef.h isn't allowed to
43
+ define this type). Note that this must be outside the normal
44
+ _STDDEF_H guard, so that it works even when we've included the file
45
+ already (without requiring wint_t). Some other libs define _WINT_T
46
+ if they've already provided that type, so we can use that as guard.
47
+ TCC defines __WINT_TYPE__ for us. */
48
+ #if defined (__need_wint_t)
49
+ #ifndef _WINT_T
50
+ #define _WINT_T
51
+ typedef __WINT_TYPE__ wint_t;
52
+ #endif
53
+ #undef __need_wint_t
54
+ #endif
@@ -0,0 +1,212 @@
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
+ /* ISO C9x 7.18 Integer types <stdint.h>
7
+ * Based on ISO/IEC SC22/WG14 9899 Committee draft (SC22 N2794)
8
+ *
9
+ * THIS SOFTWARE IS NOT COPYRIGHTED
10
+ *
11
+ * Contributor: Danny Smith <danny_r_smith_2001@yahoo.co.nz>
12
+ *
13
+ * This source code is offered for use in the public domain. You may
14
+ * use, modify or distribute it freely.
15
+ *
16
+ * This code is distributed in the hope that it will be useful but
17
+ * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18
+ * DISCLAIMED. This includes but is not limited to warranties of
19
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20
+ *
21
+ * Date: 2000-12-02
22
+ */
23
+
24
+
25
+ #ifndef _STDINT_H
26
+ #define _STDINT_H
27
+
28
+ #include <_mingw.h>
29
+
30
+ #define __need_wint_t
31
+ #define __need_wchar_t
32
+ #include "stddef.h"
33
+
34
+ #ifndef __int8_t_defined
35
+ #define __int8_t_defined
36
+ /* 7.18.1.1 Exact-width integer types */
37
+ typedef signed char int8_t;
38
+ typedef unsigned char uint8_t;
39
+ typedef short int16_t;
40
+ typedef unsigned short uint16_t;
41
+ typedef int int32_t;
42
+ typedef unsigned uint32_t;
43
+ typedef long long int64_t;
44
+ typedef unsigned long long uint64_t;
45
+ #endif
46
+
47
+ /* 7.18.1.2 Minimum-width integer types */
48
+ typedef signed char int_least8_t;
49
+ typedef unsigned char uint_least8_t;
50
+ typedef short int_least16_t;
51
+ typedef unsigned short uint_least16_t;
52
+ typedef int int_least32_t;
53
+ typedef unsigned uint_least32_t;
54
+ typedef long long int_least64_t;
55
+ typedef unsigned long long uint_least64_t;
56
+
57
+ /* 7.18.1.3 Fastest minimum-width integer types
58
+ * Not actually guaranteed to be fastest for all purposes
59
+ * Here we use the exact-width types for 8 and 16-bit ints.
60
+ */
61
+ typedef char int_fast8_t;
62
+ typedef unsigned char uint_fast8_t;
63
+ typedef short int_fast16_t;
64
+ typedef unsigned short uint_fast16_t;
65
+ typedef int int_fast32_t;
66
+ typedef unsigned int uint_fast32_t;
67
+ typedef long long int_fast64_t;
68
+ typedef unsigned long long uint_fast64_t;
69
+
70
+ /* 7.18.1.5 Greatest-width integer types */
71
+ typedef long long intmax_t;
72
+ typedef unsigned long long uintmax_t;
73
+
74
+ /* 7.18.2 Limits of specified-width integer types */
75
+ #if !defined ( __cplusplus) || defined (__STDC_LIMIT_MACROS)
76
+
77
+ /* 7.18.2.1 Limits of exact-width integer types */
78
+ #define INT8_MIN (-128)
79
+ #define INT16_MIN (-32768)
80
+ #define INT32_MIN (-2147483647 - 1)
81
+ #define INT64_MIN (-9223372036854775807LL - 1)
82
+
83
+ #define INT8_MAX 127
84
+ #define INT16_MAX 32767
85
+ #define INT32_MAX 2147483647
86
+ #define INT64_MAX 9223372036854775807LL
87
+
88
+ #define UINT8_MAX 0xff /* 255U */
89
+ #define UINT16_MAX 0xffff /* 65535U */
90
+ #define UINT32_MAX 0xffffffff /* 4294967295U */
91
+ #define UINT64_MAX 0xffffffffffffffffULL /* 18446744073709551615ULL */
92
+
93
+ /* 7.18.2.2 Limits of minimum-width integer types */
94
+ #define INT_LEAST8_MIN INT8_MIN
95
+ #define INT_LEAST16_MIN INT16_MIN
96
+ #define INT_LEAST32_MIN INT32_MIN
97
+ #define INT_LEAST64_MIN INT64_MIN
98
+
99
+ #define INT_LEAST8_MAX INT8_MAX
100
+ #define INT_LEAST16_MAX INT16_MAX
101
+ #define INT_LEAST32_MAX INT32_MAX
102
+ #define INT_LEAST64_MAX INT64_MAX
103
+
104
+ #define UINT_LEAST8_MAX UINT8_MAX
105
+ #define UINT_LEAST16_MAX UINT16_MAX
106
+ #define UINT_LEAST32_MAX UINT32_MAX
107
+ #define UINT_LEAST64_MAX UINT64_MAX
108
+
109
+ /* 7.18.2.3 Limits of fastest minimum-width integer types */
110
+ #define INT_FAST8_MIN INT8_MIN
111
+ #define INT_FAST16_MIN INT16_MIN
112
+ #define INT_FAST32_MIN INT32_MIN
113
+ #define INT_FAST64_MIN INT64_MIN
114
+
115
+ #define INT_FAST8_MAX INT8_MAX
116
+ #define INT_FAST16_MAX INT16_MAX
117
+ #define INT_FAST32_MAX INT32_MAX
118
+ #define INT_FAST64_MAX INT64_MAX
119
+
120
+ #define UINT_FAST8_MAX UINT8_MAX
121
+ #define UINT_FAST16_MAX UINT16_MAX
122
+ #define UINT_FAST32_MAX UINT32_MAX
123
+ #define UINT_FAST64_MAX UINT64_MAX
124
+
125
+ /* 7.18.2.4 Limits of integer types capable of holding
126
+ object pointers */
127
+ #ifdef _WIN64
128
+ #define INTPTR_MIN INT64_MIN
129
+ #define INTPTR_MAX INT64_MAX
130
+ #define UINTPTR_MAX UINT64_MAX
131
+ #else
132
+ #define INTPTR_MIN INT32_MIN
133
+ #define INTPTR_MAX INT32_MAX
134
+ #define UINTPTR_MAX UINT32_MAX
135
+ #endif
136
+
137
+ /* 7.18.2.5 Limits of greatest-width integer types */
138
+ #define INTMAX_MIN INT64_MIN
139
+ #define INTMAX_MAX INT64_MAX
140
+ #define UINTMAX_MAX UINT64_MAX
141
+
142
+ /* 7.18.3 Limits of other integer types */
143
+ #ifdef _WIN64
144
+ #define PTRDIFF_MIN INT64_MIN
145
+ #define PTRDIFF_MAX INT64_MAX
146
+ #else
147
+ #define PTRDIFF_MIN INT32_MIN
148
+ #define PTRDIFF_MAX INT32_MAX
149
+ #endif
150
+
151
+ #define SIG_ATOMIC_MIN INT32_MIN
152
+ #define SIG_ATOMIC_MAX INT32_MAX
153
+
154
+ #ifndef SIZE_MAX
155
+ #ifdef _WIN64
156
+ #define SIZE_MAX UINT64_MAX
157
+ #else
158
+ #define SIZE_MAX UINT32_MAX
159
+ #endif
160
+ #endif
161
+
162
+ #ifndef WCHAR_MIN /* also in wchar.h */
163
+ #define WCHAR_MIN 0
164
+ #define WCHAR_MAX ((wchar_t)-1) /* UINT16_MAX */
165
+ #endif
166
+
167
+ /*
168
+ * wint_t is unsigned short for compatibility with MS runtime
169
+ */
170
+ #define WINT_MIN 0
171
+ #define WINT_MAX ((wint_t)-1) /* UINT16_MAX */
172
+
173
+ #endif /* !defined ( __cplusplus) || defined __STDC_LIMIT_MACROS */
174
+
175
+
176
+ /* 7.18.4 Macros for integer constants */
177
+ #if !defined ( __cplusplus) || defined (__STDC_CONSTANT_MACROS)
178
+
179
+ /* 7.18.4.1 Macros for minimum-width integer constants
180
+
181
+ According to Douglas Gwyn <gwyn@arl.mil>:
182
+ "This spec was changed in ISO/IEC 9899:1999 TC1; in ISO/IEC
183
+ 9899:1999 as initially published, the expansion was required
184
+ to be an integer constant of precisely matching type, which
185
+ is impossible to accomplish for the shorter types on most
186
+ platforms, because C99 provides no standard way to designate
187
+ an integer constant with width less than that of type int.
188
+ TC1 changed this to require just an integer constant
189
+ *expression* with *promoted* type."
190
+
191
+ The trick used here is from Clive D W Feather.
192
+ */
193
+
194
+ #define INT8_C(val) (INT_LEAST8_MAX-INT_LEAST8_MAX+(val))
195
+ #define INT16_C(val) (INT_LEAST16_MAX-INT_LEAST16_MAX+(val))
196
+ #define INT32_C(val) (INT_LEAST32_MAX-INT_LEAST32_MAX+(val))
197
+ /* The 'trick' doesn't work in C89 for long long because, without
198
+ suffix, (val) will be evaluated as int, not intmax_t */
199
+ #define INT64_C(val) val##LL
200
+
201
+ #define UINT8_C(val) (UINT_LEAST8_MAX-UINT_LEAST8_MAX+(val))
202
+ #define UINT16_C(val) (UINT_LEAST16_MAX-UINT_LEAST16_MAX+(val))
203
+ #define UINT32_C(val) (UINT_LEAST32_MAX-UINT_LEAST32_MAX+(val))
204
+ #define UINT64_C(val) val##ULL
205
+
206
+ /* 7.18.4.2 Macros for greatest-width integer constants */
207
+ #define INTMAX_C(val) val##LL
208
+ #define UINTMAX_C(val) val##ULL
209
+
210
+ #endif /* !defined ( __cplusplus) || defined __STDC_CONSTANT_MACROS */
211
+
212
+ #endif