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.6 2006/07/13 13:42:13 adam Exp $
--- iozone.c.orig 2006-04-11 23:42:46.000000000 +0200
+++ iozone.c
@@ -61,12 +61,7 @@
#include <Windows.h>
int errno;
#else
-#if defined(linux)
#include <errno.h>
-#else
-extern int errno; /* imported for errors */
-extern int h_errno; /* imported for errors */
-#endif
#endif
@@ -257,15 +252,15 @@ THISVERSION,
#include <unistd.h>
#include <fcntl.h>
-#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__APPLE__)
+#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__APPLE__) && !defined(__DragonFly__)
#include <malloc.h>
#endif
-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__) || defined(__DragonFly__)
#include <stdlib.h>
#include <string.h>
#endif
-#if defined (__FreeBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__APPLE__)
+#if defined (__FreeBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__APPLE__) || defined(__DragonFly__)
#ifndef O_SYNC
#define O_SYNC O_FSYNC
#endif
@@ -302,25 +297,18 @@ THISVERSION,
#define MAP_FAILED -1
#endif
-#ifdef generic
+#if defined(__DragonFly__)
+#define __off64_t_defined
+typedef off_t off64_t;
+#elif defined(generic)
typedef long long off64_t;
#endif
-#ifndef solaris
-#ifndef off64_t
-#ifndef _OFF64_T
-#ifndef __AIX__
-#ifndef __off64_t_defined
-#ifndef SCO_Unixware_gcc
-#ifndef UWIN
+#if !defined(solaris) && !defined(off64_t) && !defined(_OFF64_T) && \
+ !defined(__AIX__) && !defined(__off64_t_defined) && \
+ !defined(SCO_Unixware_gcc) && !defined(UWIN)
typedef long long off64_t;
#endif
-#endif
-#endif
-#endif
-#endif
-#endif
-#endif
#ifdef __AIX__
#include <fcntl.h>
@@ -331,7 +319,7 @@ typedef long long off64_t;
#endif
#ifdef unix
-#if defined (__APPLE__) || defined(__FreeBSD__)
+#if defined (__APPLE__) || defined(__FreeBSD__) || defined(__DragonFly__)
#include <sys/time.h>
#endif
#include <sys/times.h>
@@ -363,7 +351,7 @@ typedef long long off64_t;
#define MS_ASYNC 0
#endif
-#ifdef bsd4_4
+#if defined(bsd4_4) || defined(__DragonFly__)
#define MAP_ANONYMOUS MAP_ANON
#endif
|