diff --git a/include/r3.h b/include/r3.h index 0b6dde6..d2d226a 100644 --- a/include/r3.h +++ b/include/r3.h @@ -13,21 +13,12 @@ #include #ifdef HAVE_STDBOOL_H - -#include - -#else - -#if !defined(bool) && !defined(__cplusplus) +# include +#elif !defined(bool) && !defined(__cplusplus) typedef unsigned char bool; -#endif -#ifndef false -# define false 0 -#endif -#ifndef true -# define true 1 -#endif - +# define bool bool /* For redefinition guards */ +# define false 0 +# define true 1 #endif #include "str_array.h" diff --git a/include/str_array.h b/include/str_array.h index 778c807..b098436 100644 --- a/include/str_array.h +++ b/include/str_array.h @@ -8,9 +8,17 @@ #ifndef STR_ARRAY_H #define STR_ARRAY_H -#include "r3.h" #include "memory.h" +#ifdef HAVE_STDBOOL_H +# include +#elif !defined(bool) && !defined(__cplusplus) +typedef unsigned char bool; +# define bool bool /* For redefinition guards */ +# define false 0 +# define true 1 +#endif + typedef struct _str_array { R3_VECTOR(r3_iovec_t) slugs; R3_VECTOR(r3_iovec_t) tokens;