xref: /utopia/UTPA2-700.0.x/projects/tools/lint/mips-linux-gnu_include/bits/errno.h (revision 53ee8cc121a030b8d368113ac3e966b4705770ef)
1 /* Error constants.  MIPS/Linux specific version.
2    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2006
3    Free Software Foundation, Inc.
4    This file is part of the GNU C Library.
5 
6    The GNU C Library is free software; you can redistribute it and/or
7    modify it under the terms of the GNU Lesser General Public
8    License as published by the Free Software Foundation; either
9    version 2.1 of the License, or (at your option) any later version.
10 
11    The GNU C Library is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14    Lesser General Public License for more details.
15 
16    You should have received a copy of the GNU Lesser General Public
17    License along with the GNU C Library; if not, write to the Free
18    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
19    02111-1307 USA.  */
20 
21 #ifdef _ERRNO_H
22 
23 # undef EDOM
24 # undef EILSEQ
25 # undef ERANGE
26 # include <linux/errno.h>
27 
28 /* Linux has no ENOTSUP error code.  */
29 # define ENOTSUP EOPNOTSUPP
30 
31 # ifndef ECANCELED
32 #  define ECANCELED	158
33 # endif
34 
35 /* Support for error codes to support robust mutexes was added later, too.  */
36 # ifndef EOWNERDEAD
37 #  define EOWNERDEAD		165
38 #  define ENOTRECOVERABLE	166
39 # endif
40 
41 # ifndef __ASSEMBLER__
42 /* Function to get address of global `errno' variable.  */
43 extern int *__errno_location (void) __THROW __attribute__ ((__const__));
44 
45 #  if !defined _LIBC || defined _LIBC_REENTRANT
46 /* When using threads, errno is a per-thread value.  */
47 #   define errno (*__errno_location ())
48 #  endif
49 # endif /* !__ASSEMBLER__ */
50 #endif /* _ERRNO_H */
51 
52 #if !defined _ERRNO_H && defined __need_Emath
53 /* This is ugly but the kernel header is not clean enough.  We must
54    define only the values EDOM, EILSEQ and ERANGE in case __need_Emath is
55    defined.  */
56 # define EDOM	33	/* Math argument out of domain of function.  */
57 # define EILSEQ	88	/* Illegal byte sequence.  */
58 # define ERANGE	34	/* Math result not representable.  */
59 #endif /* !_ERRNO_H && __need_Emath */
60