diff options
Diffstat (limited to 'common/compat.h')
-rw-r--r-- | common/compat.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/common/compat.h b/common/compat.h index 5061b9f..12b038d 100644 --- a/common/compat.h +++ b/common/compat.h @@ -39,6 +39,8 @@ #include <sys/types.h> +typedef enum { false, true } bool; + #if !defined(__cplusplus) && (__GNUC__ > 2) #define GNUC_PRINTF(x, y) __attribute__((__format__(__printf__, x, y))) #else @@ -203,4 +205,10 @@ void * memdup (void *data, #endif /* HAVE_MEMDUP */ +#ifdef HAVE_STDBOOL_H +#include <stdbool.h> +#else +typedef enum { false, true } bool; +#endif + #endif /* __COMPAT_H__ */ |