@@ -65,25 +65,25 @@ typedef uint32_t __wasi_clockid_t;
65
65
* The clock measuring real time. Time value zero corresponds with
66
66
* 1970-01-01T00:00:00Z.
67
67
*/
68
- #define __WASI_CLOCKID_REALTIME ((__wasi_clockid_t)0 )
68
+ #define __WASI_CLOCKID_REALTIME (UINT32_C(0) )
69
69
70
70
/**
71
71
* The store-wide monotonic clock, which is defined as a clock measuring
72
72
* real time, whose value cannot be adjusted and which cannot have negative
73
73
* clock jumps. The epoch of this clock is undefined. The absolute time
74
74
* value of this clock therefore has no meaning.
75
75
*/
76
- #define __WASI_CLOCKID_MONOTONIC ((__wasi_clockid_t)1 )
76
+ #define __WASI_CLOCKID_MONOTONIC (UINT32_C(1) )
77
77
78
78
/**
79
79
* The CPU-time clock associated with the current process.
80
80
*/
81
- #define __WASI_CLOCKID_PROCESS_CPUTIME_ID ((__wasi_clockid_t)2 )
81
+ #define __WASI_CLOCKID_PROCESS_CPUTIME_ID (UINT32_C(2) )
82
82
83
83
/**
84
84
* The CPU-time clock associated with the current thread.
85
85
*/
86
- #define __WASI_CLOCKID_THREAD_CPUTIME_ID ((__wasi_clockid_t)3 )
86
+ #define __WASI_CLOCKID_THREAD_CPUTIME_ID (UINT32_C(3) )
87
87
88
88
/**
89
89
* Error codes returned by functions.
@@ -96,387 +96,387 @@ typedef uint16_t __wasi_errno_t;
96
96
/**
97
97
* No error occurred. System call completed successfully.
98
98
*/
99
- #define __WASI_ERRNO_SUCCESS ((__wasi_errno_t)0 )
99
+ #define __WASI_ERRNO_SUCCESS (UINT16_C(0) )
100
100
101
101
/**
102
102
* Argument list too long.
103
103
*/
104
- #define __WASI_ERRNO_2BIG ((__wasi_errno_t)1 )
104
+ #define __WASI_ERRNO_2BIG (UINT16_C(1) )
105
105
106
106
/**
107
107
* Permission denied.
108
108
*/
109
- #define __WASI_ERRNO_ACCES ((__wasi_errno_t)2 )
109
+ #define __WASI_ERRNO_ACCES (UINT16_C(2) )
110
110
111
111
/**
112
112
* Address in use.
113
113
*/
114
- #define __WASI_ERRNO_ADDRINUSE ((__wasi_errno_t)3 )
114
+ #define __WASI_ERRNO_ADDRINUSE (UINT16_C(3) )
115
115
116
116
/**
117
117
* Address not available.
118
118
*/
119
- #define __WASI_ERRNO_ADDRNOTAVAIL ((__wasi_errno_t)4 )
119
+ #define __WASI_ERRNO_ADDRNOTAVAIL (UINT16_C(4) )
120
120
121
121
/**
122
122
* Address family not supported.
123
123
*/
124
- #define __WASI_ERRNO_AFNOSUPPORT ((__wasi_errno_t)5 )
124
+ #define __WASI_ERRNO_AFNOSUPPORT (UINT16_C(5) )
125
125
126
126
/**
127
127
* Resource unavailable, or operation would block.
128
128
*/
129
- #define __WASI_ERRNO_AGAIN ((__wasi_errno_t)6 )
129
+ #define __WASI_ERRNO_AGAIN (UINT16_C(6) )
130
130
131
131
/**
132
132
* Connection already in progress.
133
133
*/
134
- #define __WASI_ERRNO_ALREADY ((__wasi_errno_t)7 )
134
+ #define __WASI_ERRNO_ALREADY (UINT16_C(7) )
135
135
136
136
/**
137
137
* Bad file descriptor.
138
138
*/
139
- #define __WASI_ERRNO_BADF ((__wasi_errno_t)8 )
139
+ #define __WASI_ERRNO_BADF (UINT16_C(8) )
140
140
141
141
/**
142
142
* Bad message.
143
143
*/
144
- #define __WASI_ERRNO_BADMSG ((__wasi_errno_t)9 )
144
+ #define __WASI_ERRNO_BADMSG (UINT16_C(9) )
145
145
146
146
/**
147
147
* Device or resource busy.
148
148
*/
149
- #define __WASI_ERRNO_BUSY ((__wasi_errno_t)10 )
149
+ #define __WASI_ERRNO_BUSY (UINT16_C(10) )
150
150
151
151
/**
152
152
* Operation canceled.
153
153
*/
154
- #define __WASI_ERRNO_CANCELED ((__wasi_errno_t)11 )
154
+ #define __WASI_ERRNO_CANCELED (UINT16_C(11) )
155
155
156
156
/**
157
157
* No child processes.
158
158
*/
159
- #define __WASI_ERRNO_CHILD ((__wasi_errno_t)12 )
159
+ #define __WASI_ERRNO_CHILD (UINT16_C(12) )
160
160
161
161
/**
162
162
* Connection aborted.
163
163
*/
164
- #define __WASI_ERRNO_CONNABORTED ((__wasi_errno_t)13 )
164
+ #define __WASI_ERRNO_CONNABORTED (UINT16_C(13) )
165
165
166
166
/**
167
167
* Connection refused.
168
168
*/
169
- #define __WASI_ERRNO_CONNREFUSED ((__wasi_errno_t)14 )
169
+ #define __WASI_ERRNO_CONNREFUSED (UINT16_C(14) )
170
170
171
171
/**
172
172
* Connection reset.
173
173
*/
174
- #define __WASI_ERRNO_CONNRESET ((__wasi_errno_t)15 )
174
+ #define __WASI_ERRNO_CONNRESET (UINT16_C(15) )
175
175
176
176
/**
177
177
* Resource deadlock would occur.
178
178
*/
179
- #define __WASI_ERRNO_DEADLK ((__wasi_errno_t)16 )
179
+ #define __WASI_ERRNO_DEADLK (UINT16_C(16) )
180
180
181
181
/**
182
182
* Destination address required.
183
183
*/
184
- #define __WASI_ERRNO_DESTADDRREQ ((__wasi_errno_t)17 )
184
+ #define __WASI_ERRNO_DESTADDRREQ (UINT16_C(17) )
185
185
186
186
/**
187
187
* Mathematics argument out of domain of function.
188
188
*/
189
- #define __WASI_ERRNO_DOM ((__wasi_errno_t)18 )
189
+ #define __WASI_ERRNO_DOM (UINT16_C(18) )
190
190
191
191
/**
192
192
* Reserved.
193
193
*/
194
- #define __WASI_ERRNO_DQUOT ((__wasi_errno_t)19 )
194
+ #define __WASI_ERRNO_DQUOT (UINT16_C(19) )
195
195
196
196
/**
197
197
* File exists.
198
198
*/
199
- #define __WASI_ERRNO_EXIST ((__wasi_errno_t)20 )
199
+ #define __WASI_ERRNO_EXIST (UINT16_C(20) )
200
200
201
201
/**
202
202
* Bad address.
203
203
*/
204
- #define __WASI_ERRNO_FAULT ((__wasi_errno_t)21 )
204
+ #define __WASI_ERRNO_FAULT (UINT16_C(21) )
205
205
206
206
/**
207
207
* File too large.
208
208
*/
209
- #define __WASI_ERRNO_FBIG ((__wasi_errno_t)22 )
209
+ #define __WASI_ERRNO_FBIG (UINT16_C(22) )
210
210
211
211
/**
212
212
* Host is unreachable.
213
213
*/
214
- #define __WASI_ERRNO_HOSTUNREACH ((__wasi_errno_t)23 )
214
+ #define __WASI_ERRNO_HOSTUNREACH (UINT16_C(23) )
215
215
216
216
/**
217
217
* Identifier removed.
218
218
*/
219
- #define __WASI_ERRNO_IDRM ((__wasi_errno_t)24 )
219
+ #define __WASI_ERRNO_IDRM (UINT16_C(24) )
220
220
221
221
/**
222
222
* Illegal byte sequence.
223
223
*/
224
- #define __WASI_ERRNO_ILSEQ ((__wasi_errno_t)25 )
224
+ #define __WASI_ERRNO_ILSEQ (UINT16_C(25) )
225
225
226
226
/**
227
227
* Operation in progress.
228
228
*/
229
- #define __WASI_ERRNO_INPROGRESS ((__wasi_errno_t)26 )
229
+ #define __WASI_ERRNO_INPROGRESS (UINT16_C(26) )
230
230
231
231
/**
232
232
* Interrupted function.
233
233
*/
234
- #define __WASI_ERRNO_INTR ((__wasi_errno_t)27 )
234
+ #define __WASI_ERRNO_INTR (UINT16_C(27) )
235
235
236
236
/**
237
237
* Invalid argument.
238
238
*/
239
- #define __WASI_ERRNO_INVAL ((__wasi_errno_t)28 )
239
+ #define __WASI_ERRNO_INVAL (UINT16_C(28) )
240
240
241
241
/**
242
242
* I/O error.
243
243
*/
244
- #define __WASI_ERRNO_IO ((__wasi_errno_t)29 )
244
+ #define __WASI_ERRNO_IO (UINT16_C(29) )
245
245
246
246
/**
247
247
* Socket is connected.
248
248
*/
249
- #define __WASI_ERRNO_ISCONN ((__wasi_errno_t)30 )
249
+ #define __WASI_ERRNO_ISCONN (UINT16_C(30) )
250
250
251
251
/**
252
252
* Is a directory.
253
253
*/
254
- #define __WASI_ERRNO_ISDIR ((__wasi_errno_t)31 )
254
+ #define __WASI_ERRNO_ISDIR (UINT16_C(31) )
255
255
256
256
/**
257
257
* Too many levels of symbolic links.
258
258
*/
259
- #define __WASI_ERRNO_LOOP ((__wasi_errno_t)32 )
259
+ #define __WASI_ERRNO_LOOP (UINT16_C(32) )
260
260
261
261
/**
262
262
* File descriptor value too large.
263
263
*/
264
- #define __WASI_ERRNO_MFILE ((__wasi_errno_t)33 )
264
+ #define __WASI_ERRNO_MFILE (UINT16_C(33) )
265
265
266
266
/**
267
267
* Too many links.
268
268
*/
269
- #define __WASI_ERRNO_MLINK ((__wasi_errno_t)34 )
269
+ #define __WASI_ERRNO_MLINK (UINT16_C(34) )
270
270
271
271
/**
272
272
* Message too large.
273
273
*/
274
- #define __WASI_ERRNO_MSGSIZE ((__wasi_errno_t)35 )
274
+ #define __WASI_ERRNO_MSGSIZE (UINT16_C(35) )
275
275
276
276
/**
277
277
* Reserved.
278
278
*/
279
- #define __WASI_ERRNO_MULTIHOP ((__wasi_errno_t)36 )
279
+ #define __WASI_ERRNO_MULTIHOP (UINT16_C(36) )
280
280
281
281
/**
282
282
* Filename too long.
283
283
*/
284
- #define __WASI_ERRNO_NAMETOOLONG ((__wasi_errno_t)37 )
284
+ #define __WASI_ERRNO_NAMETOOLONG (UINT16_C(37) )
285
285
286
286
/**
287
287
* Network is down.
288
288
*/
289
- #define __WASI_ERRNO_NETDOWN ((__wasi_errno_t)38 )
289
+ #define __WASI_ERRNO_NETDOWN (UINT16_C(38) )
290
290
291
291
/**
292
292
* Connection aborted by network.
293
293
*/
294
- #define __WASI_ERRNO_NETRESET ((__wasi_errno_t)39 )
294
+ #define __WASI_ERRNO_NETRESET (UINT16_C(39) )
295
295
296
296
/**
297
297
* Network unreachable.
298
298
*/
299
- #define __WASI_ERRNO_NETUNREACH ((__wasi_errno_t)40 )
299
+ #define __WASI_ERRNO_NETUNREACH (UINT16_C(40) )
300
300
301
301
/**
302
302
* Too many files open in system.
303
303
*/
304
- #define __WASI_ERRNO_NFILE ((__wasi_errno_t)41 )
304
+ #define __WASI_ERRNO_NFILE (UINT16_C(41) )
305
305
306
306
/**
307
307
* No buffer space available.
308
308
*/
309
- #define __WASI_ERRNO_NOBUFS ((__wasi_errno_t)42 )
309
+ #define __WASI_ERRNO_NOBUFS (UINT16_C(42) )
310
310
311
311
/**
312
312
* No such device.
313
313
*/
314
- #define __WASI_ERRNO_NODEV ((__wasi_errno_t)43 )
314
+ #define __WASI_ERRNO_NODEV (UINT16_C(43) )
315
315
316
316
/**
317
317
* No such file or directory.
318
318
*/
319
- #define __WASI_ERRNO_NOENT ((__wasi_errno_t)44 )
319
+ #define __WASI_ERRNO_NOENT (UINT16_C(44) )
320
320
321
321
/**
322
322
* Executable file format error.
323
323
*/
324
- #define __WASI_ERRNO_NOEXEC ((__wasi_errno_t)45 )
324
+ #define __WASI_ERRNO_NOEXEC (UINT16_C(45) )
325
325
326
326
/**
327
327
* No locks available.
328
328
*/
329
- #define __WASI_ERRNO_NOLCK ((__wasi_errno_t)46 )
329
+ #define __WASI_ERRNO_NOLCK (UINT16_C(46) )
330
330
331
331
/**
332
332
* Reserved.
333
333
*/
334
- #define __WASI_ERRNO_NOLINK ((__wasi_errno_t)47 )
334
+ #define __WASI_ERRNO_NOLINK (UINT16_C(47) )
335
335
336
336
/**
337
337
* Not enough space.
338
338
*/
339
- #define __WASI_ERRNO_NOMEM ((__wasi_errno_t)48 )
339
+ #define __WASI_ERRNO_NOMEM (UINT16_C(48) )
340
340
341
341
/**
342
342
* No message of the desired type.
343
343
*/
344
- #define __WASI_ERRNO_NOMSG ((__wasi_errno_t)49 )
344
+ #define __WASI_ERRNO_NOMSG (UINT16_C(49) )
345
345
346
346
/**
347
347
* Protocol not available.
348
348
*/
349
- #define __WASI_ERRNO_NOPROTOOPT ((__wasi_errno_t)50 )
349
+ #define __WASI_ERRNO_NOPROTOOPT (UINT16_C(50) )
350
350
351
351
/**
352
352
* No space left on device.
353
353
*/
354
- #define __WASI_ERRNO_NOSPC ((__wasi_errno_t)51 )
354
+ #define __WASI_ERRNO_NOSPC (UINT16_C(51) )
355
355
356
356
/**
357
357
* Function not supported.
358
358
*/
359
- #define __WASI_ERRNO_NOSYS ((__wasi_errno_t)52 )
359
+ #define __WASI_ERRNO_NOSYS (UINT16_C(52) )
360
360
361
361
/**
362
362
* The socket is not connected.
363
363
*/
364
- #define __WASI_ERRNO_NOTCONN ((__wasi_errno_t)53 )
364
+ #define __WASI_ERRNO_NOTCONN (UINT16_C(53) )
365
365
366
366
/**
367
367
* Not a directory or a symbolic link to a directory.
368
368
*/
369
- #define __WASI_ERRNO_NOTDIR ((__wasi_errno_t)54 )
369
+ #define __WASI_ERRNO_NOTDIR (UINT16_C(54) )
370
370
371
371
/**
372
372
* Directory not empty.
373
373
*/
374
- #define __WASI_ERRNO_NOTEMPTY ((__wasi_errno_t)55 )
374
+ #define __WASI_ERRNO_NOTEMPTY (UINT16_C(55) )
375
375
376
376
/**
377
377
* State not recoverable.
378
378
*/
379
- #define __WASI_ERRNO_NOTRECOVERABLE ((__wasi_errno_t)56 )
379
+ #define __WASI_ERRNO_NOTRECOVERABLE (UINT16_C(56) )
380
380
381
381
/**
382
382
* Not a socket.
383
383
*/
384
- #define __WASI_ERRNO_NOTSOCK ((__wasi_errno_t)57 )
384
+ #define __WASI_ERRNO_NOTSOCK (UINT16_C(57) )
385
385
386
386
/**
387
387
* Not supported, or operation not supported on socket.
388
388
*/
389
- #define __WASI_ERRNO_NOTSUP ((__wasi_errno_t)58 )
389
+ #define __WASI_ERRNO_NOTSUP (UINT16_C(58) )
390
390
391
391
/**
392
392
* Inappropriate I/O control operation.
393
393
*/
394
- #define __WASI_ERRNO_NOTTY ((__wasi_errno_t)59 )
394
+ #define __WASI_ERRNO_NOTTY (UINT16_C(59) )
395
395
396
396
/**
397
397
* No such device or address.
398
398
*/
399
- #define __WASI_ERRNO_NXIO ((__wasi_errno_t)60 )
399
+ #define __WASI_ERRNO_NXIO (UINT16_C(60) )
400
400
401
401
/**
402
402
* Value too large to be stored in data type.
403
403
*/
404
- #define __WASI_ERRNO_OVERFLOW ((__wasi_errno_t)61 )
404
+ #define __WASI_ERRNO_OVERFLOW (UINT16_C(61) )
405
405
406
406
/**
407
407
* Previous owner died.
408
408
*/
409
- #define __WASI_ERRNO_OWNERDEAD ((__wasi_errno_t)62 )
409
+ #define __WASI_ERRNO_OWNERDEAD (UINT16_C(62) )
410
410
411
411
/**
412
412
* Operation not permitted.
413
413
*/
414
- #define __WASI_ERRNO_PERM ((__wasi_errno_t)63 )
414
+ #define __WASI_ERRNO_PERM (UINT16_C(63) )
415
415
416
416
/**
417
417
* Broken pipe.
418
418
*/
419
- #define __WASI_ERRNO_PIPE ((__wasi_errno_t)64 )
419
+ #define __WASI_ERRNO_PIPE (UINT16_C(64) )
420
420
421
421
/**
422
422
* Protocol error.
423
423
*/
424
- #define __WASI_ERRNO_PROTO ((__wasi_errno_t)65 )
424
+ #define __WASI_ERRNO_PROTO (UINT16_C(65) )
425
425
426
426
/**
427
427
* Protocol not supported.
428
428
*/
429
- #define __WASI_ERRNO_PROTONOSUPPORT ((__wasi_errno_t)66 )
429
+ #define __WASI_ERRNO_PROTONOSUPPORT (UINT16_C(66) )
430
430
431
431
/**
432
432
* Protocol wrong type for socket.
433
433
*/
434
- #define __WASI_ERRNO_PROTOTYPE ((__wasi_errno_t)67 )
434
+ #define __WASI_ERRNO_PROTOTYPE (UINT16_C(67) )
435
435
436
436
/**
437
437
* Result too large.
438
438
*/
439
- #define __WASI_ERRNO_RANGE ((__wasi_errno_t)68 )
439
+ #define __WASI_ERRNO_RANGE (UINT16_C(68) )
440
440
441
441
/**
442
442
* Read-only file system.
443
443
*/
444
- #define __WASI_ERRNO_ROFS ((__wasi_errno_t)69 )
444
+ #define __WASI_ERRNO_ROFS (UINT16_C(69) )
445
445
446
446
/**
447
447
* Invalid seek.
448
448
*/
449
- #define __WASI_ERRNO_SPIPE ((__wasi_errno_t)70 )
449
+ #define __WASI_ERRNO_SPIPE (UINT16_C(70) )
450
450
451
451
/**
452
452
* No such process.
453
453
*/
454
- #define __WASI_ERRNO_SRCH ((__wasi_errno_t)71 )
454
+ #define __WASI_ERRNO_SRCH (UINT16_C(71) )
455
455
456
456
/**
457
457
* Reserved.
458
458
*/
459
- #define __WASI_ERRNO_STALE ((__wasi_errno_t)72 )
459
+ #define __WASI_ERRNO_STALE (UINT16_C(72) )
460
460
461
461
/**
462
462
* Connection timed out.
463
463
*/
464
- #define __WASI_ERRNO_TIMEDOUT ((__wasi_errno_t)73 )
464
+ #define __WASI_ERRNO_TIMEDOUT (UINT16_C(73) )
465
465
466
466
/**
467
467
* Text file busy.
468
468
*/
469
- #define __WASI_ERRNO_TXTBSY ((__wasi_errno_t)74 )
469
+ #define __WASI_ERRNO_TXTBSY (UINT16_C(74) )
470
470
471
471
/**
472
472
* Cross-device link.
473
473
*/
474
- #define __WASI_ERRNO_XDEV ((__wasi_errno_t)75 )
474
+ #define __WASI_ERRNO_XDEV (UINT16_C(75) )
475
475
476
476
/**
477
477
* Extension: Capabilities insufficient.
478
478
*/
479
- #define __WASI_ERRNO_NOTCAPABLE ((__wasi_errno_t)76 )
479
+ #define __WASI_ERRNO_NOTCAPABLE (UINT16_C(76) )
480
480
481
481
/**
482
482
* File descriptor rights, determining which actions may be performed.
0 commit comments