From: Jim Meyering Date: Thu, 17 Jan 2008 09:20:24 +0000 (+0100) Subject: Do not define-away __attribute__ when __STRICT_ANSI__ is set. X-Git-Tag: v6.10~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27d1636b332084227ca81efced5b90cbe01a1310;p=thirdparty%2Fcoreutils.git Do not define-away __attribute__ when __STRICT_ANSI__ is set. * src/system.h (__attribute__): Remove the __STRICT_ANSI__ disjunct. It has been unnecessary since approximately gcc-2.6, and now, leaving it would cause gcc -Werror -ansi to fail to compile csplit.c. * gl/lib/randread.c (__attribute__): Likewise. --- diff --git a/ChangeLog b/ChangeLog index 1c2f457a15..bc45537c72 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-01-17 Jim Meyering + + Do not define-away __attribute__ when __STRICT_ANSI__ is set. + * src/system.h (__attribute__): Remove the __STRICT_ANSI__ disjunct. + It has been unnecessary since approximately gcc-2.6, and now, leaving + it would cause gcc -Werror -ansi to fail to compile csplit.c. + * gl/lib/randread.c (__attribute__): Likewise. + 2008-01-16 Jim Meyering * NEWS: Mention the configure.ac fix. diff --git a/gl/lib/randread.c b/gl/lib/randread.c index 9f65db6762..8dfb899a9f 100644 --- a/gl/lib/randread.c +++ b/gl/lib/randread.c @@ -1,6 +1,6 @@ /* Generate buffers of random data. - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006, 2008 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -44,7 +44,7 @@ #endif #ifndef __attribute__ -# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__ +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) # define __attribute__(x) # endif #endif diff --git a/src/system.h b/src/system.h index 0cd0804ce3..54c8a8b3d7 100644 --- a/src/system.h +++ b/src/system.h @@ -1,5 +1,5 @@ /* system-dependent definitions for coreutils - Copyright (C) 1989, 1991-2007 Free Software Foundation, Inc. + Copyright (C) 1989, 1991-2008 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -473,7 +473,7 @@ enum #endif #ifndef __attribute__ -# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__ +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) # define __attribute__(x) /* empty */ # endif #endif