Re: [AD] allegro doesn't seem to be 64 bit clean.

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


* Eric Botcazou (ebotcazou@xxxxxxxxxx) [20030131 13:32]:

> > For ISO C99, the right way would be to include inttypes.h and use
> > intptr_t, if that's not available, size_t should be used.
> 
> Unfortunately it is out of question to require ISO C99 compliance: Allegro 
> 4.1.x still supports Watcom 10.6 for example. The standard way to deal with 
> pointer<-->integer conversions in the Allegro codebase is to use 'long int'.

How about wrapping all that in autoconf stuff? Something like this:

  - Create AL_CHECK_INTPTR_T autoconf macro that checks how to best
    determine the type, either by using intptr_t if inttypes.h is
    available or by setting it directly to whatever integer type
    is needed.

  - Introduce AL_INTPTR_T (either define or typedef) and use that in
    the code.

I'm in the process of doing just that and could post my patch when I'm done.

Philipp

-- 
Philipp Thomas <pthomas@xxxxxxxxxx>
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nuremberg, Germany




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