-#if (GCC_VERSION < 2007)
+#define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
+#if GCC_VERSION < 2007
# define __attribute__(x)
#endif
#define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
+#define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
+#define LENGTH(x) (sizeof (x) / sizeof (*(x)))
+
+#define bool int
+#define true 1
+#define false 0