liblcf
liblcf copied to clipboard
Possibly missing byte order swapping when using autotools
trafficstars
While configuring, this warning is shown:
configure.ac:82: warning: AC_C_BIGENDIAN should be used with AC_CONFIG_HEADERS
Reason is AC_C_BIGENDIAN wants to define WORDS_BIGENDIAN (which we use), but since we do not use the normal config.h anymore, this is not possible.
This at least affects the Wii version and Apple universal builds (uncommon nowadays).
We could make this a runtime check. The idiom used in the player is recognized by GCC and replaced with a constant during compile.
though this still appears to work. WORDS_BIGENDIAN is correctly passed on the command line
Yes, the issue is about universal builds mostly.
From config.h in Player:
/* Define if building universal (internal helper macro) */
/* #undef AC_APPLE_UNIVERSAL_BUILD */
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
# if defined __BIG_ENDIAN__
# define WORDS_BIGENDIAN 1
# endif
#else
# ifndef WORDS_BIGENDIAN
/* # undef WORDS_BIGENDIAN */
# endif
#endif