[PATCH] util/attr.h: use HAVE___ATTRIBUTE__, not __GNUC__ comparisons

Uri Simchoni uri at samba.org
Thu Mar 24 12:51:00 UTC 2016


On 03/23/2016 06:50 AM, Uri Simchoni wrote:
> On 03/23/2016 04:51 AM, Douglas Bagnall wrote:
>> Version 2, with additions.
>>
>>>   #if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 )
>>>   #define _NORETURN_ __attribute__ ((noreturn))
>>>   #else
>>>   #define _NORETURN_
>>>   #endif
>>>
>>> which would have done the wrong thing for 4.0. With version 5, GCC
>>> switched to 1-based minor versions, but as gcc-6 has not been
>>> released, I still have a minor version of zero.
>>
>> The first time I had "#if HAVE___ATTRIBUTE__" instead of
>> "#ifdef HAVE___ATTRIBUTE__". Oops.
>>
>> This also has patches for a few other places doing the same kind of
>> thing. There are some interesting variations that might need a close
>> look.
>>
>> Andrew has RB+ed the first one.
>>
>> Douglas
>>
> RB+ me - not pushing yet b/c others with perspective on different
> compilers and platforms may want to comment on infrastructure changes.
> 
Pushed.



More information about the samba-technical mailing list