[haiku-development] Re: stdbool.h

  • From: "scott mc" <scottmc2@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 19 May 2008 16:46:58 -0700

On Mon, May 19, 2008 at 4:29 PM, François Revol <revol@xxxxxxx> wrote:
> I've been porting NetSurf to BeOS (Zeta for now), and hopefully soon to
> Haiku.
> http://revolf.free.fr/beos/shots/shot_beos_netsurf.005.png
>
> Doing that I had to hack around gcc's stdbool.h because it was not
> working somehow, messing up with char vs enum...
> Thing is the netsurf headers are #including it, and when #including
> them from C++ code I had errors. And now it compiles, but I get
> warnings like 'storage size of member foo in class bar ...'
> And I noticed our own still has it typedefed as char.
> Is there something we can do on that ?
> I think standards dictate bool should be #defined to _Bool and true/
> false be #defined too...
>
> François.
>
>

There's at least three ports listed now on HaikuPorts where we had to
work around a stdbool.h issue.  Looks like all three cases we just
undid BeOS specific workarounds to fix them, ie. if defined __BEOS__
&& !defined __HAIKU__
http://tools.assembla.com/BePorts/browser/BePorts/trunk/app-arch/gzip/patches/gzip-1.3.12-stdbool_.h.diff

-scottmc

Other related posts: