@xnetx/tinyc-native-x86_64-w64-mingw32 0.1.3 → 0.3.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 (124) 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/tinyc_io.h +131 -131
  4. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/_mingw.h +171 -171
  5. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/arm_neon.h +3585 -0
  6. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/assert.h +62 -62
  7. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/avx2intrin.h +93 -0
  8. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/avx512bwintrin.h +128 -0
  9. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/avx512cdintrin.h +31 -0
  10. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/avx512dqintrin.h +123 -0
  11. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/avx512fintrin.h +1075 -0
  12. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/avx512vbmiintrin.h +30 -0
  13. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/avx512vlintrin.h +1633 -0
  14. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/avx512vnniintrin.h +33 -0
  15. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/avxintrin.h +675 -0
  16. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/conio.h +409 -409
  17. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/ctype.h +281 -281
  18. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/dir.h +31 -31
  19. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/direct.h +68 -68
  20. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/dirent.h +135 -135
  21. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/dos.h +55 -55
  22. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/emmintrin.h +213 -0
  23. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/errno.h +75 -75
  24. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/excpt.h +123 -123
  25. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/f16cintrin.h +29 -0
  26. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/fcntl.h +52 -52
  27. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/fenv.h +108 -108
  28. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/float.h +75 -75
  29. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/fmaintrin.h +141 -0
  30. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/immintrin.h +21 -0
  31. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/inttypes.h +297 -297
  32. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/io.h +418 -418
  33. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/iso646.h +36 -36
  34. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/limits.h +116 -116
  35. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/locale.h +91 -91
  36. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/malloc.h +181 -181
  37. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/math.h +497 -497
  38. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/mem.h +13 -13
  39. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/memory.h +40 -40
  40. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/process.h +176 -176
  41. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/riscv_vector.h +12334 -0
  42. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sec_api/conio_s.h +42 -42
  43. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sec_api/crtdbg_s.h +19 -19
  44. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sec_api/io_s.h +33 -33
  45. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sec_api/mbstring_s.h +52 -52
  46. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sec_api/search_s.h +25 -25
  47. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sec_api/stdio_s.h +145 -145
  48. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sec_api/stdlib_s.h +67 -67
  49. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sec_api/stralign_s.h +30 -30
  50. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sec_api/string_s.h +41 -41
  51. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sec_api/sys/timeb_s.h +34 -34
  52. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sec_api/tchar_s.h +266 -266
  53. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sec_api/time_s.h +61 -61
  54. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sec_api/wchar_s.h +128 -128
  55. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/setjmp.h +199 -199
  56. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/share.h +28 -28
  57. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/signal.h +63 -63
  58. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/smmintrin.h +74 -0
  59. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/stdalign.h +16 -16
  60. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/stdarg.h +14 -14
  61. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/stdatomic.h +171 -171
  62. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/stdbool.h +11 -11
  63. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/stddef.h +39 -39
  64. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/stdint.h +212 -212
  65. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/stdio.h +429 -429
  66. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/stdlib.h +606 -606
  67. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/stdnoreturn.h +7 -7
  68. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/string.h +164 -164
  69. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sys/fcntl.h +13 -13
  70. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sys/file.h +14 -14
  71. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sys/locking.h +30 -30
  72. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sys/stat.h +290 -290
  73. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sys/time.h +69 -69
  74. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sys/timeb.h +133 -133
  75. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sys/types.h +123 -123
  76. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sys/unistd.h +14 -14
  77. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sys/utime.h +146 -146
  78. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/tcc/tcc_libm.h +618 -618
  79. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/tccdefs.h +338 -338
  80. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/tcclib.h +82 -82
  81. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/tchar.h +1102 -1102
  82. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/tgmath.h +89 -89
  83. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/time.h +287 -287
  84. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/tmmintrin.h +19 -0
  85. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/uchar.h +33 -33
  86. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/unistd.h +1 -1
  87. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/vadefs.h +11 -11
  88. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/values.h +4 -4
  89. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/varargs.h +12 -12
  90. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/wchar.h +873 -873
  91. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/wctype.h +172 -172
  92. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/basetsd.h +149 -149
  93. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/basetyps.h +85 -85
  94. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/guiddef.h +156 -156
  95. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/poppack.h +8 -8
  96. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/pshpack1.h +8 -8
  97. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/pshpack2.h +8 -8
  98. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/pshpack4.h +8 -8
  99. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/pshpack8.h +8 -8
  100. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/qos.h +72 -72
  101. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/shellapi.h +59 -59
  102. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/winbase.h +2966 -2966
  103. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/wincon.h +309 -309
  104. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/windef.h +293 -293
  105. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/windows.h +127 -127
  106. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/winerror.h +3166 -3166
  107. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/wingdi.h +4080 -4080
  108. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/winnls.h +778 -778
  109. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/winnt.h +5994 -5994
  110. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/winreg.h +272 -272
  111. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/winsock2.h +1474 -1474
  112. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/winuser.h +5652 -5652
  113. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/winver.h +160 -160
  114. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/ws2ipdef.h +21 -21
  115. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/ws2tcpip.h +391 -391
  116. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/xmmintrin.h +170 -0
  117. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/lib/gdi32.def +337 -337
  118. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/lib/kernel32.def +776 -776
  119. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/lib/libtcc1.a +0 -0
  120. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/lib/msvcrt.def +1320 -1320
  121. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/lib/runmain.o +0 -0
  122. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/lib/user32.def +658 -658
  123. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/lib/ws2_32.def +198 -198
  124. package/sysroot/x86_64-w64-mingw32/manifest.json +1 -1
