mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-09-23 03:33:34 -04:00
34 lines
1.2 KiB
Plaintext
34 lines
1.2 KiB
Plaintext
$NetBSD: patch-ac,v 1.2 2015/02/23 18:27:09 joerg Exp $
|
|
|
|
--- bytesex.h.orig 2003-08-31 17:23:48.000000000 +0000
|
|
+++ bytesex.h
|
|
@@ -7,19 +7,18 @@
|
|
#ifndef ARS_BYTESEX_H
|
|
#define ARS_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(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && (__BYTE_ORDER == _LITTLE_ENDIAN)
|
|
#define BYTE_ORDER_LITTLE_ENDIAN
|
|
-#elif defined(__mc68000__) \
|
|
- || defined (__sparc__) \
|
|
- || defined (__sparc) \
|
|
- || defined (__PPC__) \
|
|
- || defined (__BIG_ENDIAN__) \
|
|
- || (defined(__mips__) && (defined(MIPSEB) || defined (__MIPSEB__)))
|
|
+#elif defined(_BYTE_ORDER) && defined(_BIG_ENDIAN) && (_BYTE_ORDER == _BIG_ENDIAN)
|
|
+#define BYTE_ORDER_BIG_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 /* ARS_BYTESEX_H */
|