1 .\" This file is part of the Public Domain C Library (PDCLib).
\r
2 .\" Permission is granted to use, modify, and / or redistribute at will.
\r
10 .Nd library error result
\r
15 .Sy #define errno <object of thread local storage duration>
\r
22 to refer to an object of thread local storage duration. It is undefined whether
\r
25 refers to a preprocessor symbol or not.
\r
28 At program startup, the runtime shall initialize
\r
30 to contain the value zero (the initial value in other threads is undefined). It
\r
31 is guaranteed that no function provided by the C standard library shall set the
\r
34 to zero; therefore, for functions which do not have a unique return value for
\r
35 indicating error, it is possible to determine whether an error occured by
\r
38 to zero before the call, then after the call seeing if an error value has been
\r
43 Note that it is valid for any function which is not described as explicitly
\r
46 to set it to a non-zero value. Checking for a non-zero value is only valid with
\r
47 functions which are defined to modify
\r
52 In some historical versions of the POSIX standard, the prescribed method of
\r
53 using errno was to define
\r
54 .Va extern int errno .
\r
55 This is no longer supported by the POSIX or C standards, and will not work on
\r
56 the majority of implementations, including this one.
\r