bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: coreutils-7.1 requires trivial patch to build on IRIX/MIPSpro


From: Jim Meyering
Subject: Re: coreutils-7.1 requires trivial patch to build on IRIX/MIPSpro
Date: Thu, 26 Feb 2009 14:50:20 +0100

Eric Blake wrote:
> According to Stuart Shelton on 2/26/2009 5:37 AM:
>
> Hello Stuart,
>
>>
>> The MIPSpro compiler is strict with variadic macros, requiring a macro
>> defined as function(x,...) to be invoked with a minimum of two arguments
>> (one for 'x', and at least one for the '...')
>>
>> coreutils-7.1 therefore requires this patch:
>>
>> --- lib/argv-iter.h.dist        2009-02-25 17:06:43.143228800 +0000
>> +++ lib/argv-iter.h     2009-02-25 17:06:50.654736800 +0000
>> @@ -24,7 +24,7 @@
>>  #if __GNUC__ == 3 && __GNUC_MINOR__ >= 3 || 3 < __GNUC__
>>  # define _ATTRIBUTE_NONNULL_(m,...) __attribute__ ((__nonnull__ (m)))
>>  #else
>> -# define _ATTRIBUTE_NONNULL_(m,...)
>> +# define _ATTRIBUTE_NONNULL_(...)
>
> Thanks for the report.  Actually, I'm surprised to see that variadic
> macros are in use.  Yes, coreutils already uses C99 decl-after-statement,
> since most C89 compilers support that as an extension.  But are variadic
> macros really that portable?
>
> Perhaps this approach would be better, Jim?

Yes, indeed!
That looks much better.  Thanks to both of you.

...
> -  _ATTRIBUTE_NONNULL_ (1, 2);
> +  _ATTRIBUTE_NONNULL_ (1) _ATTRIBUTE_NONNULL_ (2);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]