From b2e24fb097a0715e35a84cbbb79053614481af1a Mon Sep 17 00:00:00 2001 From: Tom-on64 Date: Sat, 19 Oct 2024 15:39:05 +0200 Subject: [PATCH] Improved errno.h --- libc/errno/errno.c | 2 +- libc/include/errno.h | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/libc/errno/errno.c b/libc/errno/errno.c index 2126ddb..fd29150 100644 --- a/libc/errno/errno.c +++ b/libc/errno/errno.c @@ -1,4 +1,4 @@ #include -_errno_t errno = 0; +int errno = 0; diff --git a/libc/include/errno.h b/libc/include/errno.h index 4d26153..536959e 100644 --- a/libc/include/errno.h +++ b/libc/include/errno.h @@ -21,10 +21,13 @@ enum { EEXIST, // File exists ENOTDIR, // Not a directory EISDIR, // Is a directory + EIMPL, // TODO: Implementation defined + ENOMSG, // No message of desired type EINVAL, // Invalid argument ENFILE, // File table overflow EMFILE, // Too many open files ENOTTY, // Not a typewriter + ETXTBSY, // Text file busy EFBIG, // File too large ENOSPC, // No space left on device ESPIPE, // Illegal seek @@ -32,6 +35,10 @@ enum { EMLINK, // Too many links EPIPE, // Broken pipe EDQUOT, // Disk quota exceeded + EDOM, // Function arg domain error + ERANGE, // Out of range + // TODO: more + EILSEQ = 42,// Invalid byte seqence }; extern int errno;