fxlibc/include/errno.h
2021-12-30 18:18:54 +01:00

34 lines
1.3 KiB
C

#ifndef __ERRNO_H__
# define __ERRNO_H__
#ifdef __cplusplus
extern "C" {
#endif
/* Initialized to 0 at startup. Currently not TLS, maybe in the future if
threads are supported. */
extern int errno;
#define EDOM 1 /* Outside of domain of math function. */
#define EILSEQ 2 /* Illegal multi-byte character sequence. */
#define ERANGE 3 /* Range error during text-to-numeric conversion. */
#define EACCES 4 /* File access denied. */
#define EEXIST 5 /* File already exists. */
#define EINVAL 6 /* Invalid argument in general; lots of uses. */
#define ENFILE 7 /* Out of file descriptors. */
#define ENOENT 8 /* File or folder does not exist. */
#define ENOMEM 9 /* System ran out of memory (RAM). */
#define EDQUOT 10 /* Out of inodes or memory space. */
#define ENOSPC 11 /* No space left on device. */
#define ENOTSUP 12 /* Operation not supported. */
#define EBADF 13 /* Invalid file descriptor. */
#define ESPIPE 14 /* File descriptor is unable to seek. */
#define EISDIR 15 /* File descriptor is a directory. */
#define ENOTDIR 16 /* File descriptor is not a directory. */
#define ENOTEMPTY 17 /* Directory is not empty. */
#ifdef __cplusplus
}
#endif
#endif /*__ERRNO_H__*/