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
65
66
67
68
69
70
71
72
73
74
75
76
|
$NetBSD: patch-ab,v 1.10 2012/01/24 23:45:00 marino Exp $
--- iozone.c.orig 2011-05-06 15:39:00.000000000 +0000
+++ iozone.c
@@ -70,7 +70,7 @@
#include <windows.h>
#include <errno.h>
#else
-#if defined(linux) || defined(solaris) || defined(macosx) || defined(__AIX__) || defined(FreeBSD) || defined(_HPUX_SOURCE)
+#if defined(linux) || defined(solaris) || defined(macosx) || defined(__AIX__) || defined(FreeBSD) || defined(_HPUX_SOURCE) || defined (__NetBSD__) || defined(__DragonFly__)
#include <errno.h>
#else
extern int errno; /* imported for errors */
@@ -285,7 +285,7 @@ THISVERSION,
#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__APPLE__) && !defined(__DragonFly__)
#include <malloc.h>
#endif
-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__) || defined(__DragonFly__)
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__) || defined(__DragonFly__) || defined(__NetBSD__)
#include <stdlib.h>
#include <string.h>
#endif
@@ -441,6 +441,9 @@ struct piovec piov[PVECMAX];
struct iovec piov[PVECMAX];
#define piov_base iov_base
#define piov_len iov_len
+#if defined (__DragonFly__)
+#define DFLY_VECTOR_OFFSET
+#endif
#endif
#endif
@@ -6876,7 +6879,11 @@ long long *data2;
if(odsync)
file_flags |= O_DSYNC;
#endif
-#if defined(_HPUX_SOURCE) || defined(linux) || defined(__FreeBSD__) || defined(__DragonFly__)
+#if defined (__DragonFly__)
+ if(read_sync)
+ file_flags |= O_SYNC;
+#endif
+#if defined(_HPUX_SOURCE) || defined(linux) || defined(__FreeBSD__)
if(read_sync)
file_flags |=O_RSYNC|O_SYNC;
#endif
@@ -10098,7 +10105,11 @@ long long *data1, *data2;
open_flags |=O_DIRECTIO;
#endif
#endif
-#if defined(_HPUX_SOURCE) || defined(linux) || defined(__FreeBSD__) || defined(__DragonFly__)
+#if defined (__DragonFly__)
+ if(read_sync)
+ open_flags |= O_SYNC;
+#endif
+#if defined(_HPUX_SOURCE) || defined(linux) || defined(__FreeBSD__)
if(read_sync)
open_flags |=O_RSYNC|O_SYNC;
#endif
@@ -10454,7 +10465,7 @@ long long *data1,*data2;
purgeit(piov[xx].piov_base,reclen);
}
if(pwritev(fd, piov,numvecs
-#ifndef PER_VECTOR_OFFSET
+#if defined(PER_VECTOR_OFFSET) || defined(DFLY_VECTOR_OFFSET)
, list_off[0]
#endif
) != (reclen*numvecs))
@@ -10781,7 +10792,7 @@ long long *data1,*data2;
purgeit(piov[xx].piov_base,reclen);
}
if(preadv(fd, piov, numvecs
-#ifndef PER_VECTOR_OFFSET
+#if defined(PER_VECTOR_OFFSET) || defined(DFLY_VECTOR_OFFSET)
, list_off[0]
#endif
) != (numvecs * reclen))
|