blob: d584c3724c44c290de2a2d9ab2822df3ea0f8443 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
$NetBSD: patch-common_unicode_platform.h,v 1.7 2015/10/09 23:15:34 ryoon Exp $
--- common/unicode/platform.h.orig 2015-10-08 03:53:34.000000000 +0000
+++ common/unicode/platform.h
@@ -159,7 +159,7 @@
# else
# define U_PLATFORM U_PF_DARWIN
# endif
-#elif defined(BSD) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__MirBSD__)
+#elif defined(BSD) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__MirBSD__) || defined(__DragonFly__)
# if defined(__FreeBSD__)
# include <sys/endian.h>
# endif
@@ -388,6 +388,18 @@
# define U_IS_BIG_ENDIAN 1
#elif defined(__LITTLE_ENDIAN__) || defined(_LITTLE_ENDIAN)
# define U_IS_BIG_ENDIAN 0
+#elif U_PLATFORM == U_PF_BSD
+#include <sys/types.h>
+#if defined(__OpenBSD__)
+#include <machine/endian.h>
+#else
+#include <sys/endian.h>
+#endif
+#if _BYTE_ORDER == _LITTLE_ENDIAN
+# define U_IS_BIG_ENDIAN 0
+#else
+# define U_IS_BIG_ENDIAN 1
+#endif
#elif U_PLATFORM == U_PF_OS390 || U_PLATFORM == U_PF_OS400 || defined(__s390__) || defined(__s390x__)
/* These platforms do not appear to predefine any endianness macros. */
# define U_IS_BIG_ENDIAN 1
|