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