|Version||alpha 109||Category||Host-Kit||Submitted by||ssolie|
|Summary||BOOL type conflicts|
The BOOL type is currently defined in reb-c.h with an #ifdef protecting it.
With AmigaOS, the BOOL type is typedef'd so the preprocessor protection is bypassed. The AmigaOS BOOL type is a short while the REBOL BOOL type is an int which subsequently causes problems.
I would like to suggest we eliminate the BOOL type in REBOL altogether and instead use the ISO C99 bool (_Bool) type defined in stdbool.h. Each platform should define stdbool.h in their optimal manner.
For those platforms without a stdbool.h we could provide a default implementation which again uses the int type as a default.
For that matter, the width specific types such as i16, u32, etc. could also be replaced by stdint.h.
The idea here is that ISO C99 has a bit more weight behind it than say the AmigaOS standard or the REBOL standard and thus has a better chance of fewer conflicts on the myriad of platforms REBOL could be on.
|Assigned to||n/a||Fixed in||alpha 110||Last Update||1-Nov-2010 01:45|
There's a bit of history on this one and bool has shifted in its definition over the span of R3's implementation. The problem is that of abstract vs concrete datatypes, something that always get's us in trouble in C.
Anyway, I think we can solve this. I'm not sure if C99 is the ideal solution, but we can investigate it and we should try to get this nailed down sooner rather than later.
Not all compilers support it. Therefore we've added:
to the AMIGA section in reb-config.h.
This assumes it is available on all Amiga platforms.
|1-Nov-2010 01:45||carl||Comment : 0002718||Added||-|
|1-Nov-2010 01:42||carl||Fixedin||Modified||=> alpha 110|
|1-Nov-2010 01:42||carl||Status||Modified||reviewed => built|
|29-Oct-2010 01:36||carl||Comment : 0002697||Modified||-|
|29-Oct-2010 01:36||carl||Comment : 0002697||Added||-|
|29-Oct-2010 01:22||carl||Status||Modified||submitted => reviewed|