[libvirt] [PATCH python] define __GNUC_PREREQ macro before using it
Eric Blake
eblake at redhat.com
Tue Dec 31 14:26:48 UTC 2013
On 12/29/2013 03:52 PM, Doug Goldstein wrote:
> We brought over use of the __GNUC_PREREQ macro from libvirt but didn't
> bring over the definition of it. This brings over the macro from libvirt
> sources.
> ---
> libvirt-utils.h | 9 +++++++++
> 1 file changed, 9 insertions(+)
ACK (with #endif fixed).
>
> diff --git a/libvirt-utils.h b/libvirt-utils.h
> index f55be7b..add7553 100644
> --- a/libvirt-utils.h
> +++ b/libvirt-utils.h
> @@ -65,6 +65,15 @@
> # endif
>
> # ifdef __GNUC__
> +
> +# ifndef __GNUC_PREREQ
> +# if defined __GNUC__ && defined __GNUC_MINOR__
> +# define __GNUC_PREREQ(maj, min) \
> + ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
> +# else
> +# define __GNUC_PREREQ(maj,min) 0
Copy and paste and all, but you could add a space after that comma for
consistency.
> +# endif
> +
> /**
> * ATTRIBUTE_UNUSED:
> *
>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20131231/98dd5ad1/attachment-0001.sig>
More information about the libvir-list
mailing list