From dae13c0c738762e9522b100868364bd08a080321 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 9 May 2020 12:50:57 +0200 Subject: 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. --- lib/dirent.in.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'lib/dirent.in.h') diff --git a/lib/dirent.in.h b/lib/dirent.in.h index f7c2681015..6fa44f0d28 100644 --- a/lib/dirent.in.h +++ b/lib/dirent.in.h @@ -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. */ -- cgit v1.2.1