From 85a134e9fd9e77af75684abdc9819171c754fb47 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 11 Jun 2006 07:12:27 +0000 Subject: [PATCH] * getdate.y (__attribute__): Don't define if already defined. Problem reported by Larry Jones. * utimens.c (__attribute__): Likewise. --- lib/ChangeLog | 6 ++++++ lib/getdate.y | 6 ++++-- lib/utimens.c | 6 ++++-- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/lib/ChangeLog b/lib/ChangeLog index cca7be86c..6c3d7dd25 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,9 @@ +2006-06-11 Paul Eggert + + * getdate.y (__attribute__): Don't define if already defined. + Problem reported by Larry Jones. + * utimens.c (__attribute__): Likewise. + 2006-06-04 Paul Eggert * regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun diff --git a/lib/getdate.y b/lib/getdate.y index cfa299f38..018504825 100644 --- a/lib/getdate.y +++ b/lib/getdate.y @@ -87,8 +87,10 @@ of `digit' even when the host does not conform to POSIX. */ #define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9) -#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__ -# define __attribute__(x) +#ifndef __attribute__ +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__ +# define __attribute__(x) +# endif #endif #ifndef ATTRIBUTE_UNUSED diff --git a/lib/utimens.c b/lib/utimens.c index 11f04d1ad..1489df05c 100644 --- a/lib/utimens.c +++ b/lib/utimens.c @@ -54,8 +54,10 @@ struct utimbuf # endif #endif -#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__ -# define __attribute__(x) +#ifndef __attribute__ +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__ +# define __attribute__(x) +# endif #endif #ifndef ATTRIBUTE_UNUSED -- 2.11.0