summaryrefslogtreecommitdiff
path: root/lib/string.in.h
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2020-05-09 12:50:57 +0200
committerBruno Haible <bruno@clisp.org>2020-05-09 12:50:57 +0200
commitdae13c0c738762e9522b100868364bd08a080321 (patch)
treee5f0a20070489dfc8ae24434952dce0ffe8bdc45 /lib/string.in.h
parent0026bb83b67abedfcaf765f3a62bd583611c6b56 (diff)
downloadgnulib-dae13c0c738762e9522b100868364bd08a080321.tar.gz
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.
Diffstat (limited to 'lib/string.in.h')
-rw-r--r--lib/string.in.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/string.in.h b/lib/string.in.h
index 87155ca3f4..d601450315 100644
--- a/lib/string.in.h
+++ b/lib/string.in.h
@@ -54,10 +54,12 @@
/* 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>. */