Allow compatibility with C++

This commit is contained in:
Brian Koropoff 2007-03-18 02:16:10 +00:00 committed by Jeff Teunissen
parent 7043dd14f9
commit ab310cb443
2 changed files with 9 additions and 6 deletions

View file

@ -51,13 +51,16 @@ typedef unsigned char byte;
#ifndef _DEF_BOOL_
# define _DEF_BOOL_
// KJB Undefined true and false defined in SciTech's DEBUG.H header
#ifdef __cplusplus
# define __bool_true_false_are_defined
#endif
# ifdef __bool_true_false_are_defined
typedef enum {q_false = false, q_true = true} qboolean;
//#define true q_true;
//#define false q_false;
# else
#undef true
#undef false
# ifdef __bool_true_false_are_defined
typedef enum {q_false, q_true} qboolean;
#define true q_true;
#define false q_false;
# else
typedef enum {false, true} qboolean;
# endif
#endif

View file

@ -39,7 +39,7 @@
typedef struct QFile_s QFile;
int Qrename(const char *old, const char *new);
int Qrename(const char *old_path, const char *new_path);
int Qremove(const char *path);
int Qfilesize (QFile *file);
QFile *Qopen(const char *path, const char *mode);