Use the same definition of 'bool' as in uio.

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2953 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
Meep-Eep
2008-03-14 20:31:17 +00:00
parent 76ba833da4
commit 3689bdaaf7
+23 -6
View File
@@ -22,6 +22,8 @@
#ifndef _TYPES_H
#define _TYPES_H
#include "config.h"
#ifdef _MSC_VER
# if (_MSC_VER >= 1300)
# include <stddef.h>
@@ -84,14 +86,29 @@
# undef UQM_INT64
#endif
// ISO C99 compatible boolean types. The ISO C99 standard defines:
// - An object declared as type _Bool, large enough to store the values 0
// and 1, the rank of which is less than the rank of all other standard
// integer types.
// - A macro "bool", which expands to "_Bool".
// - A macro "true", which expands to the integer constant 1, suitable for
// use in #if preprocessing directives.
// - A macro "false", which expands to the integer constant 0, suitable for
// use in #if preprocessing directives.
// - A macro "__bool_true_false_are_defined", which expands to the integer
// constant 1, suitable for use in #if preprocessing directives.
#ifndef __bool_true_false_are_defined
#undef bool
#undef false
#undef true
#undef bool
typedef enum
{
false = 0,
true = 1
} bool;
#ifndef HAVE__BOOL
typedef unsigned char _Bool;
#endif /* HAVE_BOOL */
#define bool _Bool
#define true 1
#define false 0
#define __bool_true_false_are_defined
#endif /* __bool_true_false_are_defined */
/* If it isn't char, what is it ?!*/
typedef unsigned char uint8;