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
77
78
79
80
81
82
83
84
85
86
87
|
$NetBSD: patch-ab,v 1.12 2014/12/09 13:53:13 mef Exp $
Add NetBSD, DragonFly, including correction of typo
--- iozone.c.orig 2012-05-10 05:14:12.000000000 +0000
+++ iozone.c
@@ -70,7 +70,7 @@
#include <windows.h>
#include <errno.h>
#else
-#if defined(linux) || defined(solaris) || defined(IOZ_macosx) || defined(__AIX__) || defined(FreeBSD) || defined(_HPUX_SOURCE) || defined(__OpenBSD__) || defined(__DragonFly__)
+#if defined(linux) || defined(solaris) || defined(IOZ_macosx) || defined(__AIX__) || defined(__FreeBSD__) || defined(_HPUX_SOURCE) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__NetBSD__)
#include <errno.h>
#else
extern int errno; /* imported for errors */
@@ -288,7 +288,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
@@ -299,7 +299,7 @@ THISVERSION,
#endif
#endif
-#if defined (__FreeBSD__) || defined(__DSragonFly__)
+#if defined (__FreeBSD__) || defined(__DragonFly__)
#ifndef O_RSYNC
#define O_RSYNC O_FSYNC
#endif
@@ -444,6 +444,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
@@ -7363,7 +7366,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
@@ -10585,7 +10592,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
@@ -10941,7 +10952,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))
@@ -11268,7 +11279,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))
|