56 #ifndef LELY_UTIL_ERRNUM_H_
57 #define LELY_UTIL_ERRNUM_H_
68 #elif _POSIX_C_SOURCE >= 200112L && !defined(__NEWLIB__)
72 #ifndef LELY_UTIL_ERRNUM_INLINE
73 #define LELY_UTIL_ERRNUM_INLINE static inline
382 LELY_UTIL_ERRNUM_INLINE
const char *
errc2str(
int errc);
398 const char *
errc2str_r(
int errc,
char *strerrbuf,
size_t buflen);
423 LELY_UTIL_ERRNUM_INLINE
void
429 LELY_UTIL_ERRNUM_INLINE
const char *
435 LELY_UTIL_ERRNUM_INLINE
const char *
441 LELY_UTIL_ERRNUM_INLINE
const char *
447 LELY_UTIL_ERRNUM_INLINE
const char *
errnum_t errno2num(int errnum)
Transforms a standard C error number to a platform-independent error number.
errnum_t errc2num(int errc)
Transforms a native error code to a platform-independent error number.
const char * errc2str_r(int errc, char *strerrbuf, size_t buflen)
Returns a string describing a native error code.
int errnum2c(errnum_t errnum)
Transforms a platform-independent error number to a native error code.
const char * errnum2str(errnum_t errnum)
Returns a string describing a platform-independent error number.
const char * errno2str_r(int errnum, char *strerrbuf, size_t buflen)
Returns a string describing a standard C error number.
errnum
The platform-independent error numbers.
@ ERRNUM_NOSPC
No space left on device.
@ ERRNUM_AI_MEMORY
There was a memory allocation failure.
@ ERRNUM_NOSYS
Function not supported.
@ ERRNUM_WOULDBLOCK
Operation would block.
@ ERRNUM_OWNERDEAD
Previous owner died.
@ ERRNUM_PROTO
Protocol error.
@ ERRNUM_BADMSG
Bad message.
@ ERRNUM_AFNOSUPPORT
Address family not supported.
@ ERRNUM_NOTCONN
The socket is not connected.
@ ERRNUM_NXIO
No such device or address.
@ ERRNUM_IDRM
Identifier removed.
@ ERRNUM_AI_BADFLAGS
The flags had an invalid value.
@ ERRNUM_RANGE
Result too large.
@ ERRNUM_MSGSIZE
Message too large.
@ ERRNUM_INTR
Interrupted function.
@ ERRNUM_SPIPE
Invalid seek.
@ ERRNUM_ALREADY
Connection already in progress.
@ ERRNUM_NOPROTOOPT
Protocol not available.
@ ERRNUM_BUSY
Device or resource busy.
@ ERRNUM_ISCONN
Socket is connected.
@ ERRNUM_NETDOWN
Network is down.
@ ERRNUM_SRCH
No such process.
@ ERRNUM_MLINK
Too many links.
@ ERRNUM_TIMEDOUT
Connection timed out.
@ ERRNUM_NOENT
No such file or directory.
@ ERRNUM_NFILE
Too many files open in system.
@ ERRNUM_AI_SOCKTYPE
The intended socket type was not recognized.
@ ERRNUM_BADF
Bad file descriptor.
@ ERRNUM_OPNOTSUPP
Operation not supported on socket.
@ ERRNUM_NOTTY
Inappropriate I/O control operation.
@ ERRNUM_PERM
Operation not permitted.
@ ERRNUM_PROTONOSUPPORT
Protocol not supported.
@ ERRNUM_NOMEM
Not enough space.
@ ERRNUM_TIME
Stream ioctl() timeout.
@ ERRNUM_FBIG
File too large.
@ ERRNUM_2BIG
Argument list too long.
@ ERRNUM_NOEXEC
Executable file format error.
@ ERRNUM_NOTSUP
Not supported.
@ ERRNUM_CHILD
No child process.
@ ERRNUM_NOTSOCK
Not a socket.
@ ERRNUM_NOTDIR
Not a directory or a symbolic link to a directory.
@ ERRNUM_MFILE
File descriptor value too large.
@ ERRNUM_ACCES
Permission denied.
@ ERRNUM_ADDRNOTAVAIL
Address not available.
@ ERRNUM_INVAL
Invalid argument.
@ ERRNUM_AI_AGAIN
The name could not be resolved at this time.
@ ERRNUM_CONNABORTED
Connection aborted.
@ ERRNUM_NOTEMPTY
Directory not empty.
@ ERRNUM_AI_FAIL
A non-recoverable error occurred.
@ ERRNUM_PROTOTYPE
Protocol wrong type for socket.
@ ERRNUM_ADDRINUSE
Address in use.
@ ERRNUM_NOMSG
No message of the desired type.
@ ERRNUM_AGAIN
Resource unavailable, try again.
@ ERRNUM_ROFS
Read-only file system.
@ ERRNUM_NOBUFS
No buffer space available.
@ ERRNUM_CONNREFUSED
Connection refused.
@ ERRNUM_DOM
Mathematics argument out of domain of function.
@ ERRNUM_NETRESET
Connection aborted by network.
@ ERRNUM_HOSTUNREACH
Host is unreachable.
@ ERRNUM_DEADLK
Resource deadlock would occur.
@ ERRNUM_EXIST
File exists.
@ ERRNUM_NODATA
No message is available on the STREAM head read queue.
@ ERRNUM_ISDIR
Is a directory.
@ ERRNUM_OVERFLOW
Value too large to be stored in data type.
@ ERRNUM_AI_OVERFLOW
An argument buffer overflowed.
@ ERRNUM_PIPE
Broken pipe.
@ ERRNUM_TXTBSY
Text file busy.
@ ERRNUM_AI_FAMILY
The address family was not recognized or the address length was invalid for the specified family.
@ ERRNUM_NOSR
No STREAM resources.
@ ERRNUM_NOSTR
Not a STREAM.
@ ERRNUM_ILSEQ
Illegal byte sequence.
@ ERRNUM_CONNRESET
Connection reset.
@ ERRNUM_INPROGRESS
Operation in progress.
@ ERRNUM_AI_SERVICE
The service passed was not recognized for the specified socket type.
@ ERRNUM_NODEV
No such device.
@ ERRNUM_FAULT
Bad address.
@ ERRNUM_LOOP
Too many levels of symbolic links.
@ ERRNUM_NETUNREACH
Network unreachable.
@ ERRNUM_AI_NONAME
The name does not resolve for the supplied parameters.
@ ERRNUM_XDEV
Cross-device link.
@ ERRNUM_DESTADDRREQ
Destination address required.
@ ERRNUM_NAMETOOLONG
Filename too long.
@ ERRNUM_CANCELED
Operation canceled.
@ ERRNUM_NOTRECOVERABLE
State not recoverable.
@ ERRNUM_NOLCK
No locks available.
int get_errc(void)
Returns the last (thread-specific) native error code set by a system call or library function.
const char * errno2str(int errnum)
Returns a string describing a standard C error number.
void set_errc(int errc)
Sets the current (thread-specific) native error code to errc.
int errc2no(int errc)
Transforms a native error code to a standard C error number.
const char * errc2str(int errc)
Returns a string describing a native error code.
enum errnum errnum_t
The platform-independent error number type.
int errnum2no(errnum_t errnum)
Transforms a platform-independent error number to a standard C error number.
int errno2c(int errnum)
Transforms a standard C error number to a native error code.
errnum_t get_errnum(void)
Returns the last (thread-specific) platform-independent error number set by a system call or library ...
void set_errnum(errnum_t errnum)
Sets the current (thread-specific) platform-independent error number to errnum.
const char * errnum2str_r(errnum_t errnum, char *strerrbuf, size_t buflen)
Returns a string describing a platform-independent error number.
This header file is part of the Lely libraries; it contains the compiler feature definitions.
This header file is part of the C11 and POSIX compatibility library; it includes <stddef....