summaryrefslogtreecommitdiff
path: root/user/gambit-c/s390.patch
diff options
context:
space:
mode:
Diffstat (limited to 'user/gambit-c/s390.patch')
-rw-r--r--user/gambit-c/s390.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/user/gambit-c/s390.patch b/user/gambit-c/s390.patch
new file mode 100644
index 000000000..9580f2e75
--- /dev/null
+++ b/user/gambit-c/s390.patch
@@ -0,0 +1,46 @@
+diff --git a/include/gambit.h.in b/include/gambit.h.in
+index 71e712a7..f8eeb2ea 100644
+--- a/include/gambit.h.in
++++ b/include/gambit.h.in
+@@ -443,11 +443,27 @@
+ #endif
+ #endif
+
++#ifndef ___CPU_s390
++
++#ifdef __s390__
++#define ___CPU_s390
++#else
++#ifdef __s390x__
++#define ___CPU_s390
++#else
++#ifdef __zarch__
++#define ___CPU_s390
++#endif
++#endif
++#endif
++
++#endif
++
+ /*
+ * Determine the byte order endianness based on the processor type.
+- * We assume that all processors are little-endian, except the sparc and
+- * m68k. The PowerPC, MIPS, ARM and Itanium can be either big-endian or
+- * little-endian so extra tests are needed.
++ * We assume that all processors are little-endian, except the sparc,
++ * m68k, and s390. The PowerPC, MIPS, ARM and Itanium can be either
++ * big-endian or little-endian so extra tests are needed.
+ */
+
+ #ifndef ___BIG_ENDIAN
+@@ -484,6 +500,10 @@
+ #define ___BIG_ENDIAN
+ #endif
+
++#ifdef ___CPU_s390
++#define ___BIG_ENDIAN
++#endif
++
+ #ifdef ___CPU_mips
+ #ifdef _MIPSEL
+ #define ___LITTLE_ENDIAN