X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Usermode%2FLibraries%2Flibc.so_src%2Finclude_exp%2Ferrno.h;h=f06706ffc755d147e7145ba3c722f7a792f89c83;hb=70238519b199edb871c392af829400edf79dd41b;hp=ea352f3ba0ee2c6fec290b6f38dd1084ec5a3f04;hpb=d0b4559f2936f6d9f06be0f7c3c51527a480ec0d;p=tpg%2Facess2.git diff --git a/Usermode/Libraries/libc.so_src/include_exp/errno.h b/Usermode/Libraries/libc.so_src/include_exp/errno.h index ea352f3b..f06706ff 100644 --- a/Usermode/Libraries/libc.so_src/include_exp/errno.h +++ b/Usermode/Libraries/libc.so_src/include_exp/errno.h @@ -1,28 +1,21 @@ -#ifndef _ERRNO_H_ -#define _ERRNO_H_ +/** + * Acess2 C Library + * - By John Hodge (thePowersGang) + * + * errno.h + * - Error values and related functions + */ +#ifndef _LIBC_ERRNO_H_ +#define _LIBC_ERRNO_H_ -// TODO: Fully implement errno.h, make sure it matches the kernel one +#include // size_t -extern int _errno; -#define errno _errno +extern int *libc_geterrno(void); +#define errno (*libc_geterrno()) -#define strerror(_x) "Unimplemented" +extern int strerror_r(int errnum, char *buf, size_t buflen); +extern char *strerror(int errnum); -enum -{ - EOK, - EINVAL, - ERANGE, - ENODEV, - EBADF, - EINTR, - EAGAIN, - ENOMEM, - - EADDRNOTAVAIL, - EINPROGRESS, - - E_LAST -}; +#include "errno.enum.h" #endif