From WikiChip
Difference between revisions of "c/errno.h"
< c

(Created page with "{{DISPLAYTITLE:<errno.h> Header - C}} {{C Standard Library}} The '''<errno.h>''' header is part of the standard library of the C programming language that defines seve...")
 
m
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{DISPLAYTITLE:<errno.h> Header - C}}
+
{{c title|<errno.h> Header}}
 
{{C Standard Library}}
 
{{C Standard Library}}
 
The '''<errno.h>''' header is part of the [[standard library]] of the [[C programming language]] that defines several macros relating to the reporting of error conditions.
 
The '''<errno.h>''' header is part of the [[standard library]] of the [[C programming language]] that defines several macros relating to the reporting of error conditions.
  
Upon failure, library functions that are required to update [[Errno.h/errno - C|errno]] object. They will do so by setting the value of [[Errno.h/errno - C|errno]] to an integer value greater than zero. The integer constants defined in this header can be used by the program to test for those errors immediately after the library function call that failed.
+
Upon failure, library functions that are required to update {{C|Errno.h/errno|errno}} object. They will do so by setting the value of {{C|Errno.h/errno|errno}} to an integer value greater than zero. The integer constants defined in this header can be used by the program to test for those errors immediately after the library function call that failed.
  
 
== Macros ==
 
== Macros ==
The header provides two macro definitions:
+
The header provides four macro definitions:
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 12: Line 12:
 
! Macro Name !! Description !! Since
 
! Macro Name !! Description !! Since
 
|-
 
|-
| [[Errno.h/EDOM - C|EDOM]] || Expands to a distinct positive integer expression of type int. || [[C89]]
+
| {{C|Errno.h/EDOM|EDOM}} || Expands to a distinct positive integer expression of type int. || [[C89]]
 
|-
 
|-
| [[Errno.h/EILSEQ - C|EILSEQ]] || Expands to a distinct positive integer expression of type int. || [[C99]]
+
| {{C|Errno.h/EILSEQ|EILSEQ}} || Expands to a distinct positive integer expression of type int. || [[C99]]
 
|-
 
|-
| [[Errno.h/ERANGE - C|ERANGE]] || Expands to a distinct positive integer expression of type int. || [[C89]]
+
| {{C|Errno.h/ERANGE|ERANGE}} || Expands to a distinct positive integer expression of type int. || [[C89]]
 
|-
 
|-
| [[Errno.h/errno - C|errno]] || Expands to a modifiable lvalue of type int and with thread local storage duration. || [[C89]]
+
| {{C|Errno.h/errno|errno}} || Expands to a modifiable lvalue of type int and with thread local storage duration. || [[C89]]
 
|}
 
|}
  
  
{{DEFAULTSORT:Errno.h - C}}
+
{{DEFAULTSORT:errno.h}}
 
[[Category:C standard library]]
 
[[Category:C standard library]]
[[Category:Errno.h - C]]
+
[[Category:errno.h]]
[[Category:Errors - C]]
+
[[Category:c/errors]]

Latest revision as of 19:53, 7 January 2015

The <errno.h> header is part of the standard library of the C programming language that defines several macros relating to the reporting of error conditions.

Upon failure, library functions that are required to update errno object. They will do so by setting the value of errno to an integer value greater than zero. The integer constants defined in this header can be used by the program to test for those errors immediately after the library function call that failed.

Macros[edit]

The header provides four macro definitions:

Macro Name Description Since
EDOM Expands to a distinct positive integer expression of type int. C89
EILSEQ Expands to a distinct positive integer expression of type int. C99
ERANGE Expands to a distinct positive integer expression of type int. C89
errno Expands to a modifiable lvalue of type int and with thread local storage duration. C89