| 2875 |
dpurdie |
1 |
#pragma force_top_level
|
|
|
2 |
#pragma include_only_once
|
|
|
3 |
|
|
|
4 |
/* errno.h: ANSI 'C' (X3J11 Oct 88) library header, section 4.1.3 */
|
|
|
5 |
/* Copyright (C) Codemist Ltd., 1988 */
|
|
|
6 |
/* Copyright (C) Advanced Risc Machines Ltd., 1991 */
|
|
|
7 |
/* version 1 */
|
|
|
8 |
|
|
|
9 |
/*
|
|
|
10 |
* RCS $Revision: 1.2 $
|
|
|
11 |
* Checkin $Date: 1997/07/15 16:11:35 $
|
|
|
12 |
* Revising $Author: hmeeking $
|
|
|
13 |
*/
|
|
|
14 |
|
|
|
15 |
#ifndef __errno_h
|
|
|
16 |
#define __errno_h
|
|
|
17 |
|
|
|
18 |
#ifndef errno
|
|
|
19 |
# define errno __errno
|
|
|
20 |
extern volatile int errno;
|
|
|
21 |
/*
|
|
|
22 |
* expands to a modifiable lvalue that has type volatile int, the value of
|
|
|
23 |
* which is set to a positive error code by several library functions. It is
|
|
|
24 |
* initialised to zero at program startup, but is never set to zero by any
|
|
|
25 |
* library function. The value of errno may be set to nonzero by a library
|
|
|
26 |
* function call whether or not there is an error, provided the use of errno
|
|
|
27 |
* is not documented in the description of the function in the Standard.
|
|
|
28 |
*/
|
|
|
29 |
#endif
|
|
|
30 |
|
|
|
31 |
#define EDOM 1
|
|
|
32 |
/*
|
|
|
33 |
* if a domain error occurs (an input argument is outside the domain over
|
|
|
34 |
* which the mathematical function is defined) the integer expression errno
|
|
|
35 |
* acquires the value of the macro EDOM and HUGE_VAL is returned. EDOM may
|
|
|
36 |
* be used by non-mathematical functions.
|
|
|
37 |
*/
|
|
|
38 |
#define ERANGE 2
|
|
|
39 |
/*
|
|
|
40 |
* a range error occurs if the result of a function can not be represented
|
|
|
41 |
* as a double value. If the result overflows (the magnitude of the result
|
|
|
42 |
* is so large that it cannot be represented in an object of the specified
|
|
|
43 |
* type), the function returns the value of the macro HUGE_VAL, with the
|
|
|
44 |
* same sign as the correct value of the function; the integer expression
|
|
|
45 |
* errno acquires the value of the macro ERANGE. If the result underflows
|
|
|
46 |
* (the magnitude of the result is so small that it cannot be represented
|
|
|
47 |
* in an object of the specified type), the function returns zero; the
|
|
|
48 |
* integer expression errno acquires the value of the macro ERANGE. ERANGE
|
|
|
49 |
* may be used by non-mathematical functions.
|
|
|
50 |
*/
|
|
|
51 |
#define ESIGNUM 3
|
|
|
52 |
|
|
|
53 |
#define EILSEQ 4
|
|
|
54 |
/* See Normative Addendum 1 */
|
|
|
55 |
|
|
|
56 |
#endif
|
|
|
57 |
|
|
|
58 |
/* end of errno.h */
|