Files
pkgsrc-ng/graphics/s10sh/patches/patch-ac
2016-01-21 23:40:00 +01:00

30 lines
1.0 KiB
Plaintext

$NetBSD: patch-ac,v 1.3 2015/02/23 18:24:00 joerg Exp $
--- bytesex.h.orig 2001-03-13 13:46:18.000000000 +0000
+++ bytesex.h
@@ -3,18 +3,15 @@
#ifndef S10SH_BYTESEX_H
#define S10SH_BYTESEX_H
-#if defined(__i386__) \
- || defined(__alpha__) \
- || (defined(__mips__) && (defined(MIPSEL) || defined (__MIPSEL__)))
+#include <sys/endian.h>
+
+#if defined(_BYTE_ORDER) && defined(_LITTLE_ENDIAN) && (_BYTE_ORDER == _LITTLE_ENDIAN)
#define BYTE_ORDER_LITTLE_ENDIAN
-#elif defined(__mc68000__) \
- || defined (__sparc__) \
- || defined (__sparc) \
- || defined (__PPC__) \
- || (defined(__mips__) && (defined(MIPSEB) || defined (__MIPSEB__)))
+#elif defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && (__BYTE_ORDER == _LITTLE_ENDIAN)
+#elif defined(__BYTE_ORDER) && defined(__BIG_ENDIAN) && (__BYTE_ORDER == _BIG_ENDIAN)
#define BYTE_ORDER_BIG_ENDIAN
#else
-# error can not find the byte order for this architecture, fix bytesex.h
+#error can not find the byte order for this architecture, fix bytesex.h
#endif
#endif /* S10SH_BYTESEX_H */