summaryrefslogtreecommitdiff
path: root/sys-fs/hfsplusutils/files/hfsplusutils-1.0.4-gcc5.patch
blob: 7b3b30c1090a4cc9cebd24c4ae31c063d624d043 (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
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
https://bugs.gentoo.org/580620

--- a/libhfsp/src/blockiter.c
+++ b/libhfsp/src/blockiter.c
@@ -143,9 +143,3 @@
   fail:
     return -1;
 }
-
-/* return current block */
-UInt32 blockiter_curr(blockiter *b) /* inline */
-{
-    return b->e->start_block + b->block;
-}
--- a/libhfsp/src/blockiter.h
+++ b/libhfsp/src/blockiter.h
@@ -52,7 +52,7 @@
 extern int blockiter_skip(blockiter *b, UInt32 skip);
 
 /* return current block */
-extern inline UInt32 blockiter_curr(blockiter *b)
+static inline UInt32 blockiter_curr(blockiter *b)
 {
     return b->e->start_block + b->block;
 }
--- a/libhfsp/src/libhfsp.c
+++ b/libhfsp/src/libhfsp.c
@@ -32,15 +32,5 @@
 
 const char *hfsp_error = "no error";       /* static error string */   
 
-/** helper function to create those Apple 4 byte Signatures */
-UInt32 sig(char c0, char c1, char c2, char c3)
-{
-    UInt32 sig;
-    ((char*)&sig)[0] = c0;
-    ((char*)&sig)[1] = c1;
-    ((char*)&sig)[2] = c2;
-    ((char*)&sig)[3] = c3;
-    return sig;
-}
 
 
--- a/libhfsp/src/libhfsp.h
+++ b/libhfsp/src/libhfsp.h
@@ -90,7 +90,7 @@
 
     
 /** helper function to create those Apple 4 byte Signatures */
-extern inline UInt32 sig(char c0, char c1, char c2, char c3)
+static inline UInt32 sig(char c0, char c1, char c2, char c3)
 {
     UInt32 sig;
     ((char*)&sig)[0] = c0;
--- a/libhfsp/src/volume.c
+++ b/libhfsp/src/volume.c
@@ -604,14 +604,6 @@
     vol->extents = NULL;    
 }
 
-/* accessor for entends btree, is created on demand */
-/* inline */ btree* volume_get_extents_tree(volume* vol) 
-{
-    if (!vol->extents)
-	volume_create_extents_tree(vol);
-    return vol->extents;
-}
-
 /* return new Id for files/folder and check for overflow.
  *
  * retun 0 on error .
--- a/libhfsp/src/volume.h
+++ b/libhfsp/src/volume.h
@@ -75,7 +75,7 @@
 extern void volume_create_extents_tree(volume* vol);
 
 /* accessor for entends btree, is created on demand */
-extern inline btree* volume_get_extents_tree(volume* vol) 
+static inline btree* volume_get_extents_tree(volume* vol)
 {
     if (!vol->extents)
 	volume_create_extents_tree(vol);
--- a/src/darray.c
+++ b/src/darray.c
@@ -65,16 +65,6 @@
   return (array->eltend - array->mem) / array->elemsz;
 }
 
-/*
- * NAME:	darray->array()
- * DESCRIPTION:	return the array as an indexable block
- */
-inline
-void *darray_array(darray *array)
-{
-  return (void *) array->mem;
-}
-
 
 /*
  * NAME:	darray->append()
--- a/src/darray.h
+++ b/src/darray.h
@@ -40,7 +40,7 @@
 extern	void	    darray_sort(darray *, int (*)(const void *, const void *));
 
 /* return the array as an indexable block */
-extern inline void *darray_array(darray *array)
+static inline void *darray_array(darray *array)
 {
   return (void *) array->mem;
 }
--- a/src/dlist.c
+++ b/src/dlist.c
@@ -60,24 +60,6 @@
 }
 
 /*
- * NAME:	dlist->array()
- * DESCRIPTION:	return the array of strings in a list; can dispose with free()
- */
-char **dlist_array(dlist *list)
-{
-    return (char **) list->mem;
-} 
-
-/*
- * NAME:	dlist->size()
- * DESCRIPTION:	return the number of strings in a list
- */
-int dlist_size(dlist *list)
-{
-  return list->eltend - (char **) list->mem;
-}
-
-/*
  * NAME:	dlist->append()
  * DESCRIPTION:	insert a string to the end of a list
  */
--- a/src/dlist.h
+++ b/src/dlist.h
@@ -36,13 +36,13 @@
 extern int	dlist_append(dlist *, const char *);
 
 /* return the array of strings in a list; can dispose with free() */
-extern inline char **dlist_array(dlist *list)
+static inline char **dlist_array(dlist *list)
 {
     return (char **) list->mem;
 } 
 
 /* return the number of strings in a list */
-extern inline int dlist_size(dlist *list)
+static inline int dlist_size(dlist *list)
 {
   return list->eltend - (char **) list->mem;
 }
--- a/src/dstring.c
+++ b/src/dstring.c
@@ -124,24 +124,6 @@
     return 0;
 }
 
-/*
- * NAME:	dstring->string()
- * DESCRIPTION:	return a pointer to a dynamic string's content
- */
-char *dstring_string(dstring *string)
-{
-  return string->str;
-}
-
-/*
- * NAME:	dstring->length()
- * DESCRIPTION:	return the length of a dynamic string
- */
-int dstring_length(dstring *string)
-{
-  return string->len;
-}
-
 
 /*
  * NAME:	dstring->shrink()
--- a/src/dstring.h
+++ b/src/dstring.h
@@ -42,12 +42,12 @@
 extern void	dstring_shrink(dstring *, size_t);
 extern void	dstring_free(dstring *);
 
-extern inline char	*dstring_string(dstring *string)
+static inline char	*dstring_string(dstring *string)
 {
     return string->str;
 }
 
-extern inline int	dstring_length(dstring *string)
+static inline int	dstring_length(dstring *string)
 {
     return string->len;
 }