diff -Naur iozone3_326/src/current/fileop.c iozone3_326.haiku/src/current/fileop.c
|
old
|
new
|
|
| 116 | 116 | void file_read(int); |
| 117 | 117 | void splash(void); |
| 118 | 118 | void usage(void); |
| 119 | | void bzero(); |
| | 119 | //void bzero(); |
| 120 | 120 | void clear_stats(); |
| 121 | 121 | int validate(char *, int , char ); |
| 122 | 122 | |
| … |
… |
|
| 242 | 242 | printf("\nFileop: Working in %s, File size is %d, Output is in Ops/sec. (A=Avg, B=Best, W=Worst)\n", thedir, sz); |
| 243 | 243 | if(!verbose) |
| 244 | 244 | { |
| 245 | | #ifdef Windows |
| | 245 | #if defined(Windows) || defined(Haiku) |
| 246 | 246 | printf(" . %7s %7s %7s %7s %7s %7s %7s %7s %7s %7s %7s %7s %7s %10s\n", |
| 247 | 247 | "mkdir","chdir","rmdir","create","open","read","write","close","stat", |
| 248 | 248 | "access","chmod","readdir","delete"," Total_files"); |
| … |
… |
|
| 450 | 450 | printf(" Worst readdir(s)/sec = %12.2f (%12.9f seconds/op)\n\n", |
| 451 | 451 | 1/stats[_STAT_READDIR].worst,stats[_STAT_READDIR].worst); |
| 452 | 452 | } |
| 453 | | #if !defined(Windows) |
| | 453 | #if 0 |
| 454 | 454 | /* |
| 455 | 455 | * link test |
| 456 | 456 | */ |
| … |
… |
|
| 517 | 517 | printf("%7.0f ",stats[_STAT_ACCESS].counter/stats[_STAT_ACCESS].total_time); |
| 518 | 518 | printf("%7.0f ",stats[_STAT_CHMOD].counter/stats[_STAT_CHMOD].total_time); |
| 519 | 519 | printf("%7.0f ",stats[_STAT_READDIR].counter/stats[_STAT_READDIR].total_time); |
| 520 | | #ifndef Windows |
| | 520 | #if !defined(Windows) || !defined(Haiku) |
| 521 | 521 | printf("%7.0f ",stats[_STAT_LINK].counter/stats[_STAT_LINK].total_time); |
| 522 | 522 | printf("%7.0f ",stats[_STAT_UNLINK].counter/stats[_STAT_UNLINK].total_time); |
| 523 | 523 | #endif |
| … |
… |
|
| 540 | 540 | printf("%7.0f ",1/stats[_STAT_ACCESS].best); |
| 541 | 541 | printf("%7.0f ",1/stats[_STAT_CHMOD].best); |
| 542 | 542 | printf("%7.0f ",1/stats[_STAT_READDIR].best); |
| 543 | | #ifndef Windows |
| | 543 | #if !defined(Windows) || !defined(Haiku) |
| 544 | 544 | printf("%7.0f ",1/stats[_STAT_LINK].best); |
| 545 | 545 | printf("%7.0f ",1/stats[_STAT_UNLINK].best); |
| 546 | 546 | #endif |
| … |
… |
|
| 563 | 563 | printf("%7.0f ",1/stats[_STAT_ACCESS].worst); |
| 564 | 564 | printf("%7.0f ",1/stats[_STAT_CHMOD].worst); |
| 565 | 565 | printf("%7.0f ",1/stats[_STAT_READDIR].worst); |
| 566 | | #ifndef Windows |
| | 566 | #if !defined(Windows) || !defined(Haiku) |
| 567 | 567 | printf("%7.0f ",1/stats[_STAT_LINK].worst); |
| 568 | 568 | printf("%7.0f ",1/stats[_STAT_UNLINK].worst); |
| 569 | 569 | #endif |
| … |
… |
|
| 589 | 589 | { |
| 590 | 590 | sprintf(buf,"fileop_L1_%d",i); |
| 591 | 591 | stats[_STAT_DIR_CREATE].starttime=time_so_far(); |
| 592 | | ret=mkdir(buf,0777); |
| | 592 | ret=mkdir(buf, 0777); |
| 593 | 593 | if(ret < 0) |
| 594 | 594 | { |
| | 595 | printf("ret = %d", ret); |
| 595 | 596 | printf("Mkdir failed\n"); |
| 596 | 597 | exit(1); |
| 597 | 598 | } |
diff -Naur iozone3_326/src/current/iozone.c iozone3_326.haiku/src/current/iozone.c
|
old
|
new
|
|
| 57 | 57 | #include <Windows.h> |
| 58 | 58 | int errno; |
| 59 | 59 | #else |
| 60 | | #if defined(linux) |
| | 60 | #if defined(linux) || defined(Haiku) |
| 61 | 61 | #include <errno.h> |
| 62 | 62 | #else |
| 63 | 63 | extern int errno; /* imported for errors */ |
| … |
… |
|
| 79 | 79 | #include <pthread.h> |
| 80 | 80 | #endif |
| 81 | 81 | |
| 82 | | #if defined(HAVE_ANSIC_C) && defined(linux) |
| | 82 | #if defined(HAVE_ANSIC_C) && (defined(linux) || defined(haiku)) |
| 83 | 83 | #include <stdlib.h> |
| 84 | 84 | #include <sys/wait.h> |
| 85 | 85 | #endif |
| … |
… |
|
| 92 | 92 | int unlink(); |
| 93 | 93 | int main(); |
| 94 | 94 | void record_command_line(); |
| 95 | | #if !defined(linux) |
| | 95 | #if !defined(linux) || !defined(haiku) |
| 96 | 96 | int wait(); |
| 97 | 97 | #endif |
| 98 | 98 | int fsync(); |
| … |
… |
|
| 271 | 271 | #include <string.h> |
| 272 | 272 | #endif |
| 273 | 273 | |
| | 274 | #if defined(__HAIKU__) |
| | 275 | #include <malloc.h> |
| | 276 | #include <stdlib.h> |
| | 277 | #include <string.h> |
| | 278 | #endif |
| | 279 | |
| | 280 | |
| 274 | 281 | #if defined (__FreeBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__APPLE__) || defined(__DragonFly__) |
| 275 | 282 | #ifndef O_SYNC |
| 276 | 283 | #define O_SYNC O_FSYNC |
| … |
… |
|
| 390 | 397 | #define MAP_ANONYMOUS MAP_ANON |
| 391 | 398 | #endif |
| 392 | 399 | |
| 393 | | #if defined(SCO_Unixware_gcc) || defined(solaris) || defined(UWIN) || defined(SCO) |
| | 400 | #if defined(SCO_Unixware_gcc) || defined(solaris) || defined(UWIN) || defined(SCO) || defined(Haiku) |
| 394 | 401 | #define MAP_FILE (0) |
| 395 | 402 | #endif |
| 396 | 403 | |
diff -Naur iozone3_326/src/current/iozone_visualizer.pl iozone3_326.haiku/src/current/iozone_visualizer.pl
|
old
|
new
|
|
| 1 | | #!/usr/bin/perl |
| | 1 | #!/boot/common/bin/perl |
| 2 | 2 | |
| 3 | 3 | use warnings; |
| 4 | 4 | use strict; |
diff -Naur iozone3_326/src/current/libbif.c iozone3_326.haiku/src/current/libbif.c
|
old
|
new
|
|
| 14 | 14 | #include <sys/types.h> |
| 15 | 15 | #include <stdio.h> |
| 16 | 16 | #include <sys/file.h> |
| 17 | | #if defined(__AIX__) || defined(__FreeBSD__) || defined(__DragonFly__) |
| | 17 | #if defined(__AIX__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(Haiku) |
| 18 | 18 | #include <fcntl.h> |
| 19 | 19 | #else |
| 20 | 20 | #include <sys/fcntl.h> |
| … |
… |
|
| 24 | 24 | #include <string.h> |
| 25 | 25 | #endif |
| 26 | 26 | |
| 27 | | #if defined(linux) || defined(__DragonFly__) || defined(macosx) |
| | 27 | #if defined(linux) || defined(__DragonFly__) || defined(macosx) || defined(Haiku) |
| 28 | 28 | #include <unistd.h> |
| 29 | 29 | #include <stdlib.h> |
| 30 | 30 | #endif |
diff -Naur iozone3_326/src/current/makefile iozone3_326.haiku/src/current/makefile
|
old
|
new
|
|
| 30 | 30 | @echo " -> freebsd (32bit) <-" |
| 31 | 31 | @echo " -> generic (32bit) <-" |
| 32 | 32 | @echo " -> ghpux (32bit) <-" |
| | 33 | @echo " -> haiku (32bit) <-" |
| 33 | 34 | @echo " -> hpuxs-11.0 (simple) (32bit) <-" |
| 34 | 35 | @echo " -> hpux-11.0w (64bit) <-" |
| 35 | 36 | @echo " -> hpuxs-11.0w (64bit) <-" |
| … |
… |
|
| 83 | 84 | cp ../../iozone*.tar /usr/src/red*/SO* |
| 84 | 85 | rpmbuild -ba spec.in |
| 85 | 86 | |
| | 87 | # |
| | 88 | # GNU 'C' compiler Linux build with threads, largefiles, async I/O |
| | 89 | # |
| | 90 | haiku: iozone_haiku.o libbif.o fileop_haiku.o |
| | 91 | $(CC) -O3 $(LDFLAGS) -lnetwork iozone_haiku.o libbif.o -o iozone |
| | 92 | $(CC) -O3 -lnetwork fileop_haiku.o -o fileop |
| 86 | 93 | |
| 87 | 94 | # |
| 88 | 95 | # Turn on the optimizer, largefiles, Posix async I/O and threads. |
| … |
… |
|
| 529 | 536 | # Now for the machine specific stuff |
| 530 | 537 | # |
| 531 | 538 | |
| | 539 | iozone_haiku.o: iozone.c libbif.c |
| | 540 | @echo "" |
| | 541 | @echo "Building iozone for Haiku" |
| | 542 | @echo "" |
| | 543 | $(CC) -Wall -c -O3 -Dunix -DHAVE_ANSIC_C -DHAVE_PREAD \ |
| | 544 | -DNO_MADVISE -DHaiku $(CFLAGS) iozone.c \ |
| | 545 | -DNAME='"haiku"' -o iozone_haiku.o |
| | 546 | $(CC) -Wall -c -O3 -Dunix -DHAVE_ANSIC_C \ |
| | 547 | -DNO_MADVISE -DHaiku $(CFLAGS) libbif.c -o libbif.o |
| | 548 | |
| 532 | 549 | iozone_hpux.o: iozone.c libbif.c |
| 533 | 550 | @echo "" |
| 534 | 551 | @echo "Building iozone for HP-UX (9.05)" |
| … |
… |
|
| 695 | 712 | $(CC) -Wall -c -O3 -Dunix -Dlinux -DHAVE_ANSIC_C -DASYNC_IO \ |
| 696 | 713 | -D_LARGEFILE64_SOURCE $(CFLAGS) libasync.c -o libasync.o |
| 697 | 714 | |
| | 715 | fileop_haiku.o: fileop.c |
| | 716 | @echo "" |
| | 717 | @echo "Building fileop for Haiku" |
| | 718 | @echo "" |
| | 719 | $(CC) -c -O $(CFLAGS) -DHaiku fileop.c -o fileop_haiku.o |
| | 720 | |
| | 721 | |
| 698 | 722 | fileop_AIX.o: fileop.c |
| 699 | 723 | @echo "" |
| 700 | 724 | @echo "Building fileop for AIX" |
diff -Naur iozone3_326/src/current/report.pl iozone3_326.haiku/src/current/report.pl
|
old
|
new
|
|
| 1 | | #!/usr/bin/perl |
| | 1 | #!/boot/common/bin/perl |
| 2 | 2 | # |
| 3 | 3 | # arguments: one of more report files |
| 4 | 4 | # |