diff options
author | Florian Weimer <fweimer@redhat.com> | 2016-08-18 11:15:42 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2016-08-18 11:15:42 +0200 |
commit | 2c820533c61fed175390bc6058afbbe42d2edc37 (patch) | |
tree | 897aad23de6d317eede5a84d85d96b5e874e6aad /argp/argp.h | |
parent | ee19f1de0d0da24114be554fdf94243c0ec6b86c (diff) | |
download | glibc-2c820533c61fed175390bc6058afbbe42d2edc37.zip glibc-2c820533c61fed175390bc6058afbbe42d2edc37.tar.gz glibc-2c820533c61fed175390bc6058afbbe42d2edc37.tar.bz2 |
argp: Do not override GCC keywords with macros [BZ #16907]
glibc provides fallback definitions already. It is not necessary to
suppress warnings for unknown attributes because GCC does this
automatically for system headers.
This commit does not sync with gnulib because gnulib has started to use
_GL_* macros in the header file, which are arguably in the gnulib
implementation space and not suitable for an installed glibc header
file.
Diffstat (limited to 'argp/argp.h')
-rw-r--r-- | argp/argp.h | 42 |
1 files changed, 2 insertions, 40 deletions
diff --git a/argp/argp.h b/argp/argp.h index e67bbef..7cb5a69 100644 --- a/argp/argp.h +++ b/argp/argp.h @@ -28,48 +28,12 @@ #define __need_error_t #include <errno.h> -#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 - #ifndef __error_t_defined typedef int error_t; # define __error_t_defined #endif -#ifdef __cplusplus -extern "C" { -#endif +__BEGIN_DECLS /* A description of a particular option. A pointer to an array of these is passed in the OPTIONS field of an argp structure. Each option @@ -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 */ |