Use an enum for "qboolean" on OS X

Defining "qboolean" to something other than an enum changes the size of
some structs. That in turn breaks compatiblity with mods that use the
enum define. With this change the addons (tested with xatrix and rogue)
are running on OS X. Many thanks to my sister for lending me her
Macbook.
This commit is contained in:
Yamagi Burmeister 2012-11-04 18:47:15 +01:00
parent 7258a7ea31
commit d263e896cf

View file

@ -20,7 +20,9 @@
* =======================================================================
*
* This is the main header file shared between client, renderer, server
* and the game.
* and the game. Do NOT edit this file unless you know what you're
* doing. Changes here may break the client <-> renderer <-> server
* <-> game API, leading to problems with mods!
*
* =======================================================================
*/
@ -36,14 +38,15 @@
#include <stdlib.h>
#include <time.h>
#if defined(__APPLE__)
#include <stdbool.h>
typedef bool qboolean;
#else
typedef enum {false, true} qboolean;
#ifdef true
#undef true
#endif
#ifdef false
#undef false
#endif
typedef enum {false, true} qboolean;
typedef unsigned char byte;
#ifndef NULL