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

ChangeLog
lib/dirent.in.h
lib/stdlib.in.h
lib/string.in.h
lib/wchar.in.h

index 0d9ab5441bb3330a27be63f0075c36a5a9658f25..065628f2bc46d51d6c86326c3fe5c0c430f3f1c3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2020-05-09  Bruno Haible  <bruno@clisp.org>
+
+       dirent, stdlib, wchar, string: Don't redefine _GL_ATTRIBUTE_PURE.
+       * lib/dirent.in.h (_GL_ATTRIBUTE_PURE): Don't override the definition
+       that usually comes from m4/gnulib-common.m4.
+       * lib/stdlib.in.h (_GL_ATTRIBUTE_PURE): Likewise.
+       * lib/string.in.h (_GL_ATTRIBUTE_PURE): Likewise.
+       * lib/wchar.in.h (_GL_ATTRIBUTE_PURE): Likewise.
+
 2020-05-09  Bruno Haible  <bruno@clisp.org>
 
        uchar: Work around incorrect char16_t, char32_t types on Haiku 2020.
index f7c268101585ac549a040905d3de24a4d7ae00ee..6fa44f0d28d5f0dc58a827b4ce73ea9c20523396 100644 (file)
@@ -57,10 +57,12 @@ typedef struct gl_directory DIR;
 
 /* The __attribute__ feature is available in gcc versions 2.5 and later.
    The attribute __pure__ was added in gcc 2.96.  */
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
-# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
-#else
-# define _GL_ATTRIBUTE_PURE /* empty */
+#ifndef _GL_ATTRIBUTE_PURE
+# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+#  define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+# else
+#  define _GL_ATTRIBUTE_PURE /* empty */
+# endif
 #endif
 
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
index ec5f124a3667024f250c4830b02b73abe001cfce..59f9e6c71d1e38fae1040b6e4f7eaf6494e02641 100644 (file)
@@ -101,10 +101,12 @@ struct random_data
 
 /* The __attribute__ feature is available in gcc versions 2.5 and later.
    The attribute __pure__ was added in gcc 2.96.  */
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
-# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
-#else
-# define _GL_ATTRIBUTE_PURE /* empty */
+#ifndef _GL_ATTRIBUTE_PURE
+# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+#  define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+# else
+#  define _GL_ATTRIBUTE_PURE /* empty */
+# endif
 #endif
 
 /* The definition of _Noreturn is copied here.  */
index 87155ca3f4bbc123e5a85e31b4f7305029c91d0d..d6014503152ad5946e91ab347ade066c2fc5801b 100644 (file)
 
 /* The __attribute__ feature is available in gcc versions 2.5 and later.
    The attribute __pure__ was added in gcc 2.96.  */
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
-# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
-#else
-# define _GL_ATTRIBUTE_PURE /* empty */
+#ifndef _GL_ATTRIBUTE_PURE
+# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+#  define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+# else
+#  define _GL_ATTRIBUTE_PURE /* empty */
+# endif
 #endif
 
 /* NetBSD 5.0 declares strsignal in <unistd.h>, not in <string.h>.  */
index 040065a1751b6d9f4f4dbd95f3e562b7432460d6..e1fa92f27b5b18636605bba32f4a0068de6b8e93 100644 (file)
 
 /* The __attribute__ feature is available in gcc versions 2.5 and later.
    The attribute __pure__ was added in gcc 2.96.  */
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
-# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
-#else
-# define _GL_ATTRIBUTE_PURE /* empty */
+#ifndef _GL_ATTRIBUTE_PURE
+# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+#  define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+# else
+#  define _GL_ATTRIBUTE_PURE /* empty */
+# endif
 #endif
 
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */