@xnetx/tinyc-native-x86_64-w64-mingw32 0.1.2 → 0.2.0

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 (125) hide show
  1. package/natives/x86_64-w64-mingw32/toolchain/x86_64-w64-mingw32/tinyc.exe +0 -0
  2. package/package.json +1 -1
  3. package/sysroot/x86_64-w64-mingw32/include/libtcc.h +125 -116
  4. package/sysroot/x86_64-w64-mingw32/include/tinyc_io.h +131 -123
  5. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/_mingw.h +171 -171
  6. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/arm_neon.h +3585 -0
  7. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/assert.h +62 -62
  8. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/avx2intrin.h +93 -0
  9. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/avx512bwintrin.h +128 -0
  10. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/avx512cdintrin.h +31 -0
  11. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/avx512dqintrin.h +123 -0
  12. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/avx512fintrin.h +1075 -0
  13. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/avx512vbmiintrin.h +30 -0
  14. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/avx512vlintrin.h +1633 -0
  15. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/avx512vnniintrin.h +33 -0
  16. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/avxintrin.h +675 -0
  17. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/conio.h +409 -409
  18. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/ctype.h +281 -281
  19. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/dir.h +31 -31
  20. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/direct.h +68 -68
  21. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/dirent.h +135 -135
  22. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/dos.h +55 -55
  23. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/emmintrin.h +213 -0
  24. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/errno.h +75 -75
  25. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/excpt.h +123 -123
  26. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/f16cintrin.h +29 -0
  27. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/fcntl.h +52 -52
  28. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/fenv.h +108 -108
  29. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/float.h +75 -75
  30. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/fmaintrin.h +141 -0
  31. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/immintrin.h +21 -0
  32. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/inttypes.h +297 -297
  33. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/io.h +418 -418
  34. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/iso646.h +36 -36
  35. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/limits.h +116 -116
  36. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/locale.h +91 -91
  37. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/malloc.h +181 -181
  38. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/math.h +497 -497
  39. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/mem.h +13 -13
  40. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/memory.h +40 -40
  41. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/process.h +176 -176
  42. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/riscv_vector.h +12334 -0
  43. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sec_api/conio_s.h +42 -42
  44. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sec_api/crtdbg_s.h +19 -19
  45. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sec_api/io_s.h +33 -33
  46. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sec_api/mbstring_s.h +52 -52
  47. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sec_api/search_s.h +25 -25
  48. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sec_api/stdio_s.h +145 -145
  49. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sec_api/stdlib_s.h +67 -67
  50. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sec_api/stralign_s.h +30 -30
  51. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sec_api/string_s.h +41 -41
  52. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sec_api/sys/timeb_s.h +34 -34
  53. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sec_api/tchar_s.h +266 -266
  54. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sec_api/time_s.h +61 -61
  55. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sec_api/wchar_s.h +128 -128
  56. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/setjmp.h +199 -199
  57. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/share.h +28 -28
  58. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/signal.h +63 -63
  59. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/smmintrin.h +74 -0
  60. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/stdalign.h +16 -16
  61. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/stdarg.h +14 -14
  62. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/stdatomic.h +171 -171
  63. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/stdbool.h +11 -11
  64. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/stddef.h +39 -39
  65. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/stdint.h +212 -212
  66. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/stdio.h +429 -429
  67. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/stdlib.h +606 -606
  68. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/stdnoreturn.h +7 -7
  69. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/string.h +164 -164
  70. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sys/fcntl.h +13 -13
  71. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sys/file.h +14 -14
  72. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sys/locking.h +30 -30
  73. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sys/stat.h +290 -290
  74. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sys/time.h +69 -69
  75. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sys/timeb.h +133 -133
  76. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sys/types.h +123 -123
  77. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sys/unistd.h +14 -14
  78. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sys/utime.h +146 -146
  79. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/tcc/tcc_libm.h +618 -618
  80. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/tccdefs.h +338 -338
  81. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/tcclib.h +82 -82
  82. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/tchar.h +1102 -1102
  83. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/tgmath.h +89 -89
  84. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/time.h +287 -287
  85. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/tmmintrin.h +19 -0
  86. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/uchar.h +33 -33
  87. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/unistd.h +1 -1
  88. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/vadefs.h +11 -11
  89. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/values.h +4 -4
  90. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/varargs.h +12 -12
  91. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/wchar.h +873 -873
  92. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/wctype.h +172 -172
  93. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/basetsd.h +149 -149
  94. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/basetyps.h +85 -85
  95. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/guiddef.h +156 -156
  96. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/poppack.h +8 -8
  97. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/pshpack1.h +8 -8
  98. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/pshpack2.h +8 -8
  99. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/pshpack4.h +8 -8
  100. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/pshpack8.h +8 -8
  101. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/qos.h +72 -72
  102. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/shellapi.h +59 -59
  103. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/winbase.h +2966 -2966
  104. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/wincon.h +309 -309
  105. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/windef.h +293 -293
  106. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/windows.h +127 -127
  107. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/winerror.h +3166 -3166
  108. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/wingdi.h +4080 -4080
  109. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/winnls.h +778 -778
  110. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/winnt.h +5994 -5994
  111. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/winreg.h +272 -272
  112. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/winsock2.h +1474 -1474
  113. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/winuser.h +5652 -5652
  114. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/winver.h +160 -160
  115. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/ws2ipdef.h +21 -21
  116. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/ws2tcpip.h +391 -391
  117. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/xmmintrin.h +170 -0
  118. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/lib/gdi32.def +337 -337
  119. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/lib/kernel32.def +776 -776
  120. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/lib/libtcc1.a +0 -0
  121. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/lib/msvcrt.def +1320 -1320
  122. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/lib/runmain.o +0 -0
  123. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/lib/user32.def +658 -658
  124. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/lib/ws2_32.def +198 -198
  125. package/sysroot/x86_64-w64-mingw32/manifest.json +1 -1
@@ -1,212 +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
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