Commit ca79179c by Bernardo Innocenti Committed by Bernardo Innocenti

system.h (bool, [...]): Don't redefine as preprocessor macros in C++.

	* system.h (bool, true, false): Don't redefine as preprocessor macros
	in C++.

From-SVN: r85135
parent 8b91e18c
2004-07-25 Bernardo Innocenti <bernie@develer.com>
* system.h (bool, true, false): Don't redefine as preprocessor macros
in C++.
2004-07-24 Roger Sayle <roger@eyesopen.com> 2004-07-24 Roger Sayle <roger@eyesopen.com>
* expmed.c (init_expmed): A signed modulus by a power of two is * expmed.c (init_expmed): A signed modulus by a power of two is
......
...@@ -505,18 +505,28 @@ extern int snprintf (char *, size_t, const char *, ...); ...@@ -505,18 +505,28 @@ extern int snprintf (char *, size_t, const char *, ...);
and even if it is, it is liable to be buggy. and even if it is, it is liable to be buggy.
This must be after all inclusion of system headers, as some of This must be after all inclusion of system headers, as some of
them will mess us up. */ them will mess us up. */
#undef bool
#undef true
#undef false
#undef TRUE #undef TRUE
#undef FALSE #undef FALSE
#define bool unsigned char #ifdef __cplusplus
#define true 1 /* Obsolete. */
#define false 0 # define TRUE true
# define FALSE false
#else /* !__cplusplus */
# undef bool
# undef true
# undef false
# define bool unsigned char
# define true 1
# define false 0
/* Obsolete. */
# define TRUE true
# define FALSE false
#endif /* !__cplusplus */
#define TRUE true
#define FALSE false
/* Some compilers do not allow the use of unsigned char in bitfields. */ /* Some compilers do not allow the use of unsigned char in bitfields. */
#define BOOL_BITFIELD unsigned int #define BOOL_BITFIELD unsigned int
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment