[MacPorts] #23674: libsdl 1.2.14 misdetects endianess on PPC non-universal build

MacPorts noreply at macports.org
Sat May 22 12:26:14 PDT 2010


#23674: libsdl 1.2.14 misdetects endianess on PPC non-universal build
------------------------------------------------+---------------------------
 Reporter:  michael.klein@…                     |       Owner:  nox@…           
     Type:  defect                              |      Status:  new             
 Priority:  Normal                              |   Milestone:                  
Component:  ports                               |     Version:  1.8.2           
 Keywords:  haspatch                            |        Port:  libsdl          
------------------------------------------------+---------------------------

Comment(by keybounce@…):

 In fact, it generates 1234 as a constant on a universal build.

 There is no "one" value on a universal build. Oddly, commenting it out
 seems to work better.

 SDL_endian.h has this tidbit:
 {{{
 ...
 /** @name SDL_ENDIANs
  *  The two types of endianness
  */
 /*@{*/
 #define SDL_LIL_ENDIAN  1234
 #define SDL_BIG_ENDIAN  4321
 /*@}*/

 #ifndef SDL_BYTEORDER   /* Not defined in SDL_config.h? */
 #if defined(__hppa__) || \
     defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \
     (defined(__MIPS__) && defined(__MISPEB__)) || \
     defined(__ppc__) || defined(__POWERPC__) || defined(_M_PPC) || \
     defined(__sparc__)
 #define SDL_BYTEORDER   SDL_BIG_ENDIAN
 #else
 ...
 }}}

 It goes through a great deal of trouble to determine at compile time what
 the endian-ness is, as well as defining optimized assembly for byteswap
 routines.

 So, trying to specify a single endian-ness seems to be a bad idea.

-- 
Ticket URL: <http://trac.macports.org/ticket/23674#comment:4>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list