Update MIPS libm-test-ulps.
[glibc.git] / bits / errno.h
blobf7c0f5963290f12a4e5b1e0db91ef99d08654c58
1 /* Error constants. Generic version.
2 Copyright (C) 1991-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
19 /* This file defines the errno constants. */
21 #ifndef _BITS_ERRNO_H
22 #define _BITS_ERRNO_H 1
24 #if !defined _ERRNO_H
25 # error "Never include <bits/errno.h> directly; use <errno.h> instead."
26 #endif
28 #error "Generic bits/errno.h included -- port is incomplete."
30 /* Authors of new ports of the GNU C Library must override this file
31 with their own bits/errno.h in an appropriate subdirectory of
32 sysdeps/. Its function is to define all of the error constants
33 from C2011 and POSIX.1-2008, with values appropriate to the
34 operating system, and any additional OS-specific error constants.
36 C2011 requires all error constants to be object-like macros that
37 expand to "integer constant expressions with type int, positive
38 values, and suitable for use in #if directives". Moreover, all of
39 their names must begin with a capital E, followed immediately by
40 either another capital letter, or a digit. It is OK to define
41 macros that are not error constants, but only in the implementation
42 namespace.
44 errno.h is sometimes included from assembly language. Therefore,
45 when __ASSEMBLER__ is defined, bits/errno.h may only define macros;
46 it may not make any other kind of C declaration or definition.
47 Also, the error constants should, if at all possible, expand to
48 simple decimal or hexadecimal numbers. */
50 #endif /* bits/errno.h. */