When I wrote randread.c I forgot to put an #ifndef __attribute__ around
the #define __attribute__, as all other files do.  Sorry about that.

The bug crops up with pedantic GCC only.

Here's a patch:

2006-11-22  Paul Eggert  <[EMAIL PROTECTED]>

        * randread.c (__attribute__): Don't define if __attribute__ is
        already defined.  Otherwise, the code won't conform to C99, since
        the macro arg is spelled differently by some include file, and the
        compilation fails with pedantic GCC.

diff --git a/lib/randread.c b/lib/randread.c
index b761fa5..5462d44 100644
--- a/lib/randread.c
+++ b/lib/randread.c
@@ -44,8 +44,10 @@ #ifndef MIN
 # define MIN(a, b) ((a) < (b) ? (a) : (b))
 #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


_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to