diff --git a/src/config.h b/src/config.h index 546ab1fc9..c1f43163e 100644 --- a/src/config.h +++ b/src/config.h @@ -24,14 +24,6 @@ -/**** **** - ** The Eressea boolean type ** - **** ****/ - -typedef int boolean; -#define false ((boolean)0) -#define true ((boolean)!false) - /**** **** @@ -57,6 +49,12 @@ typedef int boolean; # include #endif +#if defined(__GCC__) +# include +# define HAS_BOOLEAN +# define boolean bool +#endif + #if defined(_DEBUG) && defined(_MSC_VER) # ifndef MALLOCDBG # define MALLOCDBG 1 @@ -232,4 +230,14 @@ extern char * strdup(const char *s); #define unused(var) var = var + +/**** **** + ** The Eressea boolean type ** + **** ****/ +#ifndef HAS_BOOLEAN + typedef int boolean; +# define false ((boolean)0) +# define true ((boolean)!false) +#endif + #endif