switch((enum libc_eErrorNumbers)errnum)
{
case EOK: return "Success";
+ case ERANGE: return "Value out of range";
+ case EDOM: return "Value out of domain";
+ case EILSEQ: return "Illegal character sequence";
+
case ENOSYS: return "Invalid instruction/syscall";
case EINVAL: return "Bad argument(s)";
case EBADF: return "Invalid file";
case ENOMEM: return "No free memory";
case EACCES: return "Not permitted";
case EBUSY: return "Resource is busy";
- case ERANGE: return "Value out of range";
case ENOTFOUND: return "Item not found";
case EROFS: return "Read only filesystem";
case ENOTIMPL: return "Not implimented";
case ENOTTY: return "Not a TTY";
case EAGAIN: return "Try again";
case EFBIG: return "File too big";
+ case E2BIG: return "Value too big";
case EALREADY: return "Operation was no-op";
case EAFNOSUPPORT: return "Address family not supported";
case EINTERNAL: return "Internal error";
enum libc_eErrorNumbers {
EOK,
+ EDOM, // (C99) Value out of domain
+ EILSEQ, // (C99) Illegal multi-byte sequence
+ ERANGE, // (C99) Value out of range
+
ENOSYS, // Invalid Instruction
EINVAL, // Invalid Paramater
EBADF, // Bad FD
ENOMEM, // No free memory
EACCES, // Not permitted
EBUSY, // Resource is busy
- ERANGE, // Value out of range
ENOTFOUND, // Item not found
EROFS, // Read only
ENOTIMPL, // Not implemented
EALREADY, // Operation was a NOP
EFBIG, // File too large
+ E2BIG, // Argument list too large
// psockets
EAFNOSUPPORT,
unsigned long long strtoull(const char *str, char **end, int base)
{
- long long ret = 0;
+ unsigned long long ret = 0;
if( !str || base < 0 || base > 36 || base == 1 ) {
if(end)
//_SysDebug("strtoll - neg=%i,ret=%llu", neg, ret);
if( neg ) {
- if( -ret < LLONG_MIN ) {
+ if( ret + LLONG_MIN > 0 ) {
errno = ERANGE;
return LLONG_MIN;
}