3 * - By John Hodge (thePowersGang)
11 #include <acess/sys.h>
13 EXPORT int *libc_geterrno()
18 EXPORT const char *strerror(int errnum)
22 case ENOSYS: return "Invalid instruction/syscall";
23 case ENOENT: return "No such file or directory";
24 case EINVAL: return "Bad arguments";
25 case EPERM: return "Permissions error";
27 _SysDebug("strerror: errnum=%i unk", errnum);
28 return "unknown error";
33 EXPORT void perror(const char *s)
37 fprintf(stderr, "%s: (%i) %s\n", s, err, strerror(err));
40 fprintf(stderr, "(%i) %s\n", err, strerror(err));
42 _SysDebug("perror('%s'): %s (%i)", s, strerror(err), err);