X-Git-Url: http://git.jankratochvil.net/?p=gdbmicli.git;a=blobdiff_plain;f=ansidecl.h;fp=ansidecl.h;h=b16f2b287656e0978832043798462aed60d7b09c;hp=76280641b875dbace7fde2860c531c73890d5eb6;hb=f2ce960a8b335fdfd2a2defa26ffae990afa8049;hpb=905b144cd7b85ae999212837aa8d3ba929b158e5 diff --git a/ansidecl.h b/ansidecl.h index 7628064..b16f2b2 100644 --- a/ansidecl.h +++ b/ansidecl.h @@ -1,4 +1,11 @@ -#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