2
2
* This file is included multiple times to declare and define a structure
3
3
* with these messages, and then to define a lookup table translating
4
4
* error codes to offsets of corresponding fields in the structure. */
5
-
5
+ #if defined(__EMSCRIPTEN__ )
6
+ // This is intended to match the errno in llvm-libc.
7
+ E (0 , "Success" )
8
+ #else
6
9
E (0 , "No error information" )
10
+ #endif
7
11
8
12
E (EILSEQ , "Illegal byte sequence" )
9
13
E (EDOM , "Domain error" )
@@ -16,7 +20,12 @@ E(ENOENT, "No such file or directory")
16
20
E (ESRCH , "No such process" )
17
21
E (EEXIST , "File exists" )
18
22
23
+ #if defined(__EMSCRIPTEN__ )
24
+ // This is intended to match the errno in llvm-libc.
25
+ E (EOVERFLOW , "Value too large for defined data type" )
26
+ #else
19
27
E (EOVERFLOW , "Value too large for data type" )
28
+ #endif
20
29
E (ENOSPC , "No space left on device" )
21
30
E (ENOMEM , "Out of memory" )
22
31
@@ -62,7 +71,11 @@ E(ENOLCK, "No locks available")
62
71
63
72
E (EDEADLK , "Resource deadlock would occur" )
64
73
E (ENOTRECOVERABLE , "State not recoverable" )
74
+ #if defined(__EMSCRIPTEN__ )
75
+ E (EOWNERDEAD , "Owner died" )
76
+ #else
65
77
E (EOWNERDEAD , "Previous owner died" )
78
+ #endif
66
79
E (ECANCELED , "Operation canceled" )
67
80
E (ENOSYS , "Function not implemented" )
68
81
E (ENOMSG , "No message of desired type" )
0 commit comments