]> Savannah Git Hosting - gnulib.git/commitdiff
stdio, monetary: Don't redefine _GL_ATTRIBUTE_FORMAT.
authorBruno Haible <bruno@clisp.org>
Sat, 9 May 2020 10:58:23 +0000 (12:58 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 9 May 2020 10:58:23 +0000 (12:58 +0200)
* lib/stdio.in.h (_GL_ATTRIBUTE_FORMAT): Don't override the definition
that usually comes from m4/gnulib-common.m4.
* lib/monetary.in.h (_GL_ATTRIBUTE_FORMAT): Likewise.

ChangeLog
lib/monetary.in.h
lib/stdio.in.h

index 065628f2bc46d51d6c86326c3fe5c0c430f3f1c3..7f19e4e9843975892a1df3786c8d342a8091abf8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2020-05-09  Bruno Haible  <bruno@clisp.org>
+
+       stdio, monetary: Don't redefine _GL_ATTRIBUTE_FORMAT.
+       * lib/stdio.in.h (_GL_ATTRIBUTE_FORMAT): Don't override the definition
+       that usually comes from m4/gnulib-common.m4.
+       * lib/monetary.in.h (_GL_ATTRIBUTE_FORMAT): Likewise.
+
 2020-05-09  Bruno Haible  <bruno@clisp.org>
 
        dirent, stdlib, wchar, string: Don't redefine _GL_ATTRIBUTE_PURE.
index 456a1533bfc40dde30bc63e7fffbd17bf594f58b..40613192a4c88ee84fcc0a33f3b1bf0474d59245 100644 (file)
 #endif
 
 /* Like in <stdio.h>.  */
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
-# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
-#else
-# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
+#ifndef _GL_ATTRIBUTE_FORMAT
+# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
+#  define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
+# else
+#  define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_FORMAT_STRFMON
index 839a14b19906392e8a41ed5e2fe36c0656c09a0b..0823e6268513f75e3c80f333438161120aac457f 100644 (file)
    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 */
+#ifndef _GL_ATTRIBUTE_FORMAT
+# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
+#  define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
+# else
+#  define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_FORMAT_PRINTF