[errno]

# 19 Diagnostics library [[diagnostics]](./#diagnostics)

## 19.4 Error numbers [errno]

### [19.4.1](#general) General [[errno.general]](errno.general)

[1](#general-1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/diagnostics.tex#L522)

The contents of the header <cerrno> are the same as the POSIX header[<errno.h>](support.c.headers.general#header:%3cerrno.h%3e "17.15.1 General [support.c.headers.general]"), except that errno shall be defined as a macro[.](#general-1.sentence-1)

[*Note [1](#general-note-1)*:

The intent is to remain in close alignment with the POSIX standard[.](#general-1.sentence-2)

â *end note*]

A separate errno value is provided for each thread[.](#general-1.sentence-3)

### [19.4.2](#cerrno.syn) Header <cerrno> synopsis [[cerrno.syn]](cerrno.syn)

#define errno *see below*#define E2BIG *see below* // freestanding#define EACCES *see below* // freestanding#define EADDRINUSE *see below* // freestanding#define EADDRNOTAVAIL *see below* // freestanding#define EAFNOSUPPORT *see below* // freestanding#define EAGAIN *see below* // freestanding#define EALREADY *see below* // freestanding#define EBADF *see below* // freestanding#define EBADMSG *see below* // freestanding#define EBUSY *see below* // freestanding#define ECANCELED *see below* // freestanding#define ECHILD *see below* // freestanding#define ECONNABORTED *see below* // freestanding#define ECONNREFUSED *see below* // freestanding#define ECONNRESET *see below* // freestanding#define EDEADLK *see below* // freestanding#define EDESTADDRREQ *see below* // freestanding#define EDOM *see below* // freestanding#define EEXIST *see below* // freestanding#define EFAULT *see below* // freestanding#define EFBIG *see below* // freestanding#define EHOSTUNREACH *see below* // freestanding#define EIDRM *see below* // freestanding#define EILSEQ *see below* // freestanding#define EINPROGRESS *see below* // freestanding#define EINTR *see below* // freestanding#define EINVAL *see below* // freestanding#define EIO *see below* // freestanding#define EISCONN *see below* // freestanding#define EISDIR *see below* // freestanding#define ELOOP *see below* // freestanding#define EMFILE *see below* // freestanding#define EMLINK *see below* // freestanding#define EMSGSIZE *see below* // freestanding#define ENAMETOOLONG *see below* // freestanding#define ENETDOWN *see below* // freestanding#define ENETRESET *see below* // freestanding#define ENETUNREACH *see below* // freestanding#define ENFILE *see below* // freestanding#define ENOBUFS *see below* // freestanding#define ENODEV *see below* // freestanding#define ENOENT *see below* // freestanding#define ENOEXEC *see below* // freestanding#define ENOLCK *see below* // freestanding#define ENOLINK *see below* // freestanding#define ENOMEM *see below* // freestanding#define ENOMSG *see below* // freestanding#define ENOPROTOOPT *see below* // freestanding#define ENOSPC *see below* // freestanding#define ENOSYS *see below* // freestanding#define ENOTCONN *see below* // freestanding#define ENOTDIR *see below* // freestanding#define ENOTEMPTY *see below* // freestanding#define ENOTRECOVERABLE *see below* // freestanding#define ENOTSOCK *see below* // freestanding#define ENOTSUP *see below* // freestanding#define ENOTTY *see below* // freestanding#define ENXIO *see below* // freestanding#define EOPNOTSUPP *see below* // freestanding#define EOVERFLOW *see below* // freestanding#define EOWNERDEAD *see below* // freestanding#define EPERM *see below* // freestanding#define EPIPE *see below* // freestanding#define EPROTO *see below* // freestanding#define EPROTONOSUPPORT *see below* // freestanding#define EPROTOTYPE *see below* // freestanding#define ERANGE *see below* // freestanding#define EROFS *see below* // freestanding#define ESPIPE *see below* // freestanding#define ESRCH *see below* // freestanding#define ETIMEDOUT *see below* // freestanding#define ETXTBSY *see below* // freestanding#define EWOULDBLOCK *see below* // freestanding#define EXDEV *see below* // freestanding

[1](#cerrno.syn-1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/diagnostics.tex#L611)

The meaning of the macros in this header is defined by the POSIX standard[.](#cerrno.syn-1.sentence-1)

See also: ISO/IEC 9899:2024, 7.5
