summaryrefslogtreecommitdiff
path: root/sysutils/fusefs-kmod/files/patch-fuse_module_fuse.h
blob: f3a16fe7eb4a7fbfe664d392dbbf4071448cab87 (plain) (blame)
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
--- fuse_module/fuse.h.orig	Thu May  3 13:26:25 2007
+++ fuse_module/fuse.h	Thu May  3 13:26:03 2007
@@ -8,7 +8,15 @@
 
 #ifndef USE_OLD_CLONEHANDLER_API
 #if __FreeBSD_version < 600034 || ( __FreeBSD_version >= 700000 && __FreeBSD_version < 700002 )
-#define USE_OLD_CLONEHANDLER_API 1
+#define USE_OLD_CLONEHANDLER_API
+#endif
+#endif
+
+#ifndef NEW_VNODES_ADJUSTED_MANUALLY
+#if __FreeBSD_version >= 700034
+#define NEW_VNODES_ADJUSTED_MANUALLY 1
+#else
+#define NEW_VNODES_ADJUSTED_MANUALLY 0
 #endif
 #endif
 
@@ -19,10 +27,10 @@
  */
 #if FUSE_KERNELABI_GEQ(7, 3)
 #ifndef FUSE_HAS_ACCESS
-#define FUSE_HAS_ACCESS 1
+#define FUSE_HAS_ACCESS
 #endif
 #ifndef FUSE_HAS_CREATE
-#define FUSE_HAS_CREATE 1
+#define FUSE_HAS_CREATE
 #endif
 #endif
 
@@ -75,7 +83,7 @@
 	size_t len;     /* To keep track of size of the data pushed into base, =< len, of course */
 };
 
-#if ! FUSE_AUX
+#ifndef FUSE_AUX
 #ifndef FUSE_MAX_STORED_FREE_TICKETS
 #define FUSE_MAX_STORED_FREE_TICKETS 0
 #endif
@@ -251,7 +259,7 @@
 	int flags;
 	LIST_HEAD(, fuse_filehandle) fh_head;
 	int fh_counter;
-#if FUSE_HAS_CREATE
+#ifdef FUSE_HAS_CREATE
 	struct componentname *germcnp;
 #endif
 };
@@ -260,6 +268,9 @@
 
 /* Debug related stuff */
 
+#ifndef DEBUGTOLOG
+#define DEBUGTOLOG 0
+#endif
 #if DEBUGTOLOG
 #define dprintf(args ...)  log(LOG_DEBUG, args)
 #else
@@ -267,6 +278,9 @@
 #endif
 
 #define DEBLABEL "[fuse-debug] "
+#ifndef _DEBUG
+#define _DEBUG 0
+#endif
 #if     _DEBUG
 #ifndef _DEBUG2G
 #define _DEBUG2G 1
@@ -280,6 +294,9 @@
 #define DEBUG(args ...)
 #endif
 
+#ifndef _DEBUG2G
+#define _DEBUG2G 0
+#endif
 #if     _DEBUG2G
 #ifndef _DEBUG3G
 #define _DEBUG3G 1
@@ -290,6 +307,9 @@
 #define DEBUG2G(args ...)
 #endif
 
+#ifndef _DEBUG3G
+#define _DEBUG3G 0
+#endif
 #if     _DEBUG3G
 #define DEBUG3G(args, ...)							\
 	printf(DEBLABEL "%s:%d: " args, __func__, __LINE__, ## __VA_ARGS__)
@@ -297,13 +317,19 @@
 #define DEBUG3G(args ...)
 #endif
 
+#ifndef FMASTER
+#define FMASTER 0
+#endif
 #if     FMASTER
 #ifndef _DEBUG_MSGING
 #define _DEBUG_MSGING 1
 #endif
 #endif
 
-#if     _DEBUG_MSGING
+#ifndef _DEBUG_MSG
+#define _DEBUG_MSG 0
+#endif
+#ifdef     _DEBUG_MSGING
 #define fuprintf(args...) \
 	uprintf("[kern] " args)
 #else
@@ -319,7 +345,7 @@
 void fprettyprint(struct fuse_iov *fiov, size_t dlen);
 #endif
 
-#if IGNORE_INLINE
+#ifdef IGNORE_INLINE
 #define __inline
 #endif