blob: 245951957a2c12b287b3b1f2b1ec658bffd0ee01 (
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
33
34
35
|
$NetBSD: patch-m4_byteorder.m4,v 1.1 2016/04/09 10:09:14 richard Exp $
special case SunOS support for byteswapping
--- m4/byteorder.m4.orig 2013-03-17 08:04:49.000000000 +0000
+++ m4/byteorder.m4
@@ -106,6 +106,20 @@ dnl Linux GLIBC
EOF],
[
+dnl SunOS
+ AC_HAVE_SYMBOL(BSWAP_32,sys/byteorder.h,
+dnl sys/byteorder.h should already be implicitly included
+ [cat >> "$1" << EOF
+/* Define generic byte swapping functions */
+EOF
+cat >> "$1" << EOF
+#define swap16(x) BSWAP_16(x)
+#define swap32(x) BSWAP_32(x)
+#define swap64(x) BSWAP_64(x)
+
+EOF],
+
+ [
dnl NetBSD
AC_HAVE_SYMBOL(bswap32,machine/endian.h,
dnl We're already including machine/endian.h if this test succeeds
@@ -190,6 +204,7 @@ EOF
EOF
fi
])
+])
])
])
])
|