stdbool.h vs SupportDefs.h

Jérome DUVAL <[email protected]>
Newsgroups gmane.os.openbeos.kernel.devel
Message-ID <[email protected]>
Hi,

i have a conflict between stdbool.h and SupportDefs.h so i'm willing to use this for stdbool.h and do an #include <stdbool.h> in SupportDefs.h :

#ifndef _STDBOOL_H_
#define _STDBOOL_H_
/*
** Distributed under the terms of the Haiku License.
*/

#ifndef __cplusplus
typedef enum { false = 0, true = 1 } _Bool;
#define true 1
#define false 0
#else
typedef bool _Bool;
#define true true
#define false false
#endif
#define bool _Bool

#define __bool_true_false_are_defined 1

#endif  /* _STDBOOL_H_ */



in SupportDefs.h these lines would be removed :

#ifndef __cplusplus
typedef enum { false = 0, true = 1 } _Bool;
#define       bool    _Bool
#define false 0
#define true  1
#endif


some comments :
* I know that a stdbool.h is defined by GCC, so we could theorically remove this stdbool.h
* headers/os/drivers/device_manager.h isn't including a stdbool.h, there is a warning about incompatibility with gcc definitions obviously

Thoughts ?

Bye,
Jérôme
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.