Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/header/cerrno"

From cppreference.com
< cpp‎ | header
m (See also)
(Applied P2338R4 (Freestanding Library: Character primitives and the C library).)
 
Line 7: Line 7:
 
===Macros===
 
===Macros===
 
{{dsc begin}}
 
{{dsc begin}}
{{dsc inc | cpp/error/dsc errno}}
+
{{dsc inc|cpp/error/dsc errno}}
{{dsc macro const | E2BIG           | nolink=true| notes={{mark c++11}} | Argument list too long }}
+
{{dsc macro const|E2BIG           |nolink=true|notes={{mark c++11}}|Argument list too long}}
{{dsc macro const | EACCES           | nolink=true| notes={{mark c++11}} | Permission denied}}
+
{{dsc macro const|EACCES         |nolink=true|notes={{mark c++11}}|Permission denied}}
{{dsc macro const | EADDRINUSE       | nolink=true| notes={{mark c++11}} | Address in use}}
+
{{dsc macro const|EADDRINUSE     |nolink=true|notes={{mark c++11}}|Address in use}}
{{dsc macro const | EADDRNOTAVAIL   | nolink=true| notes={{mark c++11}} | Address not available}}
+
{{dsc macro const|EADDRNOTAVAIL   |nolink=true|notes={{mark c++11}}|Address not available}}
{{dsc macro const | EAFNOSUPPORT     | nolink=true| notes={{mark c++11}} | Address family not supported}}
+
{{dsc macro const|EAFNOSUPPORT   |nolink=true|notes={{mark c++11}}|Address family not supported}}
{{dsc macro const | EAGAIN           | nolink=true| notes={{mark c++11}} | Resource unavailable, try again}}
+
{{dsc macro const|EAGAIN         |nolink=true|notes={{mark c++11}}|Resource unavailable, try again}}
{{dsc macro const | EALREADY         | nolink=true| notes={{mark c++11}} | Connection already in progress}}
+
{{dsc macro const|EALREADY       |nolink=true|notes={{mark c++11}}|Connection already in progress}}
{{dsc macro const | EBADF           | nolink=true| notes={{mark c++11}} | Bad file descriptor}}
+
{{dsc macro const|EBADF           |nolink=true|notes={{mark c++11}}|Bad file descriptor}}
{{dsc macro const | EBADMSG         | nolink=true| notes={{mark c++11}} | Bad message}}
+
{{dsc macro const|EBADMSG         |nolink=true|notes={{mark c++11}}|Bad message}}
{{dsc macro const | EBUSY           | nolink=true| notes={{mark c++11}} | Device or resource busy}}
+
{{dsc macro const|EBUSY           |nolink=true|notes={{mark c++11}}|Device or resource busy}}
{{dsc macro const | ECANCELED       | nolink=true| notes={{mark c++11}} | Operation canceled}}
+
{{dsc macro const|ECANCELED       |nolink=true|notes={{mark c++11}}|Operation canceled}}
{{dsc macro const | ECHILD           | nolink=true| notes={{mark c++11}} | No child processes}}
+
{{dsc macro const|ECHILD         |nolink=true|notes={{mark c++11}}|No child processes}}
{{dsc macro const | ECONNABORTED     | nolink=true| notes={{mark c++11}} | Connection aborted}}
+
{{dsc macro const|ECONNABORTED   |nolink=true|notes={{mark c++11}}|Connection aborted}}
{{dsc macro const | ECONNREFUSED     | nolink=true| notes={{mark c++11}} | Connection refused}}
+
{{dsc macro const|ECONNREFUSED   |nolink=true|notes={{mark c++11}}|Connection refused}}
{{dsc macro const | ECONNRESET       | nolink=true| notes={{mark c++11}} | Connection reset}}
+
{{dsc macro const|ECONNRESET     |nolink=true|notes={{mark c++11}}|Connection reset}}
{{dsc macro const | EDEADLK         | nolink=true| notes={{mark c++11}} | Resource deadlock would occur}}
+
{{dsc macro const|EDEADLK         |nolink=true|notes={{mark c++11}}|Resource deadlock would occur}}
{{dsc macro const | EDESTADDRREQ     | nolink=true| notes={{mark c++11}} | Destination address required}}
+
{{dsc macro const|EDESTADDRREQ   |nolink=true|notes={{mark c++11}}|Destination address required}}
{{dsc macro const | EDOM             | nolink=true                       | Mathematics argument out of domain of function}}
+
{{dsc macro const|EDOM           |nolink=true                     |Mathematics argument out of domain of function}}
{{dsc macro const | EEXIST           | nolink=true| notes={{mark c++11}} | File exists}}
+
{{dsc macro const|EEXIST         |nolink=true|notes={{mark c++11}}|File exists}}
{{dsc macro const | EFAULT           | nolink=true| notes={{mark c++11}} | Bad address}}
+
{{dsc macro const|EFAULT         |nolink=true|notes={{mark c++11}}|Bad address}}
{{dsc macro const | EFBIG           | nolink=true| notes={{mark c++11}} | File too large}}
+
{{dsc macro const|EFBIG           |nolink=true|notes={{mark c++11}}|File too large}}
{{dsc macro const | EHOSTUNREACH     | nolink=true| notes={{mark c++11}} | Host is unreachable}}
+
{{dsc macro const|EHOSTUNREACH   |nolink=true|notes={{mark c++11}}|Host is unreachable}}
{{dsc macro const | EIDRM           | nolink=true| notes={{mark c++11}} | Identifier removed}}
+
{{dsc macro const|EIDRM           |nolink=true|notes={{mark c++11}}|Identifier removed}}
{{dsc macro const | EILSEQ           | nolink=true                       | Illegal byte sequence}}
+
{{dsc macro const|EILSEQ         |nolink=true                     |Illegal byte sequence}}
{{dsc macro const | EINPROGRESS     | nolink=true| notes={{mark c++11}} | Operation in progress}}
+
{{dsc macro const|EINPROGRESS     |nolink=true|notes={{mark c++11}}|Operation in progress}}
{{dsc macro const | EINTR           | nolink=true| notes={{mark c++11}} | Interrupted function}}
+
{{dsc macro const|EINTR           |nolink=true|notes={{mark c++11}}|Interrupted function}}
{{dsc macro const | EINVAL           | nolink=true| notes={{mark c++11}} | Invalid argument}}
+
{{dsc macro const|EINVAL         |nolink=true|notes={{mark c++11}}|Invalid argument}}
{{dsc macro const | EIO             | nolink=true| notes={{mark c++11}} | I/O error}}
+
{{dsc macro const|EIO             |nolink=true|notes={{mark c++11}}|I/O error}}
{{dsc macro const | EISCONN         | nolink=true| notes={{mark c++11}} | Socket is connected}}
+
{{dsc macro const|EISCONN         |nolink=true|notes={{mark c++11}}|Socket is connected}}
{{dsc macro const | EISDIR           | nolink=true| notes={{mark c++11}} | Is a directory}}
+
{{dsc macro const|EISDIR         |nolink=true|notes={{mark c++11}}|Is a directory}}
{{dsc macro const | ELOOP           | nolink=true| notes={{mark c++11}} | Too many levels of symbolic links}}
+
{{dsc macro const|ELOOP           |nolink=true|notes={{mark c++11}}|Too many levels of symbolic links}}
{{dsc macro const | EMFILE           | nolink=true| notes={{mark c++11}} | File descriptor value too large}}
+
{{dsc macro const|EMFILE         |nolink=true|notes={{mark c++11}}|File descriptor value too large}}
{{dsc macro const | EMLINK           | nolink=true| notes={{mark c++11}} | Too many links}}
+
{{dsc macro const|EMLINK         |nolink=true|notes={{mark c++11}}|Too many links}}
{{dsc macro const | EMSGSIZE         | nolink=true| notes={{mark c++11}} | Message too large}}
+
{{dsc macro const|EMSGSIZE       |nolink=true|notes={{mark c++11}}|Message too large}}
{{dsc macro const | ENAMETOOLONG     | nolink=true| notes={{mark c++11}} | Filename too long}}
+
{{dsc macro const|ENAMETOOLONG   |nolink=true|notes={{mark c++11}}|Filename too long}}
{{dsc macro const | ENETDOWN         | nolink=true| notes={{mark c++11}} | Network is down}}
+
{{dsc macro const|ENETDOWN       |nolink=true|notes={{mark c++11}}|Network is down}}
{{dsc macro const | ENETRESET       | nolink=true| notes={{mark c++11}} | Connection aborted by network}}
+
{{dsc macro const|ENETRESET       |nolink=true|notes={{mark c++11}}|Connection aborted by network}}
{{dsc macro const | ENETUNREACH     | nolink=true| notes={{mark c++11}} | Network unreachable}}
+
{{dsc macro const|ENETUNREACH     |nolink=true|notes={{mark c++11}}|Network unreachable}}
{{dsc macro const | ENFILE           | nolink=true| notes={{mark c++11}} | Too many files open in system}}
+
{{dsc macro const|ENFILE         |nolink=true|notes={{mark c++11}}|Too many files open in system}}
{{dsc macro const | ENOBUFS         | nolink=true| notes={{mark c++11}} | No buffer space available}}
+
{{dsc macro const|ENOBUFS         |nolink=true|notes={{mark c++11}}|No buffer space available}}
{{dsc macro const | ENODATA         | nolink=true| notes={{mark c++11}} {{mark deprecated c++23}} | No message is available on the STREAM head read queue}}
+
{{dsc macro const|ENODATA         |nolink=true|notes={{mark c++11}} {{mark deprecated c++23}}|No message is available on the STREAM head read queue}}
{{dsc macro const | ENODEV           | nolink=true| notes={{mark c++11}} | No such device}}
+
{{dsc macro const|ENODEV         |nolink=true|notes={{mark c++11}}|No such device}}
{{dsc macro const | ENOENT           | nolink=true| notes={{mark c++11}} | No such file or directory}}
+
{{dsc macro const|ENOENT         |nolink=true|notes={{mark c++11}}|No such file or directory}}
{{dsc macro const | ENOEXEC         | nolink=true| notes={{mark c++11}} | Executable file format error}}
+
{{dsc macro const|ENOEXEC         |nolink=true|notes={{mark c++11}}|Executable file format error}}
{{dsc macro const | ENOLCK           | nolink=true| notes={{mark c++11}} | No locks available}}
+
{{dsc macro const|ENOLCK         |nolink=true|notes={{mark c++11}}|No locks available}}
{{dsc macro const | ENOLINK         | nolink=true| notes={{mark c++11}} | Link has been severed}}
+
{{dsc macro const|ENOLINK         |nolink=true|notes={{mark c++11}}|Link has been severed}}
{{dsc macro const | ENOMEM           | nolink=true| notes={{mark c++11}} | Not enough space}}
+
{{dsc macro const|ENOMEM         |nolink=true|notes={{mark c++11}}|Not enough space}}
{{dsc macro const | ENOMSG           | nolink=true| notes={{mark c++11}} | No message of the desired type}}
+
{{dsc macro const|ENOMSG         |nolink=true|notes={{mark c++11}}|No message of the desired type}}
{{dsc macro const | ENOPROTOOPT     | nolink=true| notes={{mark c++11}} | Protocol not available}}
+
{{dsc macro const|ENOPROTOOPT     |nolink=true|notes={{mark c++11}}|Protocol not available}}
{{dsc macro const | ENOSPC           | nolink=true| notes={{mark c++11}} | No space left on device}}
+
{{dsc macro const|ENOSPC         |nolink=true|notes={{mark c++11}}|No space left on device}}
{{dsc macro const | ENOSR           | nolink=true| notes={{mark c++11}} {{mark deprecated c++23}} | No STREAM resources}}
+
{{dsc macro const|ENOSR           |nolink=true|notes={{mark c++11}} {{mark deprecated c++23}}|No STREAM resources}}
{{dsc macro const | ENOSTR           | nolink=true| notes={{mark c++11}} {{mark deprecated c++23}} | Not a STREAM}}
+
{{dsc macro const|ENOSTR         |nolink=true|notes={{mark c++11}} {{mark deprecated c++23}}|Not a STREAM}}
{{dsc macro const | ENOSYS           | nolink=true| notes={{mark c++11}} | Function not supported}}
+
{{dsc macro const|ENOSYS         |nolink=true|notes={{mark c++11}}|Function not supported}}
{{dsc macro const | ENOTCONN         | nolink=true| notes={{mark c++11}} | The socket is not connected}}
+
{{dsc macro const|ENOTCONN       |nolink=true|notes={{mark c++11}}|The socket is not connected}}
{{dsc macro const | ENOTDIR         | nolink=true| notes={{mark c++11}} | Not a directory}}
+
{{dsc macro const|ENOTDIR         |nolink=true|notes={{mark c++11}}|Not a directory}}
{{dsc macro const | ENOTEMPTY       | nolink=true| notes={{mark c++11}} | Directory not empty}}
+
{{dsc macro const|ENOTEMPTY       |nolink=true|notes={{mark c++11}}|Directory not empty}}
{{dsc macro const | ENOTRECOVERABLE | nolink=true| notes={{mark c++11}} | State not recoverable}}
+
{{dsc macro const|ENOTRECOVERABLE |nolink=true|notes={{mark c++11}}|State not recoverable}}
{{dsc macro const | ENOTSOCK         | nolink=true| notes={{mark c++11}} | Not a socket}}
+
{{dsc macro const|ENOTSOCK       |nolink=true|notes={{mark c++11}}|Not a socket}}
{{dsc macro const | ENOTSUP         | nolink=true| notes={{mark c++11}} | Not supported}}
+
{{dsc macro const|ENOTSUP         |nolink=true|notes={{mark c++11}}|Not supported}}
{{dsc macro const | ENOTTY           | nolink=true| notes={{mark c++11}} | Inappropriate I/O control operation}}
+
{{dsc macro const|ENOTTY         |nolink=true|notes={{mark c++11}}|Inappropriate I/O control operation}}
{{dsc macro const | ENXIO           | nolink=true| notes={{mark c++11}} | No such device or address}}
+
{{dsc macro const|ENXIO           |nolink=true|notes={{mark c++11}}|No such device or address}}
{{dsc macro const | EOPNOTSUPP       | nolink=true| notes={{mark c++11}} | Operation not supported on socket}}
+
{{dsc macro const|EOPNOTSUPP     |nolink=true|notes={{mark c++11}}|Operation not supported on socket}}
{{dsc macro const | EOVERFLOW       | nolink=true| notes={{mark c++11}} | Value too large to be stored in data type}}
+
{{dsc macro const|EOVERFLOW       |nolink=true|notes={{mark c++11}}|Value too large to be stored in data type}}
{{dsc macro const | EOWNERDEAD       | nolink=true| notes={{mark c++11}} | Previous owner died}}
+
{{dsc macro const|EOWNERDEAD     |nolink=true|notes={{mark c++11}}|Previous owner died}}
{{dsc macro const | EPERM           | nolink=true| notes={{mark c++11}} | Operation not permitted}}
+
{{dsc macro const|EPERM           |nolink=true|notes={{mark c++11}}|Operation not permitted}}
{{dsc macro const | EPIPE           | nolink=true| notes={{mark c++11}} | Broken pipe}}
+
{{dsc macro const|EPIPE           |nolink=true|notes={{mark c++11}}|Broken pipe}}
{{dsc macro const | EPROTO           | nolink=true| notes={{mark c++11}} | Protocol error}}
+
{{dsc macro const|EPROTO         |nolink=true|notes={{mark c++11}}|Protocol error}}
{{dsc macro const | EPROTONOSUPPORT | nolink=true| notes={{mark c++11}} | Protocol not supported}}
+
{{dsc macro const|EPROTONOSUPPORT |nolink=true|notes={{mark c++11}}|Protocol not supported}}
{{dsc macro const | EPROTOTYPE       | nolink=true| notes={{mark c++11}} | Protocol wrong type for socket}}
+
{{dsc macro const|EPROTOTYPE     |nolink=true|notes={{mark c++11}}|Protocol wrong type for socket}}
{{dsc macro const | ERANGE           | nolink=true|                       Result too large}}
+
{{dsc macro const|ERANGE         |nolink=true|                     Result too large}}
{{dsc macro const | EROFS           | nolink=true| notes={{mark c++11}} | Read-only file system}}
+
{{dsc macro const|EROFS           |nolink=true|notes={{mark c++11}}|Read-only file system}}
{{dsc macro const | ESPIPE           | nolink=true| notes={{mark c++11}} | Invalid seek}}
+
{{dsc macro const|ESPIPE         |nolink=true|notes={{mark c++11}}|Invalid seek}}
{{dsc macro const | ESRCH           | nolink=true| notes={{mark c++11}} | No such process}}
+
{{dsc macro const|ESRCH           |nolink=true|notes={{mark c++11}}|No such process}}
{{dsc macro const | ETIME           | nolink=true| notes={{mark c++11}} {{mark deprecated c++23}} | Stream {{tt|ioctl()}} timeout}}
+
{{dsc macro const|ETIME           |nolink=true|notes={{mark c++11}} {{mark deprecated c++23}}|Stream {{tt|ioctl()}} timeout}}
{{dsc macro const | ETIMEDOUT       | nolink=true| notes={{mark c++11}} | Connection timed out}}
+
{{dsc macro const|ETIMEDOUT       |nolink=true|notes={{mark c++11}}|Connection timed out}}
{{dsc macro const | ETXTBSY         | nolink=true| notes={{mark c++11}} | Text file busy}}
+
{{dsc macro const|ETXTBSY         |nolink=true|notes={{mark c++11}}|Text file busy}}
{{dsc macro const | EWOULDBLOCK     | nolink=true| notes={{mark c++11}} | Operation would block}}
+
{{dsc macro const|EWOULDBLOCK     |nolink=true|notes={{mark c++11}}|Operation would block}}
{{dsc macro const | EXDEV           | nolink=true| notes={{mark c++11}} | Cross-device link}}
+
{{dsc macro const|EXDEV           |nolink=true|notes={{mark c++11}}|Cross-device link}}
 
