Back to index

glibc  2.9
errno.h
Go to the documentation of this file.
00001 /* Error constants.  MIPS/Linux specific version.
00002    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2006
00003    Free Software Foundation, Inc.
00004    This file is part of the GNU C Library.
00005 
00006    The GNU C Library is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Lesser General Public
00008    License as published by the Free Software Foundation; either
00009    version 2.1 of the License, or (at your option) any later version.
00010 
00011    The GNU C Library is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014    Lesser General Public License for more details.
00015 
00016    You should have received a copy of the GNU Lesser General Public
00017    License along with the GNU C Library; if not, write to the Free
00018    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00019    02111-1307 USA.  */
00020 
00021 #ifdef _ERRNO_H
00022 
00023 # undef EDOM
00024 # undef EILSEQ
00025 # undef ERANGE
00026 # include <linux/errno.h>
00027 
00028 /* Linux has no ENOTSUP error code.  */
00029 # define ENOTSUP EOPNOTSUPP
00030 
00031 # ifndef ECANCELED
00032 #  define ECANCELED  158
00033 # endif
00034 
00035 /* Support for error codes to support robust mutexes was added later, too.  */
00036 # ifndef EOWNERDEAD
00037 #  define EOWNERDEAD        165
00038 #  define ENOTRECOVERABLE   166
00039 # endif
00040 
00041 # ifndef __ASSEMBLER__
00042 /* Function to get address of global `errno' variable.  */
00043 extern int *__errno_location (void) __THROW __attribute__ ((__const__));
00044 
00045 #  if !defined _LIBC || defined _LIBC_REENTRANT
00046 /* When using threads, errno is a per-thread value.  */
00047 #   define errno (*__errno_location ())
00048 #  endif
00049 # endif /* !__ASSEMBLER__ */
00050 #endif /* _ERRNO_H */
00051 
00052 #if !defined _ERRNO_H && defined __need_Emath
00053 /* This is ugly but the kernel header is not clean enough.  We must
00054    define only the values EDOM, EILSEQ and ERANGE in case __need_Emath is
00055    defined.  */
00056 # define EDOM 33     /* Math argument out of domain of function.  */
00057 # define EILSEQ      88     /* Illegal byte sequence.  */
00058 # define ERANGE      34     /* Math result not representable.  */
00059 #endif /* !_ERRNO_H && __need_Emath */