From f8f596875349ff7d94b7ac6b8ef2672cf8457b71 Mon Sep 17 00:00:00 2001 From: apio Date: Wed, 9 Nov 2022 11:37:32 +0100 Subject: [PATCH] libc: Define EOVERFLOW and make every dummy errno value unique --- libs/libc/include/errno.h | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/libs/libc/include/errno.h b/libs/libc/include/errno.h index 8b3aa436..53d58486 100644 --- a/libs/libc/include/errno.h +++ b/libs/libc/include/errno.h @@ -44,6 +44,7 @@ extern int errno; #define ENOTEMPTY 39 // Directory not empty. Not implemented. #define ELOOP 40 // Too many levels of symbolic links. Not implemented. #define ENOMSG 42 // No message of desired type. Not implemented. +#define EOVERFLOW 75 // Value too large for defined data type. Not implemented. #define EILSEQ 84 // Invalid or incomplete multibyte or wide character. Not implemented. #define ENOTSOCK 88 // Socket operation on non-socket. Not implemented. #define ENOTSUP 95 // Operation not supported @@ -57,23 +58,23 @@ extern int errno; // FIXME: Right now I don't want to have to order and label these, since we have no net support anyways. #define EADDRNOTAVAIL -1 -#define EAFNOSUPPORT -1 -#define ECONNABORTED -1 -#define ECONNREFUSED -1 -#define EDESTADDRREQ -1 -#define EHOSTUNREACH -1 -#define EINPROGRESS -1 -#define EMSGSIZE -1 -#define ENETDOWN -1 -#define ENETRESET -1 -#define ENETUNREACH -1 -#define ENOBUFS -1 -#define ENOMSG -1 -#define ENOPROTOOPT -1 -#define ENOTCONN -1 -#define ENOTSOCK -1 -#define EPROTONOSUPPORT -1 -#define EPROTOTYPE -1 +#define EAFNOSUPPORT -2 +#define ECONNABORTED -3 +#define ECONNREFUSED -4 +#define EDESTADDRREQ -5 +#define EHOSTUNREACH -6 +#define EINPROGRESS -7 +#define EMSGSIZE -8 +#define ENETDOWN -9 +#define ENETRESET -10 +#define ENETUNREACH -11 +#define ENOBUFS -12 +#define ENOMSG -13 +#define ENOPROTOOPT -14 +#define ENOTCONN -15 +#define ENOTSOCK -16 +#define EPROTONOSUPPORT -17 +#define EPROTOTYPE -18 #ifdef _GNU_SOURCE // Give it only to programs that ask for it. /* Name used to invoke calling program. Same value as argv[0] in main(), but can be used globally. */