boolean für GCC-sauerei

This commit is contained in:
Enno Rehling 2002-03-24 11:19:10 +00:00
parent 89d0e42ef3
commit b23e653e47
1 changed files with 16 additions and 8 deletions

View File

@ -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 <dmalloc.h>
#endif
#if defined(__GCC__)
# include <stdbool.h>
# 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