HaikuPorts
  • Login
  • Preferences
  • Help/Guide
  • Wiki
  • Timeline
  • Roadmap
  • View Tickets
  • Search
  • Port Log
  • Blog

Context Navigation

  • Back to app-benchmarks/iozone/3.326/1

app-benchmarks/iozone/3.326/1: iozone-3.326.patch

File iozone-3.326.patch, 7.2 KB (added by thorn, 6 years ago)
  • src/current/fileop.c

    diff -Naur iozone3_326/src/current/fileop.c iozone3_326.haiku/src/current/fileop.c
    old new  
    116116void file_read(int); 
    117117void splash(void); 
    118118void usage(void); 
    119 void bzero(); 
     119//void bzero(); 
    120120void clear_stats(); 
    121121int validate(char *, int , char ); 
    122122 
    … …  
    242242          printf("\nFileop:  Working in %s, File size is %d,  Output is in Ops/sec. (A=Avg, B=Best, W=Worst)\n", thedir, sz); 
    243243        if(!verbose) 
    244244        { 
    245 #ifdef Windows 
     245#if defined(Windows) || defined(Haiku)  
    246246                printf(" .     %7s %7s %7s %7s %7s %7s %7s %7s %7s %7s %7s %7s %7s %10s\n", 
    247247                "mkdir","chdir","rmdir","create","open","read","write","close","stat", 
    248248                "access","chmod","readdir","delete"," Total_files"); 
    … …  
    450450              printf("         Worst readdir(s)/sec = %12.2f (%12.9f seconds/op)\n\n", 
    451451                        1/stats[_STAT_READDIR].worst,stats[_STAT_READDIR].worst); 
    452452           } 
    453 #if !defined(Windows) 
     453#if 0 
    454454           /* 
    455455            * link test  
    456456            */ 
    … …  
    517517                 printf("%7.0f ",stats[_STAT_ACCESS].counter/stats[_STAT_ACCESS].total_time); 
    518518                 printf("%7.0f ",stats[_STAT_CHMOD].counter/stats[_STAT_CHMOD].total_time); 
    519519                 printf("%7.0f ",stats[_STAT_READDIR].counter/stats[_STAT_READDIR].total_time); 
    520 #ifndef Windows 
     520#if !defined(Windows) || !defined(Haiku) 
    521521                 printf("%7.0f ",stats[_STAT_LINK].counter/stats[_STAT_LINK].total_time); 
    522522                 printf("%7.0f ",stats[_STAT_UNLINK].counter/stats[_STAT_UNLINK].total_time); 
    523523#endif 
    … …  
    540540                 printf("%7.0f ",1/stats[_STAT_ACCESS].best); 
    541541                 printf("%7.0f ",1/stats[_STAT_CHMOD].best); 
    542542                 printf("%7.0f ",1/stats[_STAT_READDIR].best); 
    543 #ifndef Windows 
     543#if !defined(Windows) || !defined(Haiku) 
    544544                 printf("%7.0f ",1/stats[_STAT_LINK].best); 
    545545                 printf("%7.0f ",1/stats[_STAT_UNLINK].best); 
    546546#endif 
    … …  
    563563                 printf("%7.0f ",1/stats[_STAT_ACCESS].worst); 
    564564                 printf("%7.0f ",1/stats[_STAT_CHMOD].worst); 
    565565                 printf("%7.0f ",1/stats[_STAT_READDIR].worst); 
    566 #ifndef Windows 
     566#if !defined(Windows) || !defined(Haiku) 
    567567                 printf("%7.0f ",1/stats[_STAT_LINK].worst); 
    568568                 printf("%7.0f ",1/stats[_STAT_UNLINK].worst); 
    569569#endif 
    … …  
    589589        { 
    590590          sprintf(buf,"fileop_L1_%d",i); 
    591591          stats[_STAT_DIR_CREATE].starttime=time_so_far(); 
    592           ret=mkdir(buf,0777); 
     592          ret=mkdir(buf, 0777); 
    593593          if(ret < 0) 
    594594          { 
     595                  printf("ret = %d", ret); 
    595596              printf("Mkdir failed\n"); 
    596597              exit(1); 
    597598          } 
  • src/current/iozone.c

    diff -Naur iozone3_326/src/current/iozone.c iozone3_326.haiku/src/current/iozone.c
    old new  
    5757#include <Windows.h> 
    5858int errno; 
    5959#else 
    60 #if defined(linux) 
     60#if defined(linux) || defined(Haiku) 
    6161#include <errno.h> 
    6262#else 
    6363extern  int errno;   /* imported for errors */ 
    … …  
    7979#include <pthread.h> 
    8080#endif 
    8181 
    82 #if defined(HAVE_ANSIC_C) && defined(linux) 
     82#if defined(HAVE_ANSIC_C) && (defined(linux) || defined(haiku))  
    8383#include <stdlib.h> 
    8484#include <sys/wait.h> 
    8585#endif 
    … …  
    9292int unlink(); 
    9393int main(); 
    9494void record_command_line(); 
    95 #if !defined(linux) 
     95#if !defined(linux) || !defined(haiku) 
    9696int wait(); 
    9797#endif 
    9898int fsync(); 
    … …  
    271271#include <string.h> 
    272272#endif 
    273273 
     274#if defined(__HAIKU__) 
     275#include <malloc.h> 
     276#include <stdlib.h> 
     277#include <string.h> 
     278#endif 
     279 
     280 
    274281#if defined (__FreeBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__APPLE__) || defined(__DragonFly__) 
    275282#ifndef O_SYNC 
    276283#define O_SYNC O_FSYNC 
    … …  
    390397#define MAP_ANONYMOUS MAP_ANON 
    391398#endif 
    392399 
    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) 
    394401#define MAP_FILE (0) 
    395402#endif 
    396403 
  • src/current/iozone_visualizer.pl

    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 
    22 
    33use warnings; 
    44use strict; 
  • src/current/libbif.c

    diff -Naur iozone3_326/src/current/libbif.c iozone3_326.haiku/src/current/libbif.c
    old new  
    1414#include <sys/types.h> 
    1515#include <stdio.h> 
    1616#include <sys/file.h> 
    17 #if defined(__AIX__) || defined(__FreeBSD__) || defined(__DragonFly__) 
     17#if defined(__AIX__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(Haiku) 
    1818#include <fcntl.h> 
    1919#else 
    2020#include <sys/fcntl.h> 
    … …  
    2424#include <string.h> 
    2525#endif 
    2626 
    27 #if defined(linux) || defined(__DragonFly__) || defined(macosx) 
     27#if defined(linux) || defined(__DragonFly__) || defined(macosx) || defined(Haiku) 
    2828#include <unistd.h> 
    2929#include <stdlib.h> 
    3030#endif 
  • src/current/makefile

    diff -Naur iozone3_326/src/current/makefile iozone3_326.haiku/src/current/makefile
    old new  
    3030        @echo "        ->   freebsd              (32bit)   <-" 
    3131        @echo "        ->   generic              (32bit)   <-" 
    3232        @echo "        ->   ghpux                (32bit)   <-" 
     33        @echo "        ->   haiku                (32bit)   <-" 
    3334        @echo "        ->   hpuxs-11.0 (simple)  (32bit)   <-" 
    3435        @echo "        ->   hpux-11.0w           (64bit)   <-" 
    3536        @echo "        ->   hpuxs-11.0w          (64bit)   <-" 
    … …  
    8384        cp ../../iozone*.tar /usr/src/red*/SO* 
    8485        rpmbuild -ba spec.in 
    8586 
     87# 
     88# GNU 'C' compiler Linux build with threads, largefiles, async I/O  
     89# 
     90haiku:  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 
    8693 
    8794# 
    8895# Turn on the optimizer, largefiles, Posix async I/O and threads. 
    … …  
    529536# Now for the machine specific stuff 
    530537# 
    531538 
     539iozone_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 
    532549iozone_hpux.o:  iozone.c libbif.c 
    533550        @echo "" 
    534551        @echo "Building iozone for HP-UX (9.05)" 
    … …  
    695712        $(CC) -Wall -c -O3 -Dunix -Dlinux -DHAVE_ANSIC_C -DASYNC_IO \ 
    696713                -D_LARGEFILE64_SOURCE $(CFLAGS) libasync.c  -o libasync.o  
    697714 
     715fileop_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 
    698722fileop_AIX.o:   fileop.c 
    699723        @echo "" 
    700724        @echo "Building fileop for AIX" 
  • src/current/report.pl

    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 
    22# 
    33# arguments: one of more report files 
    44# 

Download in other formats:

  • Original Format

Trac Powered

Powered by Trac 0.13dev-r10686
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/