Re: [AD] Quick fix for DJGPP compilation

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Thu, 14 Dec 2000, Laurence Withers wrote:

> In reply to Henrik Stokseth <hstokset@xxxxxxxxxx>:
> >that problem has already been dealt with... ;o) 
> 
> As of 0510 GMT (14-Dec), the CVS version doesn't compile on DJGPP.
> Applying the patch fixes it.

oops! you're right, i forgot to remove the rest of the unnecessary casts. well,
i feel lazy now so i just made the bmp_select macro safe instead.

i'm not a big fan of workarounds, that's why i removed that quick fix from cvs.
if you take a look at the source you will understand the problem:

bmp_select((BITMAP *) bmp) was expanded to _farsetsel((BITMAP*) bmp->seg)
the correct is _farsetsel(((BITMAP*) bmp)->seg) see the difference? macros can
be nasty... an innocent cast triggered a warning.

-- 
Sincerely Henrik Stokseth.
-----------------------------------------------------------------------------
"Linux is keyboard friendly. I don't smash it like I used to with Windows."
Homepage: http://hstokset.n3.net  E-mail: hstokset@xxxxxxxxxx



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/