blob: 5dd69e098b57612034b7c9c6ef64bd04209c03f1 (
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
|
$NetBSD: patch-ab,v 1.7 2007/11/21 07:50:14 martti Exp $
--- configure.ac (revision 1235)
+++ configure.ac (working copy)
@@ -49,6 +49,13 @@
/* realloc does not support NULL as argument */
#undef NO_NULL_REALLOC
+/* lets enable madvise defines in netbsd */
+#if defined(__NetBSD__)
+# if !defined(_NETBSD_SOURCE)
+# define _NETBSD_SOURCE
+# endif
+#endif
+
])
AH_BOTTOM([
@@ -58,6 +65,19 @@
#include <fcntl.h>
#endif
+#if !defined HAVE_MADVISE && defined HAVE_POSIX_MADVISE
+/* use posix_madvise family */
+# define madvise posix_madvise
+# define MADV_NORMAL POSIX_MADV_NORMAL
+# define MADV_RANDOM POSIX_MADV_RANDOM
+# define MADV_SEQUENTIAL POSIX_MADV_SEQUENTIAL
+# define MADV_WILLNEED POSIX_MADV_WILLNEED
+# define MADV_DONTNEED POSIX_MADV_DONTNEED
+#endif
+#if defined HAVE_MADVISE || defined HAVE_POSIX_MADVISE
+# define USE_MADVISE 1
+#endif
+
/* define strrchr, strchr and memcpy, memmove in terms of bsd funcs
make sure you are NOT using bcopy, index or rindex in the code */
|