changeset 204:a74e2cd93348

- sparc64 endian detection on non-explicit platforms
author Tassilo Philipp
date Wed, 22 Mar 2017 12:02:23 +0100
parents 3999750fae28
children 5edaf22a261e
files dyncall/dyncall_macros.h
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/dyncall/dyncall_macros.h	Tue Mar 21 02:31:55 2017 +0100
+++ b/dyncall/dyncall_macros.h	Wed Mar 22 12:02:23 2017 +0100
@@ -271,13 +271,14 @@
 DC__Arch_Itanium
 DC__Arch_PPC32
 DC__Arch_PPC64
-DC__Arch_Sparc64
 DC__Arch_SuperH
 */
 # if (defined(DC__Arch_PPC64) && (DC__ABI_PPC64_ELF_V == 1)) || defined(_BIG_ENDIAN) || defined(MIPSEB) || defined(__MIPSEB) || defined(__MIPSEB__)
 #  define DC__Endian_BIG
 # elif (defined(DC__Arch_PPC64) && (DC__ABI_PPC64_ELF_V == 2)) || defined(_LITTLE_ENDIAN) || defined(MIPSEL) || defined(__MIPSEL) || defined(__MIPSEL__)
 #  define DC__Endian_LITTLE
+# elif defined(DC__Arch_Sparc64) && !defined(__BYTE_ORDER__) /* Sparc64 default is big-endian, except if explicitly defined */
+#    define DC__Endian_BIG
 # elif defined(__BYTE_ORDER__) /* explicitly set */
 #  if defined(__ORDER_BIG_ENDIAN__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
 #    define DC__Endian_BIG