Fixed various problems with the latest stdbool.h changes, including stdbool.h itself:
- SupportDefs.h only includes stdbool.h if included from C - stdbool.h for C++ now includes a macro for "bool" as defined by that header - stdbool.h does nothing if __bool_true_false_are_defined is already defined - stdbool.h no longer defines a _Bool enum, but defines _Bool as unsigned char, as previously done by SupportDefs.h (the previous version changed the size). - The gensyscalls Jamfile now preprocesses its headers in C++ mode so that "bool" stays "bool", and doesn't become _Bool. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12042 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+18
-11
@@ -1,21 +1,28 @@
|
||||
#ifndef _STDBOOL_H_
|
||||
#define _STDBOOL_H_
|
||||
/*
|
||||
/*
|
||||
* Copyright 2005, Haiku Inc. All Rights Reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
*/
|
||||
#ifndef _STDBOOL_H_
|
||||
#define _STDBOOL_H_
|
||||
|
||||
#ifndef __bool_true_false_are_defined
|
||||
|
||||
#ifndef __cplusplus
|
||||
typedef enum { false = 0, true = 1 } _Bool;
|
||||
#define true 1
|
||||
#define false 0
|
||||
//typedef enum { false = 0, true = 1 } _Bool;
|
||||
// ToDo: this would change the bool size compared to standard BeOS
|
||||
typedef unsigned char _Bool;
|
||||
# define bool _Bool
|
||||
# define true 1
|
||||
# define false 0
|
||||
#else
|
||||
typedef bool _Bool;
|
||||
#define true true
|
||||
#define false false
|
||||
# define _Bool bool
|
||||
# define bool bool
|
||||
# define true true
|
||||
# define false false
|
||||
#endif
|
||||
#define bool _Bool
|
||||
|
||||
#define __bool_true_false_are_defined 1
|
||||
|
||||
#endif // __bool_true_false_are_defined
|
||||
|
||||
#endif /* _STDBOOL_H_ */
|
||||
|
||||
Reference in New Issue
Block a user