From: Richard W.M. Jones Date: Tue, 17 May 2011 13:41:34 +0000 (+0100) Subject: lib: Add GCC version macro to the header file. X-Git-Tag: 1.11.7~8 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=33adb59b60b1358656439a757f319ba8ce81e26c;p=libguestfs.git lib: Add GCC version macro to the header file. This will be used to internally enable various GCC enhancements. --- diff --git a/generator/generator_c.ml b/generator/generator_c.ml index 777b5d9..4405d63 100644 --- a/generator/generator_c.ml +++ b/generator/generator_c.ml @@ -365,6 +365,11 @@ extern \"C\" { #include #include +#ifdef __GNUC__ +# define GUESTFS_GCC_VERSION \\ + (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) +#endif + /* The handle. */ #ifndef GUESTFS_TYPEDEF_H #define GUESTFS_TYPEDEF_H 1