2005-03-26 21:01:40 +03:00
|
|
|
/*
|
2005-03-25 20:08:27 +03:00
|
|
|
* Copyright 2005, Haiku Inc. All Rights Reserved.
|
|
|
|
* Distributed under the terms of the MIT License.
|
2005-03-26 21:01:40 +03:00
|
|
|
*/
|
|
|
|
#ifndef _STDBOOL_H_
|
|
|
|
#define _STDBOOL_H_
|
|
|
|
|
|
|
|
#ifndef __bool_true_false_are_defined
|
2003-08-02 08:53:24 +04:00
|
|
|
|
|
|
|
#ifndef __cplusplus
|
2005-04-13 20:51:55 +04:00
|
|
|
# if __GNUC__ < 3
|
|
|
|
// sizeof(_Bool) == 1 must be true for BeOS compatibility
|
2005-03-26 21:01:40 +03:00
|
|
|
typedef unsigned char _Bool;
|
2005-04-13 20:51:55 +04:00
|
|
|
# endif
|
2005-03-26 21:01:40 +03:00
|
|
|
# define bool _Bool
|
|
|
|
# define true 1
|
|
|
|
# define false 0
|
2003-08-02 08:53:24 +04:00
|
|
|
#else
|
2005-03-26 21:01:40 +03:00
|
|
|
# define _Bool bool
|
|
|
|
# define bool bool
|
|
|
|
# define true true
|
|
|
|
# define false false
|
2003-08-02 08:53:24 +04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#define __bool_true_false_are_defined 1
|
|
|
|
|
2005-03-26 21:01:40 +03:00
|
|
|
#endif // __bool_true_false_are_defined
|
|
|
|
|
2003-08-02 08:53:24 +04:00
|
|
|
#endif /* _STDBOOL_H_ */
|