Implemented pagination.
[gdbmicli.git] / ansidecl.h
index 7628064..984e95d 100644 (file)
@@ -1,4 +1,14 @@
-#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 max(a, b) ((a) > (b) ? (a) : (b))
+#define min(a, b) ((a) < (b) ? (a) : (b))
+
+#define bool int
+#define true 1
+#define false 0