[PATCH] util/attr.h: use HAVE___ATTRIBUTE__, not __GNUC__ comparisons
abartlet at samba.org
Wed Mar 23 03:47:56 UTC 2016
On Wed, 2016-03-23 at 15:51 +1300, 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
> Andrew has RB+ed the first one.
With the note that I suspect the wmi code hasn't seen a compiler in
most of a decade:
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
Can someone double-review it an get this on the way?
Authentication Developer, Samba Team https://samba.org
Samba Development and Support, Catalyst IT
More information about the samba-technical