From: Paul Eggert Date: Sun, 11 Jun 2006 07:11:31 +0000 (+0000) Subject: (__attribute__): Don't define if already defined. X-Git-Tag: v6.0~313 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ff276995ff38a9615a1f53249e1acf624e18d910;p=thirdparty%2Fcoreutils.git (__attribute__): Don't define if already defined. --- diff --git a/lib/ChangeLog b/lib/ChangeLog index a87c9a1d19..31f3098ad8 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-10 Jim Meyering Apply this change from gnulib: diff --git a/lib/getdate.y b/lib/getdate.y index cfa299f38a..0185048251 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 11f04d1ad8..1489df05ca 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