Re: [AD] OSX qtmidi.m build failure fix |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: alleg-developers@xxxxxxxxxx
- Subject: Re: [AD] OSX qtmidi.m build failure fix
- From: "Miguel A. Gavidia" <juvinious@xxxxxxxxxx>
- Date: Sun, 16 Apr 2006 04:44:10 +0800
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:from:to:subject:date:user-agent:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=djgfFEVrFX0dFtqkC3i54qYiZ2l+OzLIz2lEWbkezyrQMfeKk95AHfJDyt+yukAPECZJLQkC778xAImd9hUIr6+x5Jyu3+HcAWRNLbSF8PwZma5KjczohsVIK+WZFgXDqbYrXm3Ps94TcIDpSgTdWcBBNBetDbcpF6z1kP2mgmM=
On Sunday 16 April 2006 03:54, Peter Hull wrote:
> 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
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting language
> that extends applications into web and mobile media. Attend the live
> webcast and join the prime developer group breaking into this new coding
> territory!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
Either way your patch was fine.
I would go ahead and commit that, you said it worked on ppc? It worked fine on
x86, the change to #ifndef is unnecessary and would lead to problems as you
said. Makes sense to me. :)
ie:
#if TARGET_RT_BIG_ENDIAN
..
#else
..
#endif
--
-juvinious
<a href="http://chasm.hopto.org">The Chasm</a> - My Site.