Re: [AD] OSX qtmidi.m build failure fix

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


On 4/15/06, Miguel A. Gavidia <juvinious@xxxxxxxxxx> wrote:
> Ok my output is this:
> TARGET_RT_BIG_ENDIAN = 0
> TARGET_RT_LITTLE_ENDIAN = 1
>
> You know though it doesn't matter though, either doing:
> #if or #ifndef TARGET_RT_BIG_ENDIAN
> will work either way.
> As one is defined for each, so either platform won't have both.
> ie:
> ppc will only have TARGET_RT_BIG_ENDIAN
> x86 will only have TARGET_RT_LITTLE_ENDIAN
No, both are defined for both.
On PPC, I get

TARGET_RT_BIG_ENDIAN = 1
TARGET_RT_LITTLE_ENDIAN = 0

So #ifdef wouldn't work, for example

#ifdef TARGET_RT_BIG_ENDIAN
big_endian_code();
#else
little_endian_code();
#endif

would run big_endian_code() even on little-endian platforms.

Hope that makes sense.

Pete




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