diff options
Diffstat (limited to 'argp/argp.h')
-rw-r--r-- | argp/argp.h | 56 |
1 files changed, 9 insertions, 47 deletions
diff --git a/argp/argp.h b/argp/argp.h index e67bbef739..0f2583340f 100644 --- a/argp/argp.h +++ b/argp/argp.h @@ -1,5 +1,5 @@ /* Hierarchial argument parsing, layered over getopt. - Copyright (C) 1995-2016 Free Software Foundation, Inc. + Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Miles Bader <miles@gnu.ai.mit.edu>. @@ -24,51 +24,15 @@ #include <ctype.h> #include <getopt.h> #include <limits.h> - -#define __need_error_t #include <errno.h> + +__BEGIN_DECLS -#ifndef __THROW -# define __THROW -#endif -#ifndef __NTH -# define __NTH(fct) fct __THROW -#endif - -#ifndef __attribute__ -/* This feature is available in gcc versions 2.5 and later. */ -# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || \ - defined __STRICT_ANSI__ -# define __attribute__(Spec) /* empty */ -# endif -/* The __-protected variants of `format' and `printf' attributes - are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */ -# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) || \ - defined __STRICT_ANSI__ -# define __format__ format -# define __printf__ printf -# endif -#endif - -/* GCC 2.95 and later have "__restrict"; C99 compilers have - "restrict", and "configure" may have defined "restrict". */ -#ifndef __restrict -# if ! (2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__)) -# if defined restrict || 199901L <= __STDC_VERSION__ -# define __restrict restrict -# else -# define __restrict -# endif -# endif -#endif - +/* error_t may or may not be available from errno.h, depending on the + operating system. */ #ifndef __error_t_defined +# define __error_t_defined 1 typedef int error_t; -# define __error_t_defined -#endif - -#ifdef __cplusplus -extern "C" { #endif /* A description of a particular option. A pointer to an array of @@ -547,7 +511,7 @@ extern void *__argp_input (const struct argp *__restrict __argp, #ifdef __USE_EXTERN_INLINES -# if !_LIBC +# if !(defined _LIBC && _LIBC) # define __argp_usage argp_usage # define __argp_state_help argp_state_help # define __option_is_short _option_is_short @@ -582,7 +546,7 @@ __NTH (__option_is_end (const struct argp_option *__opt)) return !__opt->key && !__opt->name && !__opt->doc && !__opt->group; } -# if !_LIBC +# if !(defined _LIBC && _LIBC) # undef __argp_usage # undef __argp_state_help # undef __option_is_short @@ -590,8 +554,6 @@ __NTH (__option_is_end (const struct argp_option *__opt)) # endif #endif /* Use extern inlines. */ -#ifdef __cplusplus -} -#endif +__END_DECLS #endif /* argp.h */ |