{{dsc end}}
 
{{dsc end}}
  
 
===Notes===
 
===Notes===
 
Although the header {{tt|<cerrno>}} is based on the C standard library header {{header|errno.h|lang=c}}, the majority of the macros defined by {{tt|<cerrno>}} were adopted by C++ from the POSIX standard, rather than the C standard library.
 
Although the header {{tt|<cerrno>}} is based on the C standard library header {{header|errno.h|lang=c}}, the majority of the macros defined by {{tt|<cerrno>}} were adopted by C++ from the POSIX standard, rather than the C standard library.
 +
 +
===Synopsis===
 +
{{source|
 +
#define errno /* see description */
 +
#define E2BIG /* see description */          // freestanding
 +
#define EACCES /* see description */          // freestanding
 +
#define EADDRINUSE /* see description */      // freestanding
 +
#define EADDRNOTAVAIL /* see description */  // freestanding
 +
#define EAFNOSUPPORT /* see description */    // freestanding
 +
#define EAGAIN /* see description */          // freestanding
 +
#define EALREADY /* see description */        // freestanding
 +
#define EBADF /* see description */          // freestanding
 +
#define EBADMSG /* see description */        // freestanding
 +
#define EBUSY /* see description */          // freestanding
 +
#define ECANCELED /* see description */      // freestanding
 +
#define ECHILD /* see description */          // freestanding
 +
#define ECONNABORTED /* see description */    // freestanding
 +
#define ECONNREFUSED /* see description */    // freestanding
 +
#define ECONNRESET /* see description */      // freestanding
 +
#define EDEADLK /* see description */        // freestanding
 +
#define EDESTADDRREQ /* see description */    // freestanding
 +
#define EDOM /* see description */            // freestanding
 +
#define EEXIST /* see description */          // freestanding
 +
#define EFAULT /* see description */          // freestanding
 +
#define EFBIG /* see description */          // freestanding
 +
#define EHOSTUNREACH /* see description */    // freestanding
 +
#define EIDRM /* see description */          // freestanding
 +
#define EILSEQ /* see description */          // freestanding
 +
#define EINPROGRESS /* see description */    // freestanding
 +
#define EINTR /* see description */          // freestanding
 +
#define EINVAL /* see description */          // freestanding
 +
#define EIO /* see description */            // freestanding
 +
#define EISCONN /* see description */        // freestanding
 +
#define EISDIR /* see description */          // freestanding
 +
#define ELOOP /* see description */          // freestanding
 +
#define EMFILE /* see description */          // freestanding
 +
#define EMLINK /* see description */          // freestanding
 +
#define EMSGSIZE /* see description */        // freestanding
 +
#define ENAMETOOLONG /* see description */    // freestanding
 +
#define ENETDOWN /* see description */        // freestanding
 +
#define ENETRESET /* see description */      // freestanding
 +
#define ENETUNREACH /* see description */    // freestanding
 +
#define ENFILE /* see description */          // freestanding
 +
#define ENOBUFS /* see description */        // freestanding
 +
#define ENODEV /* see description */          // freestanding
 +
#define ENOENT /* see description */          // freestanding
 +
#define ENOEXEC /* see description */        // freestanding
 +
#define ENOLCK /* see description */          // freestanding
 +
#define ENOLINK /* see description */        // freestanding
 +
#define ENOMEM /* see description */          // freestanding
 +
#define ENOMSG /* see description */          // freestanding
 +
#define ENOPROTOOPT /* see description */    // freestanding
 +
#define ENOSPC /* see description */          // freestanding
 +
#define ENOSYS /* see description */          // freestanding
 +
#define ENOTCONN /* see description */        // freestanding
 +
#define ENOTDIR /* see description */        // freestanding
 +
#define ENOTEMPTY /* see description */      // freestanding
 +
#define ENOTRECOVERABLE /* see description */ // freestanding
 +
#define ENOTSOCK /* see description */        // freestanding
 +
#define ENOTSUP /* see description */        // freestanding
 +
#define ENOTTY /* see description */          // freestanding
 +
#define ENXIO /* see description */          // freestanding
 +
#define EOPNOTSUPP /* see description */      // freestanding
 +
#define EOVERFLOW /* see description */      // freestanding
 +
#define EOWNERDEAD /* see description */      // freestanding
 +
#define EPERM /* see description */          // freestanding
 +
#define EPIPE /* see description */          // freestanding
 +
#define EPROTO /* see description */          // freestanding
 +
#define EPROTONOSUPPORT /* see description */ // freestanding
 +
#define EPROTOTYPE /* see description */      // freestanding
 +
#define ERANGE /* see description */          // freestanding
 +
#define EROFS /* see description */          // freestanding
 +
#define ESPIPE /* see description */          // freestanding
 +
#define ESRCH /* see description */          // freestanding
 +
#define ETIMEDOUT /* see description */      // freestanding
 +
#define ETXTBSY /* see description */        // freestanding
 +
#define EWOULDBLOCK /* see description */    // freestanding
 +
#define EXDEV /* see description */          // freestanding
 +
}}
  
 
===Defect reports===
 
