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