3 * - By John Hodge (thePowersGang)
10 #include <acess/sys.h>
13 EXPORT int *libc_geterrno()
18 EXPORT char *strerror(int errnum)
22 case EOK: return "Success";
23 case EISDIR: return "Is a directory";
24 case ENOTDIR: return "Not a directory";
25 case ENOSYS: return "Invalid instruction/syscall";
26 case ENOENT: return "No such file or directory";
27 case EINVAL: return "Bad arguments";
28 case EPERM: return "Permissions error";
30 _SysDebug("strerror: errnum=%i unk", errnum);
32 return "unknown error";
36 EXPORT int strerror_r(int errnum, char *buf, size_t bufsiz)
38 const char *str = strerror(errnum);
42 strncpy(buf, str, bufsiz);