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 - SDL_config.h has hard-coded definition of SDL_BYTEORDER
Summary: SDL_config.h has hard-coded definition of SDL_BYTEORDER
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: HG 2.0
Hardware: Other Mac OS X (All)
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-05 14:20 UTC by Jack Jansen
Modified: 2009-11-08 20:14 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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!