mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-18 00:26:47 +02:00
58 lines
1.8 KiB
Diff
58 lines
1.8 KiB
Diff
|
diff --git a/tests/unit/endian.h b/tests/unit/endian.h
|
||
|
index 5bc8630..3e24763 100644
|
||
|
--- a/tests/unit/endian.h
|
||
|
+++ b/tests/unit/endian.h
|
||
|
@@ -29,47 +29,13 @@
|
||
|
#ifndef BOOST_DETAIL_ENDIAN_HPP
|
||
|
#define BOOST_DETAIL_ENDIAN_HPP
|
||
|
|
||
|
-// GNU libc offers the helpful header <endian.h> which defines
|
||
|
-// __BYTE_ORDER
|
||
|
-
|
||
|
-#if defined (__GLIBC__)
|
||
|
-# include <endian.h>
|
||
|
-# if (__BYTE_ORDER == __LITTLE_ENDIAN)
|
||
|
-# define BOOST_LITTLE_ENDIAN
|
||
|
-# elif (__BYTE_ORDER == __BIG_ENDIAN)
|
||
|
-# define BOOST_BIG_ENDIAN
|
||
|
-# elif (__BYTE_ORDER == __PDP_ENDIAN)
|
||
|
-# define BOOST_PDP_ENDIAN
|
||
|
-# else
|
||
|
-# error Unknown machine endianness detected.
|
||
|
-# endif
|
||
|
-# define BOOST_BYTE_ORDER __BYTE_ORDER
|
||
|
-#elif defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN)
|
||
|
-# define BOOST_BIG_ENDIAN
|
||
|
-# define BOOST_BYTE_ORDER 4321
|
||
|
-#elif defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN)
|
||
|
+#include <endian.h>
|
||
|
+#if (__BYTE_ORDER == __LITTLE_ENDIAN)
|
||
|
# define BOOST_LITTLE_ENDIAN
|
||
|
-# define BOOST_BYTE_ORDER 1234
|
||
|
-#elif defined(__sparc) || defined(__sparc__) \
|
||
|
- || defined(_POWER) || defined(__powerpc__) \
|
||
|
- || defined(__ppc__) || defined(__hpux) || defined(__hppa) \
|
||
|
- || defined(_MIPSEB) || defined(_POWER) \
|
||
|
- || defined(__s390__)
|
||
|
+#elif (__BYTE_ORDER == __BIG_ENDIAN)
|
||
|
# define BOOST_BIG_ENDIAN
|
||
|
-# define BOOST_BYTE_ORDER 4321
|
||
|
-#elif defined(__i386__) || defined(__alpha__) \
|
||
|
- || defined(__ia64) || defined(__ia64__) \
|
||
|
- || defined(_M_IX86) || defined(_M_IA64) \
|
||
|
- || defined(_M_ALPHA) || defined(__amd64) \
|
||
|
- || defined(__amd64__) || defined(_M_AMD64) \
|
||
|
- || defined(__x86_64) || defined(__x86_64__) \
|
||
|
- || defined(_M_X64) || defined(__bfin__)
|
||
|
-
|
||
|
-# define BOOST_LITTLE_ENDIAN
|
||
|
-# define BOOST_BYTE_ORDER 1234
|
||
|
-#else
|
||
|
-# error The file boost/detail/endian.hpp needs to be set up for your CPU type.
|
||
|
+#elif (__BYTE_ORDER == __PDP_ENDIAN)
|
||
|
+# define BOOST_PDP_ENDIAN
|
||
|
#endif
|
||
|
|
||
|
-
|
||
|
#endif
|