Added a basic errno.h

This commit is contained in:
2024-10-19 15:21:41 +02:00
parent 3c20633acb
commit 13f1d60946
2 changed files with 43 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
#ifndef _ERRNO_H
#define _ERRNO_H
// Basic POSIX defined error idk
enum {
EPERM = 1, // Operation not permitted
ENOENT, // No such file or directory
ESRCH, // No such process
EINTR, // Interrupted system call
EIO, // I/O error
ENXIO, // No such device or address
E2BIG, // Argument list too long
ENOEXEC, // Exec format error
EBADF, // Bad file descriptor
ECHILD, // No child processes
EAGAIN, // Resource temporarily unavailable
ENOMEM, // Out of memory
EACCES, // Permission denied
EFAULT, // Bad address
EBUSY, // Device or resource busy
EEXIST, // File exists
ENOTDIR, // Not a directory
EISDIR, // Is a directory
EINVAL, // Invalid argument
ENFILE, // File table overflow
EMFILE, // Too many open files
ENOTTY, // Not a typewriter
EFBIG, // File too large
ENOSPC, // No space left on device
ESPIPE, // Illegal seek
EROFS, // Read-only file system
EMLINK, // Too many links
EPIPE, // Broken pipe
EDQUOT, // Disk quota exceeded
};
extern int errno;
#endif