summaryrefslogtreecommitdiff
path: root/argp/argp-fmtstream.h
diff options
context:
space:
mode:
Diffstat (limited to 'argp/argp-fmtstream.h')
-rw-r--r--argp/argp-fmtstream.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/argp/argp-fmtstream.h b/argp/argp-fmtstream.h
index 7a291e28c3..5d0d5eac92 100644
--- a/argp/argp-fmtstream.h
+++ b/argp/argp-fmtstream.h
@@ -34,6 +34,19 @@
#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) || __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) || __STRICT_ANSI__
+# define __format__ format
+# define __printf__ printf
+# endif
+#endif
+
#if (_LIBC - 0 && !defined (USE_IN_LIBIO)) \
|| (defined (__GNU_LIBRARY__) && defined (HAVE_LINEWRAP_H))
/* line_wrap_stream is available, so use that. */