Page 1 of 1

bool conflict in gctype with c99

Posted: Fri Apr 24, 2009 9:53 am
by TheDrev
Hello,

when the c99 standard header <stdbool.h> is include, a conflict with gctypes occur.
It can be resolved with the followings changes :

Code: Select all

// bool is a standard type in cplusplus, but not in c
#ifndef __cplusplus
/** C++ compatible bool for C

*/
typedef enum { false, true } bool;
#endif

Code: Select all

// bool is a standard type in cplusplus, but not in c89 standard.
#ifndef __cplusplus
/** C++ compatible bool for c

*/
#ifndef bool
typedef enum { false, true } bool;
#endif
#endif
It would be nice to add it in the next libogc release.