aboutsummaryrefslogtreecommitdiff
path: root/argp/argp-fmtstream.h
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2016-08-18 11:15:42 +0200
committerFlorian Weimer <fweimer@redhat.com>2016-08-18 11:15:42 +0200
commit2c820533c61fed175390bc6058afbbe42d2edc37 (patch)
tree897aad23de6d317eede5a84d85d96b5e874e6aad /argp/argp-fmtstream.h
parentee19f1de0d0da24114be554fdf94243c0ec6b86c (diff)
downloadglibc-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-fmtstream.h')
-rw-r--r--argp/argp-fmtstream.h19
1 files changed, 4 insertions, 15 deletions
diff --git a/argp/argp-fmtstream.h b/argp/argp-fmtstream.h
index bdeaa54..e8c5797 100644
--- a/argp/argp-fmtstream.h
+++ b/argp/argp-fmtstream.h
@@ -29,21 +29,6 @@
#include <string.h>
#include <unistd.h>
-#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
-
#if defined (__GNU_LIBRARY__) && defined (HAVE_LINEWRAP_H)
/* line_wrap_stream is available, so use that. */
#define ARGP_FMTSTREAM_USE_LINEWRAP
@@ -111,6 +96,8 @@ struct argp_fmtstream
typedef struct argp_fmtstream *argp_fmtstream_t;
+__BEGIN_DECLS
+
/* Return an argp_fmtstream that outputs to STREAM, and which prefixes lines
written on it with LMARGIN spaces and limits them to RMARGIN columns
total. If WMARGIN >= 0, words that extend past RMARGIN are wrapped by
@@ -297,6 +284,8 @@ __argp_fmtstream_point (argp_fmtstream_t __fs)
#endif /* __OPTIMIZE__ */
+__END_DECLS
+
#endif /* ARGP_FMTSTREAM_USE_LINEWRAP */
#endif /* argp-fmtstream.h */