| 1 | /* Copyright (C) 1991-2018 Free Software Foundation, Inc. | 
| 2 |    This file is part of the GNU C Library. | 
| 3 |  | 
| 4 |    The GNU C Library is free software; you can redistribute it and/or | 
| 5 |    modify it under the terms of the GNU Lesser General Public | 
| 6 |    License as published by the Free Software Foundation; either | 
| 7 |    version 2.1 of the License, or (at your option) any later version. | 
| 8 |  | 
| 9 |    The GNU C Library is distributed in the hope that it will be useful, | 
| 10 |    but WITHOUT ANY WARRANTY; without even the implied warranty of | 
| 11 |    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU | 
| 12 |    Lesser General Public License for more details. | 
| 13 |  | 
| 14 |    You should have received a copy of the GNU Lesser General Public | 
| 15 |    License along with the GNU C Library; if not, see | 
| 16 |    <http://www.gnu.org/licenses/>.  */ | 
| 17 |  | 
| 18 | /* | 
| 19 |  *	ISO C99 Standard: 7.5 Errors	<errno.h> | 
| 20 |  */ | 
| 21 |  | 
| 22 | #ifndef	_ERRNO_H | 
| 23 | #define	_ERRNO_H 1 | 
| 24 |  | 
| 25 | #include <features.h> | 
| 26 |  | 
| 27 | /* The system-specific definitions of the E* constants, as macros.  */ | 
| 28 | #include <bits/errno.h> | 
| 29 |  | 
| 30 | /* When included from assembly language, this header only provides the | 
| 31 |    E* constants.  */ | 
| 32 | #ifndef __ASSEMBLER__ | 
| 33 |  | 
| 34 | __BEGIN_DECLS | 
| 35 |  | 
| 36 | /* The error code set by various library functions.  */ | 
| 37 | extern int *__errno_location (void) __THROW __attribute_const__; | 
| 38 | # define errno (*__errno_location ()) | 
| 39 |  | 
| 40 | # ifdef __USE_GNU | 
| 41 |  | 
| 42 | /* The full and simple forms of the name with which the program was | 
| 43 |    invoked.  These variables are set up automatically at startup based on | 
| 44 |    the value of argv[0].  */ | 
| 45 | extern char *program_invocation_name; | 
| 46 | extern char *program_invocation_short_name; | 
| 47 |  | 
| 48 | /* bits/errno.h may have defined this type.  If it didn't, provide a | 
| 49 |    fallback definition.  */ | 
| 50 | #  ifndef __error_t_defined | 
| 51 | #   define __error_t_defined 1 | 
| 52 | typedef int error_t; | 
| 53 | #  endif | 
| 54 |  | 
| 55 | # endif /* __USE_GNU */ | 
| 56 |  | 
| 57 | __END_DECLS | 
| 58 |  | 
| 59 | #endif /* !__ASSEMBLER__ */ | 
| 60 | #endif /* errno.h */ | 
| 61 |  |