===Defect reports===
Line 97: Line 176:
  
 
===See also===
 
===See also===
* [[cpp/error/errno_macros|Description for the error number values]]
+
* [[cpp/error/errno macros|Description for the error number values]]
  
 
{{langlinks|es|ja|ru|zh}}
 
{{langlinks|es|ja|ru|zh}}

Latest revision as of 01:02, 13 September 2023

 
 
Standard library headers
 

This header was originally in the C standard library as <errno.h>.

This header is part of the error handling library.

Contents

[edit] Macros

macro which expands to POSIX-compatible thread-local error number variable
(macro variable)[edit]
E2BIG
(C++11)
Argument list too long
(macro constant)
EACCES
(C++11)
Permission denied
(macro constant)
EADDRINUSE
(C++11)
Address in use
(macro constant)
EADDRNOTAVAIL
(C++11)
Address not available
(macro constant)
EAFNOSUPPORT
(C++11)
Address family not supported
(macro constant)
EAGAIN
(C++11)
Resource unavailable, try again
(macro constant)
EALREADY
(C++11)
Connection already in progress
(macro constant)
EBADF
(C++11)
Bad file descriptor
(macro constant)
EBADMSG
(C++11)
Bad message
(macro constant)
EBUSY
(C++11)
Device or resource busy
(macro constant)
ECANCELED
(C++11)
Operation canceled
(macro constant)
ECHILD
(C++11)
No child processes
(macro constant)
ECONNABORTED
(C++11)
Connection aborted
(macro constant)
ECONNREFUSED
(C++11)
Connection refused
(macro constant)
ECONNRESET
(C++11)
Connection reset
(macro constant)
EDEADLK
(C++11)
Resource deadlock would occur
(macro constant)
EDESTADDRREQ
(C++11)
Destination address required
(macro constant)
EDOM
Mathematics argument out of domain of function
(macro constant)
EEXIST
(C++11)
File exists
(macro constant)
EFAULT
(C++11)
Bad address
(macro constant)
EFBIG
(C++11)
File too large
(macro constant)
EHOSTUNREACH
(C++11)
Host is unreachable
(macro constant)
EIDRM
(C++11)
Identifier removed
(macro constant)
EILSEQ
Illegal byte sequence
(macro constant)
EINPROGRESS
(C++11)
Operation in progress
(macro constant)
EINTR
(C++11)
Interrupted function
(macro constant)
EINVAL
(C++11)
Invalid argument
(macro constant)
EIO
(C++11)
I/O error
(macro constant)
EISCONN
(C++11)
Socket is connected
(macro constant)
EISDIR
(C++11)
Is a directory
(macro constant)
ELOOP
(C++11)
Too many levels of symbolic links
(macro constant)
EMFILE
(C++11)
File descriptor value too large
(macro constant)
EMLINK
(C++11)
Too many links
(macro constant)
EMSGSIZE
(C++11)
Message too large
(macro constant)
ENAMETOOLONG
(C++11)
Filename too long
(macro constant)
ENETDOWN
(C++11)
Network is down
(macro constant)
ENETRESET
(C++11)
Connection aborted by network
(macro constant)
ENETUNREACH
(C++11)
Network unreachable
(macro constant)
ENFILE
(C++11)
Too many files open in system
(macro constant)
ENOBUFS
(C++11)
No buffer space available
(macro constant)
ENODATA
(C++11) (deprecated in C++23)
No message is available on the STREAM head read queue
(macro constant)
ENODEV
(C++11)
No such device
(macro constant)
ENOENT
(C++11)
No such file or directory
(macro constant)
ENOEXEC
(C++11)
Executable file format error
(macro constant)
ENOLCK
(C++11)
No locks available
(macro constant)
ENOLINK
(C++11)
Link has been severed
(macro constant)
ENOMEM
(C++11)
Not enough space
(macro constant)
ENOMSG
(C++11)
No message of the desired type
(macro constant)
ENOPROTOOPT
(C++11)
Protocol not available
(macro constant)
ENOSPC
(C++11)
No space left on device
(macro constant)
ENOSR
(C++11) (deprecated in C++23)
No STREAM resources
(macro constant)
ENOSTR
(C++11) (deprecated in C++23)
Not a STREAM
(macro constant)
ENOSYS
(C++11)
Function not supported
(macro constant)
ENOTCONN
(C++11)
The socket is not connected
(macro constant)
ENOTDIR
(C++11)
Not a directory
(macro constant)
ENOTEMPTY
(C++11)
Directory not empty
(macro constant)
ENOTRECOVERABLE
(C++11)
State not recoverable
(macro constant)
ENOTSOCK
(C++11)
Not a socket
(macro constant)
ENOTSUP
(C++11)
Not supported
(macro constant)
ENOTTY
(C++11)
Inappropriate I/O control operation
(macro constant)
ENXIO
(C++11)
No such device or address
(macro constant)
EOPNOTSUPP
(C++11)
Operation not supported on socket
(macro constant)
EOVERFLOW
(C++11)
Value too large to be stored in data type
(macro constant)
EOWNERDEAD
(C++11)
Previous owner died
(macro constant)
EPERM
(C++11)
Operation not permitted
(macro constant)
EPIPE
(C++11)
Broken pipe
(macro constant)
EPROTO
(C++11)
Protocol error
(macro constant)
EPROTONOSUPPORT
(C++11)
Protocol not supported
(macro constant)
EPROTOTYPE
(C++11)
Protocol wrong type for socket
(macro constant)
ERANGE
Result too large
(macro constant)
EROFS
(C++11)
Read-only file system
(macro constant)
ESPIPE
(C++11)
Invalid seek
(macro constant)
ESRCH
(C++11)
No such process
(macro constant)
ETIME
(C++11) (deprecated in C++23)
Stream ioctl() timeout
(macro constant)
ETIMEDOUT
(C++11)
Connection timed out
(macro constant)
ETXTBSY
(C++11)
Text file busy
(macro constant)
EWOULDBLOCK
(C++11)
Operation would block
(macro constant)
EXDEV
(C++11)
Cross-device link
(macro constant)

[edit] Notes

Although the header <cerrno> is based on the C standard library header <errno.h>, the majority of the macros defined by <cerrno> were adopted by C++ from the POSIX standard, rather than the C standard library.

[edit] Synopsis

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

[edit] Defect reports

The following behavior-changing defect reports were applied retroactively to previously published C++ standards.

DR Applied to Behavior as published Correct behavior
LWG 288 C++98 the macro EILSEQ was not defined in <cerrno> defined

[edit] See also