[patch] add support for arm/thumb and superh to endian

find attached a patch to add support for detecting endian on superh and
arm/thumb … also, ive incorporated a patch from Fedora which will gather
the correct endian on a linux host from the system endian.h instead of just
trying to maintain an ever-growing list of architectures
-mike
-------------- next part --------------
A non-text attachment was scrubbed…
Name: sdl-endian-thumb-superh-linux-support.patch
Type: text/x-diff
Size: 1421 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20050901/6b63a627/attachment.patch

Why not just use autoconf’s AC_C_BIGENDIAN macro? Should be more portable.

  • SROn 9/1/05, Mike Frysinger wrote:

find attached a patch to add support for detecting endian on superh and
arm/thumb … also, ive incorporated a patch from Fedora which will gather
the correct endian on a linux host from the system endian.h instead of just
trying to maintain an ever-growing list of architectures
-mike

the comments in the file say this is done via preprocessor macros instead of
configure checks on purpose

if you have a configure check, that means the endian header file (which is
currently a ‘public’ header file for any old application to include) would be
dependent on similar preprocessor’s existing in every build system … you
could make the configure script generate the endian header file so that the
BIGENDAIN define is included in it directly, but then you tie the header
files to the host system which libsdl was built for, and that too has its
disadvantages
-mikeOn Thursday 01 September 2005 09:02 pm, Simon Roby wrote:

On 9/1/05, Mike Frysinger <@Mike_Frysinger> wrote:

find attached a patch to add support for detecting endian on superh and
arm/thumb … also, ive incorporated a patch from Fedora which will
gather the correct endian on a linux host from the system endian.h
instead of just trying to maintain an ever-growing list of architectures

Why not just use autoconf’s AC_C_BIGENDIAN macro? Should be more portable.

find attached a patch to add support for detecting endian on superh and
arm/thumb … also, ive incorporated a patch from Fedora which will gather
the correct endian on a linux host from the system endian.h instead of just
trying to maintain an ever-growing list of architectures

By the way, I don’t think it matters now, but the reason why endian.h wasn’t
included, is because it didn’t compile on certain systems with … I think
kernel 1.2.10

FYI…
-Sam Lantinga, Software Engineer, Blizzard Entertainment