bool conflict in gctype with c99

Post Reply
TheDrev
Posts: 1
Joined: Fri Apr 24, 2009 9:47 am

bool conflict in gctype with c99

Post by TheDrev » Fri Apr 24, 2009 9:53 am

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests