summaryrefslogtreecommitdiffstats
path: root/libc/spec
diff options
context:
space:
mode:
Diffstat (limited to 'libc/spec')
-rw-r--r--libc/spec/linux.td66
-rw-r--r--libc/spec/posix.td91
-rw-r--r--libc/spec/stdc.td13
3 files changed, 170 insertions, 0 deletions
diff --git a/libc/spec/linux.td b/libc/spec/linux.td
new file mode 100644
index 00000000000..da6812f8810
--- /dev/null
+++ b/libc/spec/linux.td
@@ -0,0 +1,66 @@
+def Linux : StandardSpec<"Linux"> {
+ HeaderSpec Errno = HeaderSpec<
+ "errno.h",
+ [
+ Macro<"ENOMEDIUM">,
+ Macro<"ENOTBLK">,
+ Macro<"EMEDIUMTYPE">,
+ Macro<"EBADSLT">,
+ Macro<"ECHRNG">,
+ Macro<"ERFKILL">,
+ Macro<"EUSERS">,
+ Macro<"EBADR">,
+ Macro<"EL3HLT">,
+ Macro<"ENOTUNIQ">,
+ Macro<"EXFULL">,
+ Macro<"EHOSTDOWN">,
+ Macro<"EL3RST">,
+ Macro<"ENOPKG">,
+ Macro<"ENOCSI">,
+ Macro<"EUNATCH">,
+ Macro<"EREMCHG">,
+ Macro<"ETOOMANYREFS">,
+ Macro<"EL2HLT">,
+ Macro<"EBADFD">,
+ Macro<"EREMOTEIO">,
+ Macro<"ENAVAIL">,
+ Macro<"ELIBEXEC">,
+ Macro<"ESHUTDOWN">,
+ Macro<"ENOKEY">,
+ Macro<"ESTRPIPE">,
+ Macro<"EKEYREJECTED">,
+ Macro<"ESRMNT">,
+ Macro<"EKEYREVOKED">,
+ Macro<"EBADE">,
+ Macro<"ELIBBAD">,
+ Macro<"EISNAM">,
+ Macro<"EBFONT">,
+ Macro<"EPFNOSUPPORT">,
+ Macro<"EREMOTE">,
+ Macro<"EDEADLOCK">,
+ Macro<"ENONET">,
+ Macro<"EDOTDOT">,
+ Macro<"EKEYEXPIRED">,
+ Macro<"ELIBSCN">,
+ Macro<"ERESTART">,
+ Macro<"EBADRQC">,
+ Macro<"EUCLEAN">,
+ Macro<"ENOANO">,
+ Macro<"ELIBACC">,
+ Macro<"EHWPOISON">,
+ Macro<"ELIBMAX">,
+ Macro<"ESOCKTNOSUPPORT">,
+ Macro<"ENOTNAM">,
+ Macro<"ELNRNG">,
+ Macro<"EL2NSYNC">,
+ Macro<"EADV">,
+ Macro<"ECOMM">,
+ ],
+ [], // Types
+ [] // Functions
+ >;
+
+ let Headers = [
+ Errno,
+ ];
+}
diff --git a/libc/spec/posix.td b/libc/spec/posix.td
new file mode 100644
index 00000000000..ce7fd43aa83
--- /dev/null
+++ b/libc/spec/posix.td
@@ -0,0 +1,91 @@
+def POSIX : StandardSpec<"POSIX"> {
+ HeaderSpec Errno = HeaderSpec<
+ "errno.h",
+ [
+ Macro<"E2BIG">,
+ Macro<"EACCES">,
+ Macro<"EADDRINUSE">,
+ Macro<"EADDRNOTAVAIL">,
+ Macro<"EAFNOSUPPORT">,
+ Macro<"EAGAIN">,
+ Macro<"EALREADY">,
+ Macro<"EBADF">,
+ Macro<"EBADMSG">,
+ Macro<"EBUSY">,
+ Macro<"ECANCELED">,
+ Macro<"ECHILD">,
+ Macro<"ECONNABORTED">,
+ Macro<"ECONNREFUSED">,
+ Macro<"ECONNRESET">,
+ Macro<"EDEADLK">,
+ Macro<"EDESTADDRREQ">,
+ Macro<"EDQUOT">,
+ Macro<"EEXIST">,
+ Macro<"EFAULT">,
+ Macro<"EFBIG">,
+ Macro<"EHOSTUNREACH">,
+ Macro<"EIDRM">,
+ Macro<"EINPROGRESS">,
+ Macro<"EINTR">,
+ Macro<"EINVAL">,
+ Macro<"EIO">,
+ Macro<"EISCONN">,
+ Macro<"EISDIR">,
+ Macro<"ELOOP">,
+ Macro<"EMFILE">,
+ Macro<"EMLINK">,
+ Macro<"EMSGSIZE">,
+ Macro<"EMULTIHOP">,
+ Macro<"ENAMETOOLONG">,
+ Macro<"ENETDOWN">,
+ Macro<"ENETRESET">,
+ Macro<"ENETUNREACH">,
+ Macro<"ENFILE">,
+ Macro<"ENOBUFS">,
+ Macro<"ENODATA">,
+ Macro<"ENODEV">,
+ Macro<"ENOENT">,
+ Macro<"ENOEXEC">,
+ Macro<"ENOLCK">,
+ Macro<"ENOLINK">,
+ Macro<"ENOMEM">,
+ Macro<"ENOMSG">,
+ Macro<"ENOPROTOOPT">,
+ Macro<"ENOSPC">,
+ Macro<"ENOSR">,
+ Macro<"ENOSTR">,
+ Macro<"ENOSYS">,
+ Macro<"ENOTCONN">,
+ Macro<"ENOTDIR">,
+ Macro<"ENOTEMPTY">,
+ Macro<"ENOTRECOVERABLE">,
+ Macro<"ENOTSOCK">,
+ Macro<"ENOTSUP">,
+ Macro<"ENOTTY">,
+ Macro<"ENXIO">,
+ Macro<"EOPNOTSUPP">,
+ Macro<"EOVERFLOW">,
+ Macro<"EOWNERDEAD">,
+ Macro<"EPERM">,
+ Macro<"EPIPE">,
+ Macro<"EPROTO">,
+ Macro<"EPROTONOSUPPORT">,
+ Macro<"EPROTOTYPE">,
+ Macro<"EROFS">,
+ Macro<"ESPIPE">,
+ Macro<"ESRCH">,
+ Macro<"ESTALE">,
+ Macro<"ETIME">,
+ Macro<"ETIMEDOUT">,
+ Macro<"ETXTBSY">,
+ Macro<"EWOULDBLOCK">,
+ Macro<"EXDEV">,
+ ],
+ [], // Types
+ [] // Functions
+ >;
+
+ let Headers = [
+ Errno,
+ ];
+}
diff --git a/libc/spec/stdc.td b/libc/spec/stdc.td
index 154214dc516..a17a3872fa2 100644
--- a/libc/spec/stdc.td
+++ b/libc/spec/stdc.td
@@ -170,7 +170,20 @@ def StdC : StandardSpec<"stdc"> {
]
>;
+ HeaderSpec Errno = HeaderSpec<
+ "errno.h",
+ [
+ Macro<"errno">,
+ Macro<"EDOM">,
+ Macro<"EILSEQ">,
+ Macro<"ERANGE">,
+ ],
+ [], // Types
+ [] // Functions
+ >;
+
let Headers = [
+ Errno,
Math,
String,
StdIO,
OpenPOWER on IntegriCloud