lib: Add GCC version macro to the header file.
authorRichard W.M. Jones <rjones@redhat.com>
Tue, 17 May 2011 13:41:34 +0000 (14:41 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Tue, 17 May 2011 16:05:12 +0000 (17:05 +0100)
This will be used to internally enable various GCC enhancements.

generator/generator_c.ml

index 777b5d9..4405d63 100644 (file)
@@ -365,6 +365,11 @@ extern \"C\" {
 #include <stdint.h>
 #include <stdarg.h>
 
+#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