From 88d5303d191e58a0c71dd3c473c0a89f4f526d8c Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Fri, 13 Aug 1999 22:59:56 +0000 Subject: [PATCH] BYTEORDER fix. p4raw-id: //depot/cfgperl@3983 --- Configure | 12 +++++++++--- config_h.SH | 25 +++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/Configure b/Configure index d3163dc..bb62513 100755 --- a/Configure +++ b/Configure @@ -20,7 +20,7 @@ # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $ # -# Generated on Sat Aug 14 00:51:07 EET DST 1999 [metaconfig 3.0 PL70] +# Generated on Sat Aug 14 02:00:00 EET DST 1999 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.com) cat >/tmp/c1$$ <&4 + echo "I'm guessing that dlsym doesn't need a leading underscore." >&4 fi ;; esac diff --git a/config_h.SH b/config_h.SH index cf449b9..2edfb03 100644 --- a/config_h.SH +++ b/config_h.SH @@ -1092,7 +1092,32 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- * so the default case (for NeXT) is big endian to catch them. * This might matter for NeXT 3.0. */ +#if defined(CROSSCOMPILE) || defined(MULTIARCH) +# ifdef __LITTLE_ENDIAN__ +# if LONGSIZE == 4 +# define BYTEORDER 0x1234 +# else +# if LONGSIZE == 8 +# define BYTEORDER 0x12345678 +# endif +# endif +# else +# ifdef __BIG_ENDIAN__ +# if LONGSIZE == 4 +# define BYTEORDER 0x4321 +# else +# if LONGSIZE == 8 +# define BYTEORDER 0x87654321 +# endif +# endif +# endif +# endif +# if !defined(BYTEORDER) && (defined(NeXT) || defined(__NeXT__)) +# define BYTEORDER 0x4321 +# endif +#else #define BYTEORDER 0x$byteorder /* large digits for MSB */ +#endif /* NeXT */ /* CASTI32: * This symbol is defined if the C compiler can cast negative -- 1.8.3.1