Add a macro GCC_VERSION and use it to control code paths.
Code paths that work on lower version of GCC are required because
Mac OS will never move beyond GCC 4.2. I added the code paths so
that Mac builds can pass.
Change-Id: I4a3340355133dff4a5107b94970bc809d9de264e
diff --git a/src/macros.h b/src/macros.h
index 7652f71..5b9bdb6 100644
--- a/src/macros.h
+++ b/src/macros.h
@@ -16,6 +16,10 @@
#include <stddef.h> // for size_t
+#define GCC_VERSION ( _GNUC_ * 10000 \
+ + _GNUC_MINOR_ * 100 \
+ + __GNUC_PATCHLEVEL__)
+
// The COMPILE_ASSERT macro can be used to verify that a compile time
// expression is true. For example, you could use it to verify the
// size of a static array: