1
- #define __LITTLE_ENDIAN 1234
2
- #define __BIG_ENDIAN 4321
3
- #define __USE_TIME_BITS64 1
4
-
5
- #define __BYTE_ORDER __LITTLE_ENDIAN
6
-
7
- #define __LONG_MAX __LONG_MAX__
8
-
1
+ /*
2
+ * The .h version of this file is generated from the .h.in.
3
+ * See update_alltypes.sh.
4
+ */
9
5
#define _Addr __PTRDIFF_TYPE__
10
6
#define _Int64 __INT64_TYPE__
11
7
#define _Reg __PTRDIFF_TYPE__
12
8
13
- #if __GNUC__ >= 3
9
+ #define __BYTE_ORDER 1234
10
+ #define __LONG_MAX __LONG_MAX__
11
+
14
12
#if defined(__NEED_va_list ) && !defined(__DEFINED_va_list )
15
13
typedef __builtin_va_list va_list ;
16
14
#define __DEFINED_va_list
@@ -21,18 +19,6 @@ typedef __builtin_va_list __isoc_va_list;
21
19
#define __DEFINED___isoc_va_list
22
20
#endif
23
21
24
- #else
25
- #if defined(__NEED_va_list ) && !defined(__DEFINED_va_list )
26
- typedef struct __va_list * va_list ;
27
- #define __DEFINED_va_list
28
- #endif
29
-
30
- #if defined(__NEED___isoc_va_list ) && !defined(__DEFINED___isoc_va_list )
31
- typedef struct __va_list * __isoc_va_list ;
32
- #define __DEFINED___isoc_va_list
33
- #endif
34
-
35
- #endif
36
22
37
23
#ifndef __cplusplus
38
24
#ifdef __WCHAR_TYPE__
@@ -43,7 +29,7 @@ typedef __WCHAR_TYPE__ wchar_t;
43
29
44
30
#else
45
31
#if defined(__NEED_wchar_t ) && !defined(__DEFINED_wchar_t )
46
- typedef int wchar_t ;
32
+ typedef long wchar_t ;
47
33
#define __DEFINED_wchar_t
48
34
#endif
49
35
@@ -55,6 +41,48 @@ typedef __WINT_TYPE__ wint_t;
55
41
#endif
56
42
57
43
44
+ // XXX EMSCRIPTEN: ensure it's always 32-bits even in wasm64
45
+ #if defined(__NEED_blkcnt_t ) && !defined(__DEFINED_blkcnt_t )
46
+ typedef int blkcnt_t ;
47
+ #define __DEFINED_blkcnt_t
48
+ #endif
49
+
50
+ #if defined(__NEED_blksize_t ) && !defined(__DEFINED_blksize_t )
51
+ typedef int blksize_t ;
52
+ #define __DEFINED_blksize_t
53
+ #endif
54
+
55
+ #if defined(__NEED_clock_t ) && !defined(__DEFINED_clock_t )
56
+ typedef int clock_t ;
57
+ #define __DEFINED_clock_t
58
+ #endif
59
+
60
+ #if defined(__NEED_dev_t ) && !defined(__DEFINED_dev_t )
61
+ typedef unsigned int dev_t ;
62
+ #define __DEFINED_dev_t
63
+ #endif
64
+
65
+ #if defined(__NEED_fsblkcnt_t ) && !defined(__DEFINED_fsblkcnt_t )
66
+ typedef unsigned int fsblkcnt_t ;
67
+ #define __DEFINED_fsblkcnt_t
68
+ #endif
69
+
70
+ #if defined(__NEED_suseconds_t ) && !defined(__DEFINED_suseconds_t )
71
+ typedef int suseconds_t ;
72
+ #define __DEFINED_suseconds_t
73
+ #endif
74
+
75
+ #if defined(__NEED_fsfilcnt_t ) && !defined(__DEFINED_fsfilcnt_t )
76
+ typedef unsigned int fsfilcnt_t ;
77
+ #define __DEFINED_fsfilcnt_t
78
+ #endif
79
+
80
+ #if defined(__NEED_wctype_t ) && !defined(__DEFINED_wctype_t )
81
+ typedef unsigned int wctype_t ;
82
+ #define __DEFINED_wctype_t
83
+ #endif
84
+
85
+
58
86
#if defined(__FLT_EVAL_METHOD__ ) && __FLT_EVAL_METHOD__ == 0
59
87
#if defined(__NEED_float_t ) && !defined(__DEFINED_float_t )
60
88
typedef float float_t ;
@@ -79,40 +107,40 @@ typedef long double double_t;
79
107
80
108
#endif
81
109
82
- #if defined(__NEED_time_t ) && !defined(__DEFINED_time_t )
83
- typedef _Int64 time_t ;
84
- #define __DEFINED_time_t
110
+ #ifndef __cplusplus
111
+ #if defined(__NEED_max_align_t ) && !defined(__DEFINED_max_align_t )
112
+ typedef struct { _Alignas(8 ) long long __ll ; long double __ld ; } max_align_t ;
113
+ #define __DEFINED_max_align_t
85
114
#endif
86
115
87
- #if defined(__NEED_suseconds_t ) && !defined(__DEFINED_suseconds_t )
88
- typedef int suseconds_t ; /* XXX EMSCRIPTEN: ensure it's always 32-bits even in wasm64 */
89
- #define __DEFINED_suseconds_t
116
+ #elif defined(__GNUC__ )
117
+ #if defined(__NEED_max_align_t ) && !defined(__DEFINED_max_align_t )
118
+ typedef struct { __attribute__((__aligned__ (8 ))) long long __ll ; long double __ld ; } max_align_t ;
119
+ #define __DEFINED_max_align_t
90
120
#endif
91
121
122
+ #else
123
+ #if defined(__NEED_max_align_t ) && !defined(__DEFINED_max_align_t )
124
+ typedef struct { alignas(8 ) long long __ll ; long double __ld ; } max_align_t ;
125
+ #define __DEFINED_max_align_t
126
+ #endif
92
127
128
+ #endif
129
+
130
+ // For canvas transfer implementation in Emscripten, use an extra control field
131
+ // to pass a pointer to a string denoting the WebGL canvases to transfer.
93
132
#if defined(__NEED_pthread_attr_t ) && !defined(__DEFINED_pthread_attr_t )
94
- typedef struct {
95
- union {
96
- int __i [10 ];
97
- volatile int __vi [10 ];
98
- unsigned long __s [10 ];
99
- } __u ;
100
- #ifdef __EMSCRIPTEN__
101
- // For canvas transfer implementation in Emscripten, use an extra control field
102
- // to pass a pointer to a string denoting the WebGL canvases to transfer.
103
- const char * _a_transferredcanvases ;
104
- #endif
105
- } pthread_attr_t ;
133
+ typedef struct { union { int __i [10 ]; volatile int __vi [10 ]; unsigned long __s [10 ]; } __u ; const char * _a_transferredcanvases ; } pthread_attr_t ;
106
134
#define __DEFINED_pthread_attr_t
107
135
#endif
108
136
109
137
#if defined(__NEED_pthread_mutex_t ) && !defined(__DEFINED_pthread_mutex_t )
110
- typedef struct { union { int __i [6 ]; volatile int __vi [6 ]; volatile void * __p [6 ]; } __u ; } pthread_mutex_t ;
138
+ typedef struct { union { int __i [6 ]; volatile int __vi [6 ]; volatile void * volatile __p [6 ]; } __u ; } pthread_mutex_t ;
111
139
#define __DEFINED_pthread_mutex_t
112
140
#endif
113
141
114
142
#if defined(__NEED_mtx_t ) && !defined(__DEFINED_mtx_t )
115
- typedef struct { union { int __i [6 ]; volatile int __vi [6 ]; volatile void * __p [6 ]; } __u ; } mtx_t ;
143
+ typedef struct { union { int __i [6 ]; volatile int __vi [6 ]; volatile void * volatile __p [6 ]; } __u ; } mtx_t ;
116
144
#define __DEFINED_mtx_t
117
145
#endif
118
146
@@ -127,7 +155,7 @@ typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __
127
155
#endif
128
156
129
157
#if defined(__NEED_pthread_rwlock_t ) && !defined(__DEFINED_pthread_rwlock_t )
130
- typedef struct { union { int __i [sizeof ( long ) == 8 ? 14 : 8 ]; volatile int __vi [sizeof ( long ) == 8 ? 14 : 8 ]; void * __p [sizeof ( long ) == 8 ? 7 : 8 ]; } __u ; } pthread_rwlock_t ;
158
+ typedef struct { union { int __i [8 ]; volatile int __vi [8 ]; void * __p [8 ]; } __u ; } pthread_rwlock_t ;
131
159
#define __DEFINED_pthread_rwlock_t
132
160
#endif
133
161
@@ -136,6 +164,9 @@ typedef struct { union { int __i[5]; volatile int __vi[5]; void *__p[5]; } __u;
136
164
#define __DEFINED_pthread_barrier_t
137
165
#endif
138
166
167
+ #define __LITTLE_ENDIAN 1234
168
+ #define __BIG_ENDIAN 4321
169
+ #define __USE_TIME_BITS64 1
139
170
140
171
#if defined(__NEED_size_t ) && !defined(__DEFINED_size_t )
141
172
typedef unsigned _Addr size_t ;
@@ -172,29 +203,39 @@ typedef _Reg register_t;
172
203
#define __DEFINED_register_t
173
204
#endif
174
205
206
+ #if defined(__NEED_time_t ) && !defined(__DEFINED_time_t )
207
+ typedef _Int64 time_t ;
208
+ #define __DEFINED_time_t
209
+ #endif
210
+
211
+ #if defined(__NEED_suseconds_t ) && !defined(__DEFINED_suseconds_t )
212
+ typedef _Int64 suseconds_t ;
213
+ #define __DEFINED_suseconds_t
214
+ #endif
215
+
175
216
176
217
#if defined(__NEED_int8_t ) && !defined(__DEFINED_int8_t )
177
218
typedef signed char int8_t ;
178
219
#define __DEFINED_int8_t
179
220
#endif
180
221
181
222
#if defined(__NEED_int16_t ) && !defined(__DEFINED_int16_t )
182
- typedef short int16_t ;
223
+ typedef signed short int16_t ;
183
224
#define __DEFINED_int16_t
184
225
#endif
185
226
186
227
#if defined(__NEED_int32_t ) && !defined(__DEFINED_int32_t )
187
- typedef int int32_t ;
228
+ typedef signed int int32_t ;
188
229
#define __DEFINED_int32_t
189
230
#endif
190
231
191
232
#if defined(__NEED_int64_t ) && !defined(__DEFINED_int64_t )
192
- typedef _Int64 int64_t ;
233
+ typedef signed _Int64 int64_t ;
193
234
#define __DEFINED_int64_t
194
235
#endif
195
236
196
237
#if defined(__NEED_intmax_t ) && !defined(__DEFINED_intmax_t )
197
- typedef _Int64 intmax_t ;
238
+ typedef signed _Int64 intmax_t ;
198
239
#define __DEFINED_intmax_t
199
240
#endif
200
241
@@ -250,37 +291,38 @@ typedef unsigned _Int64 ino_t;
250
291
#endif
251
292
252
293
#if defined(__NEED_dev_t ) && !defined(__DEFINED_dev_t )
253
- typedef unsigned int dev_t ;
294
+ typedef unsigned _Int64 dev_t ;
254
295
#define __DEFINED_dev_t
255
296
#endif
256
297
257
298
#if defined(__NEED_blksize_t ) && !defined(__DEFINED_blksize_t )
258
- typedef int blksize_t ; /* XXX EMSCRIPTEN: ensure it's always 32-bits even in wasm64 */
299
+ typedef long blksize_t ;
259
300
#define __DEFINED_blksize_t
260
301
#endif
261
302
262
303
#if defined(__NEED_blkcnt_t ) && !defined(__DEFINED_blkcnt_t )
263
- typedef int blkcnt_t ;
304
+ typedef _Int64 blkcnt_t ;
264
305
#define __DEFINED_blkcnt_t
265
306
#endif
266
307
267
308
#if defined(__NEED_fsblkcnt_t ) && !defined(__DEFINED_fsblkcnt_t )
268
- typedef unsigned int fsblkcnt_t ;
309
+ typedef unsigned _Int64 fsblkcnt_t ;
269
310
#define __DEFINED_fsblkcnt_t
270
311
#endif
271
312
272
313
#if defined(__NEED_fsfilcnt_t ) && !defined(__DEFINED_fsfilcnt_t )
273
- typedef unsigned int fsfilcnt_t ;
314
+ typedef unsigned _Int64 fsfilcnt_t ;
274
315
#define __DEFINED_fsfilcnt_t
275
316
#endif
276
317
318
+
277
319
#if defined(__NEED_wint_t ) && !defined(__DEFINED_wint_t )
278
320
typedef unsigned wint_t ;
279
321
#define __DEFINED_wint_t
280
322
#endif
281
323
282
324
#if defined(__NEED_wctype_t ) && !defined(__DEFINED_wctype_t )
283
- typedef unsigned int wctype_t ; /* XXX EMSCRIPTEN: ensure it's always 32-bits even in wasm64 */
325
+ typedef unsigned long wctype_t ;
284
326
#define __DEFINED_wctype_t
285
327
#endif
286
328
@@ -296,22 +338,17 @@ typedef int clockid_t;
296
338
#endif
297
339
298
340
#if defined(__NEED_clock_t ) && !defined(__DEFINED_clock_t )
299
- typedef int clock_t ; /* XXX EMSCRIPTEN: ensure it's always 32-bits even in wasm64 */
341
+ typedef long clock_t ;
300
342
#define __DEFINED_clock_t
301
343
#endif
302
344
303
- #if defined(__NEED_max_align_t ) && !defined(__DEFINED_max_align_t )
304
- typedef struct { long long __ll ; long double __ld ; } max_align_t ;
305
- #define __DEFINED_max_align_t
306
- #endif
307
-
308
345
#if defined(__NEED_struct_timeval ) && !defined(__DEFINED_struct_timeval )
309
346
struct timeval { time_t tv_sec ; suseconds_t tv_usec ; };
310
347
#define __DEFINED_struct_timeval
311
348
#endif
312
349
313
350
#if defined(__NEED_struct_timespec ) && !defined(__DEFINED_struct_timespec )
314
- struct timespec { time_t tv_sec ; long tv_nsec ; };
351
+ struct timespec { time_t tv_sec ; int : 8 * ( sizeof ( time_t ) - sizeof ( long )) * ( __BYTE_ORDER == 4321 ); long tv_nsec ; int : 8 * ( sizeof ( time_t ) - sizeof ( long )) * ( __BYTE_ORDER != 4321 ) ; };
315
352
#define __DEFINED_struct_timespec
316
353
#endif
317
354
@@ -396,12 +433,28 @@ typedef struct { unsigned __attr[2]; } pthread_rwlockattr_t;
396
433
#endif
397
434
398
435
436
+ #if defined(__NEED_struct__IO_FILE ) && !defined(__DEFINED_struct__IO_FILE )
437
+ struct _IO_FILE { char __x ; };
438
+ #define __DEFINED_struct__IO_FILE
439
+ #endif
440
+
399
441
#if defined(__NEED_FILE ) && !defined(__DEFINED_FILE )
400
442
typedef struct _IO_FILE FILE ;
401
443
#define __DEFINED_FILE
402
444
#endif
403
445
404
446
447
+ #if defined(__NEED_va_list ) && !defined(__DEFINED_va_list )
448
+ typedef __builtin_va_list va_list ;
449
+ #define __DEFINED_va_list
450
+ #endif
451
+
452
+ #if defined(__NEED___isoc_va_list ) && !defined(__DEFINED___isoc_va_list )
453
+ typedef __builtin_va_list __isoc_va_list ;
454
+ #define __DEFINED___isoc_va_list
455
+ #endif
456
+
457
+
405
458
#if defined(__NEED_mbstate_t ) && !defined(__DEFINED_mbstate_t )
406
459
typedef struct __mbstate_t { unsigned __opaque1 , __opaque2 ; } mbstate_t ;
407
460
#define __DEFINED_mbstate_t
@@ -443,6 +496,42 @@ typedef unsigned short sa_family_t;
443
496
#endif
444
497
445
498
499
+ #if defined(__NEED_pthread_attr_t ) && !defined(__DEFINED_pthread_attr_t )
500
+ typedef struct { union { int __i [sizeof (long )== 8 ?14 :9 ]; volatile int __vi [sizeof (long )== 8 ?14 :9 ]; unsigned long __s [sizeof (long )== 8 ?7 :9 ]; } __u ; } pthread_attr_t ;
501
+ #define __DEFINED_pthread_attr_t
502
+ #endif
503
+
504
+ #if defined(__NEED_pthread_mutex_t ) && !defined(__DEFINED_pthread_mutex_t )
505
+ typedef struct { union { int __i [sizeof (long )== 8 ?10 :6 ]; volatile int __vi [sizeof (long )== 8 ?10 :6 ]; volatile void * volatile __p [sizeof (long )== 8 ?5 :6 ]; } __u ; } pthread_mutex_t ;
506
+ #define __DEFINED_pthread_mutex_t
507
+ #endif
508
+
509
+ #if defined(__NEED_mtx_t ) && !defined(__DEFINED_mtx_t )
510
+ typedef struct { union { int __i [sizeof (long )== 8 ?10 :6 ]; volatile int __vi [sizeof (long )== 8 ?10 :6 ]; volatile void * volatile __p [sizeof (long )== 8 ?5 :6 ]; } __u ; } mtx_t ;
511
+ #define __DEFINED_mtx_t
512
+ #endif
513
+
514
+ #if defined(__NEED_pthread_cond_t ) && !defined(__DEFINED_pthread_cond_t )
515
+ typedef struct { union { int __i [12 ]; volatile int __vi [12 ]; void * __p [12 * sizeof (int )/sizeof (void * )]; } __u ; } pthread_cond_t ;
516
+ #define __DEFINED_pthread_cond_t
517
+ #endif
518
+
519
+ #if defined(__NEED_cnd_t ) && !defined(__DEFINED_cnd_t )
520
+ typedef struct { union { int __i [12 ]; volatile int __vi [12 ]; void * __p [12 * sizeof (int )/sizeof (void * )]; } __u ; } cnd_t ;
521
+ #define __DEFINED_cnd_t
522
+ #endif
523
+
524
+ #if defined(__NEED_pthread_rwlock_t ) && !defined(__DEFINED_pthread_rwlock_t )
525
+ typedef struct { union { int __i [sizeof (long )== 8 ?14 :8 ]; volatile int __vi [sizeof (long )== 8 ?14 :8 ]; void * __p [sizeof (long )== 8 ?7 :8 ]; } __u ; } pthread_rwlock_t ;
526
+ #define __DEFINED_pthread_rwlock_t
527
+ #endif
528
+
529
+ #if defined(__NEED_pthread_barrier_t ) && !defined(__DEFINED_pthread_barrier_t )
530
+ typedef struct { union { int __i [sizeof (long )== 8 ?8 :5 ]; volatile int __vi [sizeof (long )== 8 ?8 :5 ]; void * __p [sizeof (long )== 8 ?4 :5 ]; } __u ; } pthread_barrier_t ;
531
+ #define __DEFINED_pthread_barrier_t
532
+ #endif
533
+
534
+
446
535
#undef _Addr
447
536
#undef _Int64
448
537
#undef _Reg
0 commit comments