- Errno.h
errno.h is a
header file in the standard library of C programming language. It defines macros to report error conditions througherror code s.The
errno
macro expands to anlvalue with typeint
, containing the last error code generated in any function using the errno facility.Three macros expand to integer constants which represent the error codes:
*EDOM
results from a parameter outside a function's domain, for examplesqrt(-1)
*ERANGE
results from a result outside a function's range, for examplestrtol("0xfffffffff",NULL,0)
*EILSEQ
results from an illegal character sequence, for examplewcstombs(str, L"xffff", 2)
POSIX compliantoperating system s like UNIX orLinux may include other macros to represent other operating system error code numbers.On
December 19 ,2003 theSCO Group issued DMCA notices to selectedFortune 1000 companies, alleging the errno.h file was copied from UNIX into Linux without authorization.Linus Torvalds , the creator and trademark holder of Linux, has denied SCO's claim, saying he wrote the code for Linux's version himself. SeeError codes in Linux for standard error codes in Linux.ee also
*
C standard library
*SCO v. IBM Linux lawsuit
*stdio.h (forperror )
*string.h (forstrerror )External links
*man|bd|errno.h|SUS|system error numbers
* [http://www.ussg.iu.edu/hypermail/linux/kernel/0312.2/1241.html Linus Torvalds's commentary on errno.h]
* [http://healconsulting.com/SCO/sco-letter.html#table Commentary on the SCO Dec 2003 ABI Files letter, including a detailed analysis of the history of errno.h]
* [http://www.groklaw.net/article.php?story=20040221192536920 Warren Toomey, of the UNIX Heritage Society, traces the history of errno.h in Unix and Linux]
Wikimedia Foundation. 2010.