Back to index

glibc  2.9
errno.h
Go to the documentation of this file.
00001 /* Error constants.  Linux/HPPA specific version.
00002    Copyright (C) 1996,1997,1998,1999,2000,2002 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 also has no ECANCELED error code.  Since it is not used here
00028    we define it to an invalid value.  */
00029 # ifndef ECANCELED
00030 #  define ECANCELED  ECANCELLED
00031 # endif
00032 
00033 # ifndef __ASSEMBLER__
00034 /* Function to get address of global `errno' variable.  */
00035 extern int *__errno_location (void) __THROW __attribute__ ((__const__));
00036 
00037 #  if !defined _LIBC || defined _LIBC_REENTRANT
00038 /* When using threads, errno is a per-thread value.  */
00039 #   define errno (*__errno_location ())
00040 #  endif
00041 # endif /* !__ASSEMBLER__ */
00042 #endif /* _ERRNO_H */
00043 
00044 #if !defined _ERRNO_H && defined __need_Emath
00045 /* This is ugly but the kernel header is not clean enough.  We must
00046    define only the values EDOM, EILSEQ and ERANGE in case __need_Emath is
00047    defined.  */
00048 # define EDOM 33     /* Math argument out of domain of function.  */
00049 # define EILSEQ      47     /* Illegal byte sequence.  */
00050 # define ERANGE      34     /* Math result not representable.  */
00051 #endif /* !_ERRNO_H && __need_Emath */