blob: 9f1da00036870e2bd34a72f0be899f1bc818db86 (
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
$NetBSD: patch-ab,v 1.17 2022/01/04 16:04:40 triaxx Exp $
Add SunOS byteorder needs.
--- configure.orig 2015-10-04 13:18:39.000000000 +0000
+++ configure
@@ -20903,6 +20903,36 @@ else
$as_echo "no" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSWAP_32 in sys/byteorder.h" >&5
+$as_echo_n "checking for BSWAP_32 in sys/byteorder.h... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/byteorder.h>
+#ifdef BSWAP_32
+ symbol is present
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "symbol is present|\<BSWAP_32\>" >/dev/null 2>&1; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ cat >> "include/byteorder.h" << EOF
+/* Define generic byte swapping functions */
+EOF
+cat >> "include/byteorder.h" << EOF
+#define swap16(x) BSWAP_16(x)
+#define swap32(x) BSWAP_32(x)
+#define swap64(x) BSWAP_64(x)
+
+EOF
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bswap32 in machine/endian.h" >&5
$as_echo_n "checking for bswap32 in machine/endian.h... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -21093,6 +21123,11 @@ rm -f conftest*
+fi
+rm -f conftest*
+
+
+
if test "$HAVE_LE32TOH" != "1"; then
cat >> "$ac_byteorder" << EOF
@@ -8977,6 +9012,8 @@ else
# ifdef _MSC_VER
# include <malloc.h>
# define alloca _alloca
+# elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__OpenBSD__)
+# include <stdlib.h>
# else
# ifdef HAVE_ALLOCA_H
# include <alloca.h>
|