Back to index

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