From b23e653e475f63ca560170edb50e0cc6a7cd8798 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 24 Mar 2002 11:19:10 +0000 Subject: [PATCH] =?UTF-8?q?boolean=20f=C3=BCr=20GCC-sauerei?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config.h | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) 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