1 |
patrick 09/03/01 00:15:24 |
2 |
|
3 |
Added: linux-port.patch |
4 |
Log: |
5 |
Initial import from sunrise. Fixes #218223. Ebuild by Cheng Renquan. |
6 |
(Portage version: 2.2_rc23/cvs/Linux x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 app-benchmarks/filebench/files/linux-port.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-benchmarks/filebench/files/linux-port.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-benchmarks/filebench/files/linux-port.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: linux-port.patch |
15 |
=================================================================== |
16 |
Index: filebench-1.2.4/filebench/flowop_library.c |
17 |
=================================================================== |
18 |
--- filebench-1.2.4.orig/filebench/flowop_library.c |
19 |
+++ filebench-1.2.4/filebench/flowop_library.c |
20 |
@@ -789,6 +789,7 @@ flowoplib_aiowait(threadflow_t *threadfl |
21 |
for (ncompleted = 0, inprogress = 0, |
22 |
aio = flowop->fo_thread->tf_aiolist; |
23 |
ncompleted < todo, aio != NULL; aio = aio->al_next) { |
24 |
+ int result; |
25 |
|
26 |
result = aio_error64(&aio->al_aiocb); |
27 |
|
28 |
Index: filebench-1.2.4/filebench/fileset.c |
29 |
=================================================================== |
30 |
--- filebench-1.2.4.orig/filebench/fileset.c |
31 |
+++ filebench-1.2.4/filebench/fileset.c |
32 |
@@ -32,8 +32,9 @@ |
33 |
#include <math.h> |
34 |
#include <libgen.h> |
35 |
#include <sys/mman.h> |
36 |
-#include "fileset.h" |
37 |
+ |
38 |
#include "filebench.h" |
39 |
+#include "fileset.h" |
40 |
#include "gamma_dist.h" |
41 |
|
42 |
/* |
43 |
@@ -631,9 +632,9 @@ fileset_create(fileset_t *fileset) |
44 |
/* we are re-using */ |
45 |
reusing = 1; |
46 |
filebench_log(LOG_VERBOSE, |
47 |
- "Re-using %s %s on %s file system.", |
48 |
+ "Re-using %s %s.", |
49 |
fileset_entity_name(fileset), |
50 |
- fileset_name, sb.st_fstype); |
51 |
+ fileset_name); |
52 |
} |
53 |
} |
54 |
(void) mkdir(path, 0755); |
55 |
Index: filebench-1.2.4/filebench/filebench.h |
56 |
=================================================================== |
57 |
--- filebench-1.2.4.orig/filebench/filebench.h |
58 |
+++ filebench-1.2.4/filebench/filebench.h |
59 |
@@ -32,6 +32,15 @@ |
60 |
|
61 |
#include <stdio.h> |
62 |
#include <string.h> |
63 |
+#include <errno.h> |
64 |
+ |
65 |
+#ifndef HAVE_BOOLEAN_T |
66 |
+typedef enum { B_FALSE, B_TRUE } boolean_t; |
67 |
+#endif |
68 |
+ |
69 |
+#ifndef HAVE_U_LONGLONG_T |
70 |
+typedef unsigned long long u_longlong_t; |
71 |
+#endif |
72 |
|
73 |
#include "vars.h" |
74 |
#include "misc.h" |
75 |
Index: filebench-1.2.4/filebench/eventgen.c |
76 |
=================================================================== |
77 |
--- filebench-1.2.4.orig/filebench/eventgen.c |
78 |
+++ filebench-1.2.4/filebench/eventgen.c |
79 |
@@ -40,9 +40,10 @@ |
80 |
*/ |
81 |
|
82 |
#include <sys/time.h> |
83 |
+ |
84 |
+#include "filebench.h" |
85 |
#include "vars.h" |
86 |
#include "eventgen.h" |
87 |
-#include "filebench.h" |
88 |
#include "flowop.h" |
89 |
#include "ipc.h" |
90 |
|
91 |
Index: filebench-1.2.4/filebench/procflow.c |
92 |
=================================================================== |
93 |
--- filebench-1.2.4.orig/filebench/procflow.c |
94 |
+++ filebench-1.2.4/filebench/procflow.c |
95 |
@@ -30,8 +30,8 @@ |
96 |
#include <sys/stat.h> |
97 |
#include <sys/wait.h> |
98 |
|
99 |
-#include "procflow.h" |
100 |
#include "filebench.h" |
101 |
+#include "procflow.h" |
102 |
#include "flowop.h" |
103 |
#include "ipc.h" |
104 |
|
105 |
@@ -162,7 +162,7 @@ procflow_createproc(procflow_t *procflow |
106 |
} |
107 |
|
108 |
#else |
109 |
- if (execl(execname, procname, "-a", procname, "-i", |
110 |
+ if (execlp(execname, procname, "-a", procname, "-i", |
111 |
instance, "-s", shmaddr, "-m", shmpath, NULL) < 0) { |
112 |
filebench_log(LOG_ERROR, |
113 |
"procflow exec proc failed: %s", |
114 |
Index: filebench-1.2.4/filebench/threadflow.c |
115 |
=================================================================== |
116 |
--- filebench-1.2.4.orig/filebench/threadflow.c |
117 |
+++ filebench-1.2.4/filebench/threadflow.c |
118 |
@@ -31,8 +31,9 @@ |
119 |
#include <sys/lwp.h> |
120 |
#endif |
121 |
#include <signal.h> |
122 |
-#include "threadflow.h" |
123 |
+ |
124 |
#include "filebench.h" |
125 |
+#include "threadflow.h" |
126 |
#include "flowop.h" |
127 |
#include "ipc.h" |
128 |
|
129 |
Index: filebench-1.2.4/filebench/utils.c |
130 |
=================================================================== |
131 |
--- filebench-1.2.4.orig/filebench/utils.c |
132 |
+++ filebench-1.2.4/filebench/utils.c |
133 |
@@ -34,6 +34,8 @@ |
134 |
#ifdef HAVE_STDINT_H |
135 |
#include <stdint.h> |
136 |
#endif |
137 |
+ |
138 |
+#include "filebench.h" |
139 |
#include "utils.h" |
140 |
#include "parsertypes.h" |
141 |
|
142 |
Index: filebench-1.2.4/filebench/vars.c |
143 |
=================================================================== |
144 |
--- filebench-1.2.4.orig/filebench/vars.c |
145 |
+++ filebench-1.2.4/filebench/vars.c |
146 |
@@ -30,12 +30,12 @@ |
147 |
#include <string.h> |
148 |
#include <errno.h> |
149 |
|
150 |
+#include "filebench.h" |
151 |
#include "vars.h" |
152 |
#include "misc.h" |
153 |
#include "utils.h" |
154 |
#include "stats.h" |
155 |
#include "eventgen.h" |
156 |
-#include "filebench.h" |
157 |
#include "fb_random.h" |
158 |
|
159 |
static var_t *var_find_dynamic(char *name); |
160 |
Index: filebench-1.2.4/filebench/parser_gram.y |
161 |
=================================================================== |
162 |
--- filebench-1.2.4.orig/filebench/parser_gram.y |
163 |
+++ filebench-1.2.4/filebench/parser_gram.y |
164 |
@@ -46,8 +46,9 @@ |
165 |
#ifdef HAVE_LIBTECLA |
166 |
#include <libtecla.h> |
167 |
#endif |
168 |
-#include "parsertypes.h" |
169 |
+ |
170 |
#include "filebench.h" |
171 |
+#include "parsertypes.h" |
172 |
#include "utils.h" |
173 |
#include "stats.h" |
174 |
#include "vars.h" |
175 |
@@ -2642,7 +2643,7 @@ parser_help(cmd_t *cmd) |
176 |
} else { |
177 |
filebench_log(LOG_INFO, |
178 |
"load <personality> (ls " |
179 |
- "/usr/benchmarks/filebench/workloads for list)"); |
180 |
+ FILEBENCHDIR "/workloads for list)"); |
181 |
} |
182 |
} |
183 |
|
184 |
Index: filebench-1.2.4/filebench/parser_lex.l |
185 |
=================================================================== |
186 |
--- filebench-1.2.4.orig/filebench/parser_lex.l |
187 |
+++ filebench-1.2.4/filebench/parser_lex.l |
188 |
@@ -38,9 +38,10 @@ |
189 |
#ifdef HAVE_STDINT_H |
190 |
#include <stdint.h> |
191 |
#endif |
192 |
+ |
193 |
+#include "filebench.h" |
194 |
#include "parsertypes.h" |
195 |
#include "utils.h" |
196 |
-#include "filebench.h" |
197 |
|
198 |
#include "parser_gram.h" |
199 |
|
200 |
Index: filebench-1.2.4/filebench/Makefile.am |
201 |
=================================================================== |
202 |
--- filebench-1.2.4.orig/filebench/Makefile.am |
203 |
+++ filebench-1.2.4/filebench/Makefile.am |
204 |
@@ -7,19 +7,19 @@ |
205 |
# |
206 |
|
207 |
bin_PROGRAMS = go_filebench |
208 |
-filebench_SOURCES = gamma_dist.c misc.c procflow.c threadflow.c \ |
209 |
+go_filebench_SOURCES = gamma_dist.c misc.c procflow.c threadflow.c \ |
210 |
utils.c flowop.c flowop_library.c ipc.c \ |
211 |
vars.c stats.c eventgen.c fileset.c fb_random.c \ |
212 |
parser_gram.y parser_lex.l |
213 |
-filebenchdir = $(datadir)/filebench |
214 |
-INCLUDES = -I../intl -DFILEBENCHDIR=\"$(prefix)/filebench\" |
215 |
+INCLUDES = -I../intl -DFILEBENCHDIR=\"$(FILEBENCHDIR)\" |
216 |
|
217 |
MV=@MV@ |
218 |
LEX=@LEX@ |
219 |
YACC=@YACC@ |
220 |
-LFLAGS = @LFLAGS@ |
221 |
-YFLAGS = @YFLAGS@ |
222 |
+AM_LFLAGS = @LFLAGS@ |
223 |
+AM_YFLAGS = @YFLAGS@ |
224 |
DEFS = -D_REENTRANT @DEFINES@ |
225 |
+LIBS = @LDLIBS@ |
226 |
BUILD = @BUILD@ |
227 |
|
228 |
parser_lex.c: parser_lex.l parser_gram.h Makefile |
229 |
Index: filebench-1.2.4/configure.in |
230 |
=================================================================== |
231 |
--- filebench-1.2.4.orig/configure.in |
232 |
+++ filebench-1.2.4/configure.in |
233 |
@@ -73,8 +73,8 @@ case "$host_os$host_cpu" in |
234 |
YFLAGS="-d" |
235 |
AC_DEFINE(HAVE_OFF64_T, 1, |
236 |
[ Define if we can use 64 bit files ]) |
237 |
- FILEBENCHDIR=${prefix}/filebench |
238 |
- FILEBENCHBIN=${prefix}/bin |
239 |
+ FILEBENCHDIR=${datadir}/filebench |
240 |
+ FILEBENCHBIN=${bindir} |
241 |
;; |
242 |
esac |
243 |
|
244 |
@@ -324,6 +324,6 @@ AC_SUBST(SRCDIR) |
245 |
AC_SUBST(FILEBENCHDIR) |
246 |
AC_SUBST(FILEBENCHBIN) |
247 |
|
248 |
-AC_CONFIG_FILES([Makefile filebench/Makefile fastsu/Makefile workloads/Makefile workloads/build/Makefile scripts/Makefile benchpoint/Makefile benchpoint/bin/Makefile benchpoint/config/Makefile benchpoint/functions/Makefile benchpoint/profiles/Makefile]) |
249 |
+AC_CONFIG_FILES([Makefile filebench/Makefile fastsu/Makefile workloads/Makefile workloads/build/Makefile scripts/Makefile benchpoint/Makefile benchpoint/bin/Makefile benchpoint/config/Makefile benchpoint/functions/Makefile benchpoint/profiles/Makefile bin/Makefile]) |
250 |
|
251 |
AC_OUTPUT |
252 |
Index: filebench-1.2.4/fastsu/fastsu.c |
253 |
=================================================================== |
254 |
--- filebench-1.2.4.orig/fastsu/fastsu.c |
255 |
+++ filebench-1.2.4/fastsu/fastsu.c |
256 |
@@ -1,23 +1,26 @@ |
257 |
#include <unistd.h> |
258 |
#include <stdio.h> |
259 |
#include <stdlib.h> |
260 |
-#include <strings.h> |
261 |
+#include <string.h> |
262 |
|
263 |
-void |
264 |
+int |
265 |
main(int argc, char *argv[], char *envp[]) |
266 |
{ |
267 |
char *shell; |
268 |
char cmd[2048]; |
269 |
|
270 |
- *cmd = NULL; |
271 |
+ *cmd = '\0'; |
272 |
shell=getenv("SHELL"); |
273 |
- *(argv++); |
274 |
+ argv++; |
275 |
argc--; |
276 |
while(argc-- != 0) { |
277 |
(void) strcat(cmd,*argv); |
278 |
(void) strcat(cmd," "); |
279 |
- *(argv++); |
280 |
+ argv++; |
281 |
} |
282 |
|
283 |
execlp(shell, shell, "-c", cmd, (char *) 0); |
284 |
+ |
285 |
+ /* control should not reach here */ |
286 |
+ return -1; |
287 |
} |
288 |
Index: filebench-1.2.4/benchpoint/config/Makefile.am |
289 |
=================================================================== |
290 |
--- filebench-1.2.4.orig/benchpoint/config/Makefile.am |
291 |
+++ filebench-1.2.4/benchpoint/config/Makefile.am |
292 |
@@ -6,8 +6,7 @@ |
293 |
# See the file LICENSING in this distribution for details. |
294 |
# |
295 |
|
296 |
-filebenchdir = $(prefix)/filebench |
297 |
-configdir = $(filebenchdir)/config |
298 |
+configdir = ${FILEBENCHDIR}/config |
299 |
|
300 |
config_DATA = *.conf |
301 |
|
302 |
Index: filebench-1.2.4/benchpoint/profiles/Makefile.am |
303 |
=================================================================== |
304 |
--- filebench-1.2.4.orig/benchpoint/profiles/Makefile.am |
305 |
+++ filebench-1.2.4/benchpoint/profiles/Makefile.am |
306 |
@@ -6,8 +6,7 @@ |
307 |
# See the file LICENSING in this distribution for details. |
308 |
# |
309 |
|
310 |
-filebenchdir = $(prefix)/filebench |
311 |
-configdir = $(filebenchdir)/config |
312 |
+configdir = ${FILEBENCHDIR}/config |
313 |
|
314 |
config_DATA = *.prof |
315 |
|
316 |
Index: filebench-1.2.4/bin/Makefile.am |
317 |
=================================================================== |
318 |
--- filebench-1.2.4.orig/bin/Makefile.am |
319 |
+++ filebench-1.2.4/bin/Makefile.am |
320 |
@@ -6,8 +6,5 @@ |
321 |
# See the file LICENSING in this distribution for details. |
322 |
# |
323 |
|
324 |
-filebenchdir = $(prefix)/filebench |
325 |
-scriptsdir = $(filebenchdir)/bin |
326 |
- |
327 |
-scripts_SCRIPTS = filebench |
328 |
+bin_SCRIPTS = filebench |
329 |
|
330 |
Index: filebench-1.2.4/benchpoint/functions/Makefile.am |
331 |
=================================================================== |
332 |
--- filebench-1.2.4.orig/benchpoint/functions/Makefile.am |
333 |
+++ filebench-1.2.4/benchpoint/functions/Makefile.am |
334 |
@@ -6,8 +6,7 @@ |
335 |
# See the file LICENSING in this distribution for details. |
336 |
# |
337 |
|
338 |
-filebenchdir = $(prefix)/filebench |
339 |
-configdir = $(filebenchdir)/config |
340 |
+configdir = ${FILEBENCHDIR}/config |
341 |
|
342 |
config_SCRIPTS = *.func |
343 |
|
344 |
Index: filebench-1.2.4/scripts/Makefile.am |
345 |
=================================================================== |
346 |
--- filebench-1.2.4.orig/scripts/Makefile.am |
347 |
+++ filebench-1.2.4/scripts/Makefile.am |
348 |
@@ -6,8 +6,7 @@ |
349 |
# See the file LICENSING in this distribution for details. |
350 |
# |
351 |
|
352 |
-filebenchdir = $(prefix)/filebench |
353 |
-scriptsdir = $(filebenchdir)/scripts |
354 |
+scriptsdir = ${FILEBENCHDIR}/scripts |
355 |
|
356 |
scripts_SCRIPTS = filebench_compare filebench_summary filebench_plot fs_flush |
357 |
|
358 |
Index: filebench-1.2.4/workloads/Makefile.am |
359 |
=================================================================== |
360 |
--- filebench-1.2.4.orig/workloads/Makefile.am |
361 |
+++ filebench-1.2.4/workloads/Makefile.am |
362 |
@@ -6,8 +6,6 @@ |
363 |
# See the file LICENSING in this distribution for details. |
364 |
# |
365 |
|
366 |
-filebenchdir = $(datadir)/filebench |
367 |
- |
368 |
SUBDIRS = build |
369 |
|
370 |
pkg: filebench |
371 |
Index: filebench-1.2.4/workloads/build/Makefile.am |
372 |
=================================================================== |
373 |
--- filebench-1.2.4.orig/workloads/build/Makefile.am |
374 |
+++ filebench-1.2.4/workloads/build/Makefile.am |
375 |
@@ -6,8 +6,7 @@ |
376 |
# See the file LICENSING in this distribution for details. |
377 |
# |
378 |
|
379 |
-filebenchdir = $(prefix)/filebench |
380 |
-workloadsdir = $(filebenchdir)/workloads |
381 |
+workloadsdir = ${FILEBENCHDIR}/workloads |
382 |
|
383 |
workloads_DATA = BUILD \ |
384 |
bringover.f \ |