@@ -1,290 +1,290 @@
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_STAT
7
- #define _INC_STAT
8
-
9
- #ifndef _WIN32
10
- #error Only Win32 target is supported!
11
- #endif
12
-
13
- #include <_mingw.h>
14
- #include <io.h>
15
-
16
- #pragma pack(push,_CRT_PACKING)
17
-
18
- #ifdef __cplusplus
19
- extern "C" {
20
- #endif
21
-
22
- #ifndef _CRTIMP
23
- #define _CRTIMP __declspec(dllimport)
24
- #endif
25
-
26
- #include <sys/types.h>
27
-
28
- #ifndef __TINYC__ /* gr */
29
- #ifdef _USE_32BIT_TIME_T
30
- #ifdef _WIN64
31
- #undef _USE_32BIT_TIME_T
32
- #endif
33
- #else
34
- #if _INTEGRAL_MAX_BITS < 64
35
- #define _USE_32BIT_TIME_T
36
- #endif
37
- #endif
38
- #endif
39
-
40
- #ifndef _TIME32_T_DEFINED
41
- typedef long __time32_t;
42
- #define _TIME32_T_DEFINED
43
- #endif
44
-
45
- #ifndef _TIME64_T_DEFINED
46
- #if _INTEGRAL_MAX_BITS >= 64
47
- typedef __int64 __time64_t;
48
- #endif
49
- #define _TIME64_T_DEFINED
50
- #endif
51
-
52
- #ifndef _TIME_T_DEFINED
53
- #ifdef _USE_32BIT_TIME_T
54
- typedef __time32_t time_t;
55
- #else
56
- typedef __time64_t time_t;
57
- #endif
58
- #define _TIME_T_DEFINED
59
- #endif
60
-
61
- #ifndef _WCHAR_T_DEFINED
62
- typedef unsigned short wchar_t;
63
- #define _WCHAR_T_DEFINED
64
- #endif
65
-
66
- #ifndef _STAT_DEFINED
67
-
68
- #ifdef _USE_32BIT_TIME_T
69
- #ifndef _WIN64
70
- #define _fstat32 _fstat
71
- #define _stat32 _stat
72
- #define _wstat32 _wstat
73
- #else
74
- #define _fstat _fstat32
75
- #define _stat _stat32
76
- #define _wstat _wstat32
77
- #endif
78
- #define _fstati64 _fstat32i64
79
- #define _stati64 _stat32i64
80
- #define _wstati64 _wstat32i64
81
- #else
82
- #define _fstat _fstat64i32
83
- #define _fstati64 _fstat64
84
- #define _stat _stat64
85
- #define _stati64 _stat64
86
- #define _wstat _wstat64
87
- #define _wstati64 _wstat64
88
- #endif
89
-
90
- struct _stat32 {
91
- _dev_t st_dev;
92
- _ino_t st_ino;
93
- unsigned short st_mode;
94
- short st_nlink;
95
- short st_uid;
96
- short st_gid;
97
- _dev_t st_rdev;
98
- _off_t st_size;
99
- __time32_t st_atime;
100
- __time32_t st_mtime;
101
- __time32_t st_ctime;
102
- };
103
-
104
- #ifndef NO_OLDNAMES
105
- struct stat {
106
- _dev_t st_dev;
107
- _ino_t st_ino;
108
- unsigned short st_mode;
109
- short st_nlink;
110
- short st_uid;
111
- short st_gid;
112
- _dev_t st_rdev;
113
- _off_t st_size;
114
- time_t st_atime;
115
- time_t st_mtime;
116
- time_t st_ctime;
117
- };
118
- #endif
119
-
120
- #if _INTEGRAL_MAX_BITS >= 64
121
- struct _stat32i64 {
122
- _dev_t st_dev;
123
- _ino_t st_ino;
124
- unsigned short st_mode;
125
- short st_nlink;
126
- short st_uid;
127
- short st_gid;
128
- _dev_t st_rdev;
129
- __int64 st_size;
130
- __time32_t st_atime;
131
- __time32_t st_mtime;
132
- __time32_t st_ctime;
133
- };
134
-
135
- struct _stat64i32 {
136
- _dev_t st_dev;
137
- _ino_t st_ino;
138
- unsigned short st_mode;
139
- short st_nlink;
140
- short st_uid;
141
- short st_gid;
142
- _dev_t st_rdev;
143
- _off_t st_size;
144
- __time64_t st_atime;
145
- __time64_t st_mtime;
146
- __time64_t st_ctime;
147
- };
148
-
149
- struct _stat64 {
150
- _dev_t st_dev;
151
- _ino_t st_ino;
152
- unsigned short st_mode;
153
- short st_nlink;
154
- short st_uid;
155
- short st_gid;
156
- _dev_t st_rdev;
157
- __int64 st_size;
158
- __time64_t st_atime;
159
- __time64_t st_mtime;
160
- __time64_t st_ctime;
161
- };
162
- #endif
163
-
164
- #define __stat64 _stat64
165
-
166
- #define _STAT_DEFINED
167
- #endif
168
-
169
- #define _S_IFMT 0xF000
170
- #define _S_IFDIR 0x4000
171
- #define _S_IFCHR 0x2000
172
- #define _S_IFIFO 0x1000
173
- #define _S_IFREG 0x8000
174
- #define _S_IREAD 0x0100
175
- #define _S_IWRITE 0x0080
176
- #define _S_IEXEC 0x0040
177
-
178
- _CRTIMP int __cdecl _fstat32(int _FileDes,struct _stat32 *_Stat);
179
- _CRTIMP int __cdecl _stat32(const char *_Name,struct _stat32 *_Stat);
180
- #if _INTEGRAL_MAX_BITS >= 64
181
- _CRTIMP int __cdecl _fstat64(int _FileDes,struct _stat64 *_Stat);
182
- _CRTIMP int __cdecl _fstat32i64(int _FileDes,struct _stat32i64 *_Stat);
183
- int __cdecl _fstat64i32(int _FileDes,struct _stat64i32 *_Stat);
184
- __CRT_INLINE int __cdecl _fstat64i32(int _FileDes,struct _stat64i32 *_Stat)
185
- {
186
- struct _stat64 st;
187
- int ret=_fstat64(_FileDes,&st);
188
- _Stat->st_dev=st.st_dev;
189
- _Stat->st_ino=st.st_ino;
190
- _Stat->st_mode=st.st_mode;
191
- _Stat->st_nlink=st.st_nlink;
192
- _Stat->st_uid=st.st_uid;
193
- _Stat->st_gid=st.st_gid;
194
- _Stat->st_rdev=st.st_rdev;
195
- _Stat->st_size=(_off_t) st.st_size;
196
- _Stat->st_atime=st.st_atime;
197
- _Stat->st_mtime=st.st_mtime;
198
- _Stat->st_ctime=st.st_ctime;
199
- return ret;
200
- }
201
- _CRTIMP int __cdecl _stat64(const char *_Name,struct _stat64 *_Stat);
202
- _CRTIMP int __cdecl _stat32i64(const char *_Name,struct _stat32i64 *_Stat);
203
- int __cdecl _stat64i32(const char *_Name,struct _stat64i32 *_Stat);
204
- __CRT_INLINE int __cdecl _stat64i32(const char *_Name,struct _stat64i32 *_Stat)
205
- {
206
- struct _stat64 st;
207
- int ret=_stat64(_Name,&st);
208
- _Stat->st_dev=st.st_dev;
209
- _Stat->st_ino=st.st_ino;
210
- _Stat->st_mode=st.st_mode;
211
- _Stat->st_nlink=st.st_nlink;
212
- _Stat->st_uid=st.st_uid;
213
- _Stat->st_gid=st.st_gid;
214
- _Stat->st_rdev=st.st_rdev;
215
- _Stat->st_size=(_off_t) st.st_size;
216
- _Stat->st_atime=st.st_atime;
217
- _Stat->st_mtime=st.st_mtime;
218
- _Stat->st_ctime=st.st_ctime;
219
- return ret;
220
- }
221
- #endif
222
-
223
- #ifndef _WSTAT_DEFINED
224
- #define _WSTAT_DEFINED
225
- _CRTIMP int __cdecl _wstat32(const wchar_t *_Name,struct _stat32 *_Stat);
226
- #if _INTEGRAL_MAX_BITS >= 64
227
- _CRTIMP int __cdecl _wstat32i64(const wchar_t *_Name,struct _stat32i64 *_Stat);
228
- int __cdecl _wstat64i32(const wchar_t *_Name,struct _stat64i32 *_Stat);
229
- _CRTIMP int __cdecl _wstat64(const wchar_t *_Name,struct _stat64 *_Stat);
230
- #endif
231
- #endif
232
-
233
- #ifndef NO_OLDNAMES
234
- #define _S_IFBLK 0x3000 /* Block: Is this ever set under w32? */
235
-
236
- #define S_IFMT _S_IFMT
237
- #define S_IFDIR _S_IFDIR
238
- #define S_IFCHR _S_IFCHR
239
- #define S_IFREG _S_IFREG
240
- #define S_IREAD _S_IREAD
241
- #define S_IWRITE _S_IWRITE
242
- #define S_IEXEC _S_IEXEC
243
- #define S_IFIFO _S_IFIFO
244
- #define S_IFBLK _S_IFBLK
245
-
246
- #define _S_IRWXU (_S_IREAD | _S_IWRITE | _S_IEXEC)
247
- #define _S_IXUSR _S_IEXEC
248
- #define _S_IWUSR _S_IWRITE
249
-
250
- #define S_IRWXU _S_IRWXU
251
- #define S_IXUSR _S_IXUSR
252
- #define S_IWUSR _S_IWUSR
253
- #define S_IRUSR _S_IRUSR
254
- #define _S_IRUSR _S_IREAD
255
-
256
- #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
257
- #define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
258
- #define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
259
- #define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
260
- #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
261
-
262
- #endif
263
-
264
- #if !defined (RC_INVOKED) && !defined (NO_OLDNAMES)
265
- int __cdecl stat(const char *_Filename,struct stat *_Stat);
266
- int __cdecl fstat(int _Desc,struct stat *_Stat);
267
- int __cdecl wstat(const wchar_t *_Filename,struct stat *_Stat);
268
- #ifdef _USE_32BIT_TIME_T
269
- __CRT_INLINE int __cdecl fstat(int _Desc,struct stat *_Stat) {
270
- return _fstat32(_Desc,(struct _stat32 *)_Stat);
271
- }
272
- __CRT_INLINE int __cdecl stat(const char *_Filename,struct stat *_Stat) {
273
- return _stat32(_Filename,(struct _stat32 *)_Stat);
274
- }
275
- #else
276
- __CRT_INLINE int __cdecl fstat(int _Desc,struct stat *_Stat) {
277
- return _fstat64i32(_Desc,(struct _stat64i32 *)_Stat);
278
- }
279
- __CRT_INLINE int __cdecl stat(const char *_Filename,struct stat *_Stat) {
280
- return _stat64i32(_Filename,(struct _stat64i32 *)_Stat);
281
- }
282
- #endif
283
- #endif
284
-
285
- #ifdef __cplusplus
286
- }
287
- #endif
288
-
289
- #pragma pack(pop)
290
- #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
+ #ifndef _INC_STAT
7
+ #define _INC_STAT
8
+
9
+ #ifndef _WIN32
10
+ #error Only Win32 target is supported!
11
+ #endif
12
+
13
+ #include <_mingw.h>
14
+ #include <io.h>
15
+
16
+ #pragma pack(push,_CRT_PACKING)
17
+
18
+ #ifdef __cplusplus
19
+ extern "C" {
20
+ #endif
21
+
22
+ #ifndef _CRTIMP
23
+ #define _CRTIMP __declspec(dllimport)
24
+ #endif
25
+
26
+ #include <sys/types.h>
27
+
28
+ #ifndef __TINYC__ /* gr */
29
+ #ifdef _USE_32BIT_TIME_T
30
+ #ifdef _WIN64
31
+ #undef _USE_32BIT_TIME_T
32
+ #endif
33
+ #else
34
+ #if _INTEGRAL_MAX_BITS < 64
35
+ #define _USE_32BIT_TIME_T
36
+ #endif
37
+ #endif
38
+ #endif
39
+
40
+ #ifndef _TIME32_T_DEFINED
41
+ typedef long __time32_t;
42
+ #define _TIME32_T_DEFINED
43
+ #endif
44
+
45
+ #ifndef _TIME64_T_DEFINED
46
+ #if _INTEGRAL_MAX_BITS >= 64
47
+ typedef __int64 __time64_t;
48
+ #endif
49
+ #define _TIME64_T_DEFINED
50
+ #endif
51
+
52
+ #ifndef _TIME_T_DEFINED
53
+ #ifdef _USE_32BIT_TIME_T
54
+ typedef __time32_t time_t;
55
+ #else
56
+ typedef __time64_t time_t;
57
+ #endif
58
+ #define _TIME_T_DEFINED
59
+ #endif
60
+
61
+ #ifndef _WCHAR_T_DEFINED
62
+ typedef unsigned short wchar_t;
63
+ #define _WCHAR_T_DEFINED
64
+ #endif
65
+
66
+ #ifndef _STAT_DEFINED
67
+
68
+ #ifdef _USE_32BIT_TIME_T
69
+ #ifndef _WIN64
70
+ #define _fstat32 _fstat
71
+ #define _stat32 _stat
72
+ #define _wstat32 _wstat
73
+ #else
74
+ #define _fstat _fstat32
75
+ #define _stat _stat32
76
+ #define _wstat _wstat32
77
+ #endif
78
+ #define _fstati64 _fstat32i64
79
+ #define _stati64 _stat32i64
80
+ #define _wstati64 _wstat32i64
81
+ #else
82
+ #define _fstat _fstat64i32
83
+ #define _fstati64 _fstat64
84
+ #define _stat _stat64
85
+ #define _stati64 _stat64
86
+ #define _wstat _wstat64
87
+ #define _wstati64 _wstat64
88
+ #endif
89
+
90
+ struct _stat32 {
91
+ _dev_t st_dev;
92
+ _ino_t st_ino;
93
+ unsigned short st_mode;
94
+ short st_nlink;
95
+ short st_uid;
96
+ short st_gid;
97
+ _dev_t st_rdev;
98
+ _off_t st_size;
99
+ __time32_t st_atime;
100
+ __time32_t st_mtime;
101
+ __time32_t st_ctime;
102
+ };
103
+
104
+ #ifndef NO_OLDNAMES
105
+ struct stat {
106
+ _dev_t st_dev;
107
+ _ino_t st_ino;
108
+ unsigned short st_mode;
109
+ short st_nlink;
110
+ short st_uid;
111
+ short st_gid;
112
+ _dev_t st_rdev;
113
+ _off_t st_size;
114
+ time_t st_atime;
115
+ time_t st_mtime;
116
+ time_t st_ctime;
117
+ };
118
+ #endif
119
+
120
+ #if _INTEGRAL_MAX_BITS >= 64
121
+ struct _stat32i64 {
122
+ _dev_t st_dev;
123
+ _ino_t st_ino;
124
+ unsigned short st_mode;
125
+ short st_nlink;
126
+ short st_uid;
127
+ short st_gid;
128
+ _dev_t st_rdev;
129
+ __int64 st_size;
130
+ __time32_t st_atime;
131
+ __time32_t st_mtime;
132
+ __time32_t st_ctime;
133
+ };
134
+
135
+ struct _stat64i32 {
136
+ _dev_t st_dev;
137
+ _ino_t st_ino;
138
+ unsigned short st_mode;
139
+ short st_nlink;
140
+ short st_uid;
141
+ short st_gid;
142
+ _dev_t st_rdev;
143
+ _off_t st_size;
144
+ __time64_t st_atime;
145
+ __time64_t st_mtime;
146
+ __time64_t st_ctime;
147
+ };
148
+
149
+ struct _stat64 {
150
+ _dev_t st_dev;
151
+ _ino_t st_ino;
152
+ unsigned short st_mode;
153
+ short st_nlink;
154
+ short st_uid;
155
+ short st_gid;
156
+ _dev_t st_rdev;
157
+ __int64 st_size;
158
+ __time64_t st_atime;
159
+ __time64_t st_mtime;
160
+ __time64_t st_ctime;
161
+ };
162
+ #endif
163
+
164
+ #define __stat64 _stat64
165
+
166
+ #define _STAT_DEFINED
167
+ #endif
168
+
169
+ #define _S_IFMT 0xF000
170
+ #define _S_IFDIR 0x4000
171
+ #define _S_IFCHR 0x2000
172
+ #define _S_IFIFO 0x1000
173
+ #define _S_IFREG 0x8000
174
+ #define _S_IREAD 0x0100
175
+ #define _S_IWRITE 0x0080
176
+ #define _S_IEXEC 0x0040
177
+
178
+ _CRTIMP int __cdecl _fstat32(int _FileDes,struct _stat32 *_Stat);
179
+ _CRTIMP int __cdecl _stat32(const char *_Name,struct _stat32 *_Stat);
180
+ #if _INTEGRAL_MAX_BITS >= 64
181
+ _CRTIMP int __cdecl _fstat64(int _FileDes,struct _stat64 *_Stat);
182
+ _CRTIMP int __cdecl _fstat32i64(int _FileDes,struct _stat32i64 *_Stat);
183
+ int __cdecl _fstat64i32(int _FileDes,struct _stat64i32 *_Stat);
184
+ __CRT_INLINE int __cdecl _fstat64i32(int _FileDes,struct _stat64i32 *_Stat)
185
+ {
186
+ struct _stat64 st;
187
+ int ret=_fstat64(_FileDes,&st);
188
+ _Stat->st_dev=st.st_dev;
189
+ _Stat->st_ino=st.st_ino;
190
+ _Stat->st_mode=st.st_mode;
191
+ _Stat->st_nlink=st.st_nlink;
192
+ _Stat->st_uid=st.st_uid;
193
+ _Stat->st_gid=st.st_gid;
194
+ _Stat->st_rdev=st.st_rdev;
195
+ _Stat->st_size=(_off_t) st.st_size;
196
+ _Stat->st_atime=st.st_atime;
197
+ _Stat->st_mtime=st.st_mtime;
198
+ _Stat->st_ctime=st.st_ctime;
199
+ return ret;
200
+ }
201
+ _CRTIMP int __cdecl _stat64(const char *_Name,struct _stat64 *_Stat);
202
+ _CRTIMP int __cdecl _stat32i64(const char *_Name,struct _stat32i64 *_Stat);
203
+ int __cdecl _stat64i32(const char *_Name,struct _stat64i32 *_Stat);
204
+ __CRT_INLINE int __cdecl _stat64i32(const char *_Name,struct _stat64i32 *_Stat)
205
+ {
206
+ struct _stat64 st;
207
+ int ret=_stat64(_Name,&st);
208
+ _Stat->st_dev=st.st_dev;
209
+ _Stat->st_ino=st.st_ino;
210
+ _Stat->st_mode=st.st_mode;
211
+ _Stat->st_nlink=st.st_nlink;
212
+ _Stat->st_uid=st.st_uid;
213
+ _Stat->st_gid=st.st_gid;
214
+ _Stat->st_rdev=st.st_rdev;
215
+ _Stat->st_size=(_off_t) st.st_size;
216
+ _Stat->st_atime=st.st_atime;
217
+ _Stat->st_mtime=st.st_mtime;
218
+ _Stat->st_ctime=st.st_ctime;
219
+ return ret;
220
+ }
221
+ #endif
222
+
223
+ #ifndef _WSTAT_DEFINED
224
+ #define _WSTAT_DEFINED
225
+ _CRTIMP int __cdecl _wstat32(const wchar_t *_Name,struct _stat32 *_Stat);
226
+ #if _INTEGRAL_MAX_BITS >= 64
227
+ _CRTIMP int __cdecl _wstat32i64(const wchar_t *_Name,struct _stat32i64 *_Stat);
228
+ int __cdecl _wstat64i32(const wchar_t *_Name,struct _stat64i32 *_Stat);
229
+ _CRTIMP int __cdecl _wstat64(const wchar_t *_Name,struct _stat64 *_Stat);
230
+ #endif
231
+ #endif
232
+
233
+ #ifndef NO_OLDNAMES
234
+ #define _S_IFBLK 0x3000 /* Block: Is this ever set under w32? */
235
+
236
+ #define S_IFMT _S_IFMT
237
+ #define S_IFDIR _S_IFDIR
238
+ #define S_IFCHR _S_IFCHR
239
+ #define S_IFREG _S_IFREG
240
+ #define S_IREAD _S_IREAD
241
+ #define S_IWRITE _S_IWRITE
242
+ #define S_IEXEC _S_IEXEC
243
+ #define S_IFIFO _S_IFIFO
244
+ #define S_IFBLK _S_IFBLK
245
+
246
+ #define _S_IRWXU (_S_IREAD | _S_IWRITE | _S_IEXEC)
247
+ #define _S_IXUSR _S_IEXEC
248
+ #define _S_IWUSR _S_IWRITE
249
+
250
+ #define S_IRWXU _S_IRWXU
251
+ #define S_IXUSR _S_IXUSR
252
+ #define S_IWUSR _S_IWUSR
253
+ #define S_IRUSR _S_IRUSR
254
+ #define _S_IRUSR _S_IREAD
255
+
256
+ #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
257
+ #define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
258
+ #define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
259
+ #define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
260
+ #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
261
+
262
+ #endif
263
+
264
+ #if !defined (RC_INVOKED) && !defined (NO_OLDNAMES)
265
+ int __cdecl stat(const char *_Filename,struct stat *_Stat);
266
+ int __cdecl fstat(int _Desc,struct stat *_Stat);
267
+ int __cdecl wstat(const wchar_t *_Filename,struct stat *_Stat);
268
+ #ifdef _USE_32BIT_TIME_T
269
+ __CRT_INLINE int __cdecl fstat(int _Desc,struct stat *_Stat) {
270
+ return _fstat32(_Desc,(struct _stat32 *)_Stat);
271
+ }
272
+ __CRT_INLINE int __cdecl stat(const char *_Filename,struct stat *_Stat) {
273
+ return _stat32(_Filename,(struct _stat32 *)_Stat);
274
+ }
275
+ #else
276
+ __CRT_INLINE int __cdecl fstat(int _Desc,struct stat *_Stat) {
277
+ return _fstat64i32(_Desc,(struct _stat64i32 *)_Stat);
278
+ }
279
+ __CRT_INLINE int __cdecl stat(const char *_Filename,struct stat *_Stat) {
280
+ return _stat64i32(_Filename,(struct _stat64i32 *)_Stat);
281
+ }
282
+ #endif
283
+ #endif
284
+
285
+ #ifdef __cplusplus
286
+ }
287
+ #endif
288
+
289
+ #pragma pack(pop)
290
+ #endif