Beginner with OSLib

Schaefer sf at bonn.iz-soz.de
Mon Sep 18 16:25:56 BST 2000



> -----Original Message-----
> From: Tony van der Hoff [mailto:OSLib at mk-net.demon.co.uk]
> Sent: Monday, September 18, 2000 4:52 PM
> To: oslib-user at compton.nu
> Subject: Re: Beginner with OSLib
> 
> 
> On Mon, 18 Sep 2000, at 14:51:46, Schaefer 
> <sf at bonn.iz-soz.de> wrote on
> the subject "Beginner with OSLib":
> 
> >
> >Well, I got used to change those 'typedef bool' lines nearly 
> everywhere and
> >so I forgot to notify you - the change has been done so quickly...
> >
> 
> Ahh, From the OSLib release notes:
> ------------
>    Note that some gcc users have been undefining |bool| in types.h to
> work round the generated error condition. THIS INTRODUCES AN ERROR, as
> OSLib's bool was typedef'd as an integer (4 bytes), whereas 
> sizeof(bool)
> in g++ is 1 byte. 
>    Anyone who has done this, and got has away with it, should be aware
> of this ticking time-bomb, and amend their code at the earliest
> opportunity.
> ------------
> 
> For example, from Jonathan, on this list:
> 
> <200004261901.MAA29169 at purple.trimedia.sv.sc.philips.com>
>    Now that's what I call a serious bug.
> 
>    It's equally serious in all the cases where there's a |bool| 
> output parameter: e g, almost every service call, and common things 
> like
> 
> 
>       extern void osspriteop_read_sprite_size
>       (
>          osspriteop_flags        flags,
>          osspriteop_area  const *area,
>          osspriteop_id           id,
>          int                    *width,
>          int                    *height,
>          bool                   *mask,
>          os_mode                *mode
>       );
> 
> which, in C++, will be passed a byte pointer, and then write a word 
> to it. It doesn't get much worse than that, I'd say ...
> 
> 
> I hope you're not suggesting you've done *that* :-(

Well, from which release note is that? From the 6.10 one? I don't have that.

I understand the problem and wait for a new types.h. Or can you release that
now?

regards,
André



More information about the oslib-user mailing list