C Standard Library

C - <errno.h>



The C++ <errno.h> header defines macro variable errno plus at least three additional macro constants: EDOM, ERANGE and EILSEQ. Along with this, the majority of the macros defined by this header file were adopted by C11 available in POSIX environments.

These macros are available to use in a current program after including the header file using #include <errno.h>. All macros of this header file are listed below:

Library Macros

Macro variables

MacroDescription
errno macro which expands to POSIX-compatible thread-local error number variable.

Macro constants

MacrosDescription
E2BIGArgument list too long
EACCESPermission denied
EADDRINUSEAddress in use
EADDRNOTAVAILAddress not available
EAFNOSUPPORTAddress family not supported
EAGAINResource unavailable, try again
EALREADYConnection already in progress
EBADFBad file descriptor
EBADMSGBad message
EBUSYDevice or resource busy
ECANCELEDOperation canceled
ECHILDNo child processes
ECONNABORTEDConnection aborted
ECONNREFUSEDConnection refused
ECONNRESETConnection reset
EDEADLKResource deadlock would occur
EDESTADDRREQDestination address required
EDOMMathematics argument out of domain of function
EEXISTFile exists
EFAULTBad address
EFBIGFile too large
EHOSTUNREACHHost is unreachable
EIDRMIdentifier removed
EILSEQIllegal byte sequence
EINPROGRESSOperation in progress
EINTRInterrupted function
EINVALInvalid argument
EIOI/O error
EISCONNSocket is connected
EISDIRIs a directory
ELOOPToo many levels of symbolic links
EMFILEFile descriptor value too large
EMLINKToo many links
EMSGSIZEMessage too large
ENAMETOOLONGFilename too long
ENETDOWNNetwork is down
ENETRESETConnection aborted by network
ENETUNREACHNetwork unreachable
ENFILEToo many files open in system
ENOBUFSNo buffer space available
ENODATANo message is available on the STREAM head read queue
ENODEVNo such device
ENOENTNo such file or directory
ENOEXECExecutable file format error
ENOLCKNo locks available
ENOLINKLink has been severed
ENOMEMNot enough space
ENOMSGNo message of the desired type
ENOPROTOOPTProtocol not available
ENOSPCNo space left on device
ENOSRNo STREAM resources
ENOSTRNot a STREAM
ENOSYSFunction not supported
ENOTCONNThe socket is not connected
ENOTDIRNot a directory
ENOTEMPTYDirectory not empty
ENOTRECOVERABLEState not recoverable
ENOTSOCKNot a socket
ENOTSUPNot supported
ENOTTYInappropriate I/O control operation
ENXIONo such device or address
EOPNOTSUPPOperation not supported on socket
EOVERFLOWValue too large to be stored in data type
EOWNERDEADPrevious owner died
EPERMOperation not permitted
EPIPEBroken pipe
EPROTOProtocol error
EPROTONOSUPPORTProtocol not supported
EPROTOTYPEProtocol wrong type for socket
ERANGEResult too large
EROFSRead-only file system
ESPIPEInvalid seek
ESRCHNo such process
ETIMEStream ioctl() timeout
ETIMEDOUTConnection timed out
ETXTBSYText file busy
EWOULDBLOCKOperation would block
EXDEVCross-device link