]> Savannah Git Hosting - gnulib.git/commitdiff
Remove redundant definitions of _GL_ATTRIBUTE_FORMAT.
authorBruno Haible <bruno@clisp.org>
Sat, 9 May 2020 11:22:49 +0000 (13:22 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 9 May 2020 11:22:49 +0000 (13:22 +0200)
* lib/argp.h (_GL_ATTRIBUTE_FORMAT): Remove macro.
* lib/argp-fmtstream.h (_GL_ATTRIBUTE_FORMAT): Likewise.
* lib/c-snprintf.h (_GL_ATTRIBUTE_FORMAT): Likewise.
* lib/c-vasnprintf.h (_GL_ATTRIBUTE_FORMAT): Likewise.
* lib/c-vasprintf.h (_GL_ATTRIBUTE_FORMAT): Likewise.
* lib/c-vsnprintf.h (_GL_ATTRIBUTE_FORMAT): Likewise.
* lib/c-xvasprintf.h (_GL_ATTRIBUTE_FORMAT): Likewise.
* lib/error.h (_GL_ATTRIBUTE_FORMAT): Likewise.
* lib/parse-datetime.y (_GL_ATTRIBUTE_FORMAT): Likewise.
* lib/vasnprintf.h (_GL_ATTRIBUTE_FORMAT): Likewise.
* lib/xprintf.h (_GL_ATTRIBUTE_FORMAT): Likewise.
* lib/xvasprintf.h (_GL_ATTRIBUTE_FORMAT): Likewise.

13 files changed:
ChangeLog
lib/argp-fmtstream.h
lib/argp.h
lib/c-snprintf.h
lib/c-vasnprintf.h
lib/c-vasprintf.h
lib/c-vsnprintf.h
lib/c-xvasprintf.h
lib/error.h
lib/parse-datetime.y
lib/vasnprintf.h
lib/xprintf.h
lib/xvasprintf.h

index dff097df28d7be9071c8a9e10227cccea1e5efb7..85c5af9885993bc77eb02a80580e4ca682963b62 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2020-05-09  Bruno Haible  <bruno@clisp.org>
+
+       Remove redundant definitions of _GL_ATTRIBUTE_FORMAT.
+       * lib/argp.h (_GL_ATTRIBUTE_FORMAT): Remove macro.
+       * lib/argp-fmtstream.h (_GL_ATTRIBUTE_FORMAT): Likewise.
+       * lib/c-snprintf.h (_GL_ATTRIBUTE_FORMAT): Likewise.
+       * lib/c-vasnprintf.h (_GL_ATTRIBUTE_FORMAT): Likewise.
+       * lib/c-vasprintf.h (_GL_ATTRIBUTE_FORMAT): Likewise.
+       * lib/c-vsnprintf.h (_GL_ATTRIBUTE_FORMAT): Likewise.
+       * lib/c-xvasprintf.h (_GL_ATTRIBUTE_FORMAT): Likewise.
+       * lib/error.h (_GL_ATTRIBUTE_FORMAT): Likewise.
+       * lib/parse-datetime.y (_GL_ATTRIBUTE_FORMAT): Likewise.
+       * lib/vasnprintf.h (_GL_ATTRIBUTE_FORMAT): Likewise.
+       * lib/xprintf.h (_GL_ATTRIBUTE_FORMAT): Likewise.
+       * lib/xvasprintf.h (_GL_ATTRIBUTE_FORMAT): Likewise.
+
 2020-05-09  Bruno Haible  <bruno@clisp.org>
 
        Remove redundant definitions of _GL_ATTRIBUTE_ALLOC_SIZE.
index e7713c4fd87fca563c9486cff24165af63723a05..8e4bc0dd4a6826ba7ff5c4cd158e00c4c6d8ad6c 100644 (file)
 #include <string.h>
 #include <unistd.h>
 
-/* The __attribute__ feature is available in gcc versions 2.5 and later.
-   The __-protected variants of the attributes 'format' and 'printf' are
-   accepted by gcc versions 2.6.4 (effectively 2.7) and later.
-   We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because
-   gnulib and libintl do '#define printf __printf__' when they override
-   the 'printf' function.  */
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
-# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
-#else
-# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
-#endif
-
 #if defined (__GNU_LIBRARY__) && defined (HAVE_LINEWRAP_H)
 /* line_wrap_stream is available, so use that.  */
 #define ARGP_FMTSTREAM_USE_LINEWRAP
index 4cc65639bcd7cae513712d92ae8dd46ffa7288bf..808c900b785fee0ee9ac3ea268451f9f5af8f749 100644 (file)
 # define __NTH(fct) fct __THROW
 #endif
 
-/* The __attribute__ feature is available in gcc versions 2.5 and later.
-   The __-protected variants of the attributes 'format' and 'printf' are
-   accepted by gcc versions 2.6.4 (effectively 2.7) and later.
-   We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because
-   gnulib and libintl do '#define printf __printf__' when they override
-   the 'printf' function.  */
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
-# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
-#else
-# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
-#endif
-
 /* GCC 2.95 and later have "__restrict"; C99 compilers have
    "restrict", and "configure" may have defined "restrict".
    Other compilers use __restrict, __restrict__, and _Restrict, and
index d82f35408b962794fa9effa28d4ceedc119dadf7..e03ef8897fb5df337ee7683e1c41817ea0f63f27 100644 (file)
 /* Get size_t.  */
 #include <stddef.h>
 
-/* The __attribute__ feature is available in gcc versions 2.5 and later.
-   The __-protected variants of the attributes 'format' and 'printf' are
-   accepted by gcc versions 2.6.4 (effectively 2.7) and later.
-   We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because
-   gnulib and libintl do '#define printf __printf__' when they override
-   the 'printf' function.  */
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
-# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
-#else
-# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
-#endif
-
 #ifdef __cplusplus
 extern "C" {
 #endif
index 0f58fb8257073fad2d538f9219475bcc914fda41..b9853f6a4c13dc8d94251b1ce92826ca68d171a7 100644 (file)
 /* Get size_t.  */
 #include <stddef.h>
 
-/* The __attribute__ feature is available in gcc versions 2.5 and later.
-   The __-protected variants of the attributes 'format' and 'printf' are
-   accepted by gcc versions 2.6.4 (effectively 2.7) and later.
-   We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because
-   gnulib and libintl do '#define printf __printf__' when they override
-   the 'printf' function.  */
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
-# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
-#else
-# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
-#endif
-
 #ifdef __cplusplus
 extern "C" {
 #endif
index 3b5b5f7a6823f523ff2d4c625031664feede51f4..588fbf01d990be8b90d9bfbf88b9f574580edeb0 100644 (file)
 /* Get va_list.  */
 #include <stdarg.h>
 
-/* The __attribute__ feature is available in gcc versions 2.5 and later.
-   The __-protected variants of the attributes 'format' and 'printf' are
-   accepted by gcc versions 2.6.4 (effectively 2.7) and later.
-   We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because
-   gnulib and libintl do '#define printf __printf__' when they override
-   the 'printf' function.  */
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
-# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
-#else
-# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
-#endif
-
 #ifdef __cplusplus
 extern "C" {
 #endif
index e296871b3789c9777e679376ced5f9fab330bc1a..6e39102b8539728a88b889554b525daaf1dbdb3b 100644 (file)
 /* Get va_list. */
 #include <stdarg.h>
 
-/* The __attribute__ feature is available in gcc versions 2.5 and later.
-   The __-protected variants of the attributes 'format' and 'printf' are
-   accepted by gcc versions 2.6.4 (effectively 2.7) and later.
-   We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because
-   gnulib and libintl do '#define printf __printf__' when they override
-   the 'printf' function.  */
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
-# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
-#else
-# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
-#endif
-
 #ifdef __cplusplus
 extern "C" {
 #endif
index d8f64cd02f75c0ef4f3b095c751f29b42ebbbf84..1d3a551ffc13f9beaf0b80fef3fe7214628ca164 100644 (file)
 /* Get va_list.  */
 #include <stdarg.h>
 
-/* The __attribute__ feature is available in gcc versions 2.5 and later.
-   The __-protected variants of the attributes 'format' and 'printf' are
-   accepted by gcc versions 2.6.4 (effectively 2.7) and later.
-   We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because
-   gnulib and libintl do '#define printf __printf__' when they override
-   the 'printf' function.  */
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
-# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
-#else
-# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
-#endif
-
 #ifdef __cplusplus
 extern "C" {
 #endif
index bad47a16dd28f7c6e03b1beb50b3790b2153d7bf..a351606f817cd810f8e709551e4b845fe494bae8 100644 (file)
 #ifndef _ERROR_H
 #define _ERROR_H 1
 
-/* The __attribute__ feature is available in gcc versions 2.5 and later.
-   The __-protected variants of the attributes 'format' and 'printf' are
-   accepted by gcc versions 2.6.4 (effectively 2.7) and later.
-   We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because
-   gnulib and libintl do '#define printf __printf__' when they override
-   the 'printf' function.  */
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
-# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
-#else
-# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
-#endif
-
 /* On mingw, the flavor of printf depends on whether the extensions module
  * is in use; the check for <stdio.h> determines the witness macro.  */
 #ifndef _GL_ATTRIBUTE_SPEC_PRINTF
index 206ff2048f74ec97588df554c5ce0c2c9a25439e..0c624674223c0603d2a759b7be7238227d8eec92 100644 (file)
 # define _STDLIB_H 1
 #endif
 
-/* The __attribute__ feature is available in gcc versions 2.5 and later.
-   The __-protected variants of the attributes 'format' and 'printf' are
-   accepted by gcc versions 2.6.4 (effectively 2.7) and later.
-   Enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because
-   gnulib and libintl do '#define printf __printf__' when they override
-   the 'printf' function.  */
-#if 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
-# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
-#else
-# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
-#endif
-
 /* Shift A right by B bits portably, by dividing A by 2**B and
    truncating towards minus infinity.  A and B should be free of side
    effects, and B should be in the range 0 <= B <= INT_BITS - 2, where
index 37777c93243f05d6d11d4a0448eb4fb8cfe8fce1..5be05539873b86628918f01dbe1673d728d4be02 100644 (file)
 /* Get size_t.  */
 #include <stddef.h>
 
-/* The __attribute__ feature is available in gcc versions 2.5 and later.
-   The __-protected variants of the attributes 'format' and 'printf' are
-   accepted by gcc versions 2.6.4 (effectively 2.7) and later.
-   We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because
-   gnulib and libintl do '#define printf __printf__' when they override
-   the 'printf' function.  */
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
-# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
-#else
-# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
-#endif
-
 #ifdef __cplusplus
 extern "C" {
 #endif
index 18ca05cfb9201ea1236d4a9f1e78ecd820221265..d0615b4f90a35b8d5879065fbc1cfd5733250f1c 100644 (file)
 #include <stdarg.h>
 #include <stdio.h>
 
-/* The __attribute__ feature is available in gcc versions 2.5 and later.
-   The __-protected variants of the attributes 'format' and 'printf' are
-   accepted by gcc versions 2.6.4 (effectively 2.7) and later.
-   We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because
-   gnulib and libintl do '#define printf __printf__' when they override
-   the 'printf' function.  */
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
-# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
-#else
-# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
-#endif
-
 extern int xprintf (char const *restrict format, ...)
   _GL_ATTRIBUTE_FORMAT ((__printf__, 1, 2));
 extern int xvprintf (char const *restrict format, va_list args)
index 8a64f535e10c1fd4e4d4fdacdd6a2ab953d0171b..ff43d1bbc48c0f04dca0ccae94366052dae62deb 100644 (file)
 /* Get va_list.  */
 #include <stdarg.h>
 
-/* The __attribute__ feature is available in gcc versions 2.5 and later.
-   The __-protected variants of the attributes 'format' and 'printf' are
-   accepted by gcc versions 2.6.4 (effectively 2.7) and later.
-   We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because
-   gnulib and libintl do '#define printf __printf__' when they override
-   the 'printf' function.  */
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
-# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
-#else
-# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
-#endif
-
 #ifdef __cplusplus
 extern "C" {
 #endif