We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 878

Summary: SDL_config.h has hard-coded definition of SDL_BYTEORDER
Product: SDL Reporter: Jack Jansen <Jack.Jansen>
Component: *don't know*Assignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.0   
Hardware: Other   
OS: Mac OS X (All)   

Description Jack Jansen 2009-11-05 14:20:22 UTC
I'm building "fat" SDL 1.3 libraries for MacOSX, but now I am running into the issue that audio does not work on PowerPC macintoshes if you build the library on an Intel.

The problem is that configure hard-codes the byteorder, which is then stored in SDL_config.h:
---------------
dnl Detect the canonical build and host environments
dnl AC_CANONICAL_HOST
AC_C_BIGENDIAN
if test x$ac_cv_c_bigendian = xyes; then
    AC_DEFINE(SDL_BYTEORDER, 4321)
else
    AC_DEFINE(SDL_BYTEORDER, 1234)
fi
----------------

What is really needed to enable ppc/intel builds is something like
#if __LITTLE_ENDIAN__
#define SDL_BYTEORDER 1234
#else
#define SDL_BYTEORDER 4321
#endif

I have no idea whether this can be integrated in the SDL (maybe through a configure option?), but it would be welcome if it could!
Comment 1 Sam Lantinga 2009-11-08 20:14:35 UTC
This should be fixed in revision 5224.  Thanks!