[PATCH 2/7] kernel: introduce GCC_VERSION_LOWER macro

From: Peter Oberparleiter
Date: Mon May 19 2008 - 04:43:55 EST


From: Peter Oberparleiter <peter.oberparleiter@xxxxxxxxxx>

GCC_VERSION_LOWER() can be used to check for gcc versions below a
certain level.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@xxxxxxxxxx>
---
include/linux/compiler-gcc.h | 3 +++
1 file changed, 3 insertions(+)

Index: linux-2.6.26-rc3/include/linux/compiler-gcc.h
===================================================================
--- linux-2.6.26-rc3.orig/include/linux/compiler-gcc.h
+++ linux-2.6.26-rc3/include/linux/compiler-gcc.h
@@ -6,6 +6,9 @@
* Common definitions for all gcc versions go here.
*/

+#define GCC_VERSION_LOWER(major, minor) ((__GNUC__ < major) || \
+ (__GNUC__ == major) && \
+ (__GNUC_MINOR__ < minor))

/* Optimization barrier */
/* The "volatile" is due to gcc bugs */






--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/