2 ** Copyright 2002, Travis Geiselbrecht. All rights reserved.
3 ** Copyright 2002, Manuel J. Petit. All rights reserved.
4 ** Distributed under the terms of the NewOS License.
7 #ifndef _newos__errno__hh_
8 #define _newos__errno__hh_
10 #include <newos/errors.h>
19 * this will change when we get TLS working
22 #define __WITH_ERRNO 0
24 #define __WITH_ERRNO 1
31 /* mapping posix errors to system errors */
32 #define EPERM ERR_PERMISSION_DENIED
33 #define ENOENT ERR_NOT_FOUND
36 #define EIO ERR_IO_ERROR
38 #define E2BIG ERR_TOO_BIG
40 #define EBADF ERR_INVALID_HANDLE
43 #define ENOMEM ERR_NO_MEMORY
44 #define EACCES ERR_PERMISSION_DENIED
47 #define EEXIST ERR_VFS_ALREADY_EXISTS
49 #define ENODEV ERR_VFS_WRONG_STREAM_TYPE
50 #define ENOTDIR ERR_VFS_NOT_DIR
52 #define EINVAL ERR_INVALID_ARGS
53 #define ENFILE ERR_NO_MORE_HANDLES
54 #define EMFILE ERR_NO_MORE_HANDLES
58 #define EROFS ERR_VFS_READONLY_FS
60 #define EPIPE ERR_PIPE_WIDOW
63 #define ERANGE ERR_OUT_OF_RANGE
72 //#define EDESTADDRREQ
76 //#define EPROTONOSUPPORT
77 //#define ESOCKTNOSUPPORT
80 //#define EPFNOSUPPORT
81 //#define EAFNOSUPPORT
83 //#define EADDRNOTAVAIL
93 #if defined(__cplusplus) && !defined(_NEWOS_NO_LIBC_COMPAT)