diff -ruN current/iozone.c current-patched/iozone.c --- current/iozone.c Fri May 3 17:06:41 2002 +++ current-patched/iozone.c Tue May 14 09:37:49 2002 @@ -216,11 +216,11 @@ #define __USE_GNU #endif #include -#if !defined(__FreeBSD__) && !defined(__OpenBSD__) +#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__APPLE__) #include #endif -#if defined (__FreeBSD__) || defined(__OpenBSD__) || defined(__bsdi__) +#if defined (__FreeBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__APPLE__) #ifndef O_SYNC #define O_SYNC O_FSYNC #endif @@ -262,6 +262,10 @@ #include #endif +#ifdef __APPLE__ +#include +#endif + #ifdef unix #include #include @@ -281,7 +285,9 @@ #define VOLATILE #endif +#ifndef __APPLE__ #include +#endif #ifdef SHARED_MEM #include diff -ruN current/makefile current-patched/makefile --- current/makefile Fri May 3 17:06:42 2002 +++ current-patched/makefile Tue May 14 09:35:44 2002 @@ -16,6 +16,7 @@ @echo " -> AIX (32bit) <-" @echo " -> bsdi (32bit) <-" @echo " -> convex (32bit) <-" + @echo " -> darwin (32bit) <-" @echo " -> freebsd (32bit) <-" @echo " -> generic (32bit) <-" @echo " -> ghpux (32bit) <-" @@ -265,6 +266,13 @@ cc -O -Dunix -DHAVE_ANSIC_C -DNO_THREADS -DSHARED_MEM \ iozone_freebsd.o libbif.o -o iozone # +# Darwin build with no threads, no largefiles, no async I/O +# + +darwin: iozone_darwin.o libbif.o + cc -O -Dunix -DHAVE_ANSIC_C -DNO_THREADS -DSHARED_MEM \ + iozone_darwin.o libbif.o -o iozone +# # GNU C compiler OpenBSD build with no threads, no largefiles, no async I/O # @@ -623,6 +631,15 @@ @echo "" cc -c -O -Dunix -Dbsd4_2 -DHAVE_ANSIC_C -DNO_THREADS \ -DSHARED_MEM iozone.c -o iozone_freebsd.o + cc -c -O -Dunix -Dbsd4_2 -DHAVE_ANSIC_C -DNO_THREADS \ + -DSHARED_MEM libbif.c -o libbif.o + +iozone_darwin.o: iozone.c libbif.c + @echo "" + @echo "Build iozone for darwin" + @echo "" + cc -c -O -Dunix -Dbsd4_2 -DHAVE_ANSIC_C -DNO_THREADS \ + -DSHARED_MEM iozone.c -o iozone_darwin.o cc -c -O -Dunix -Dbsd4_2 -DHAVE_ANSIC_C -DNO_THREADS \ -DSHARED_MEM libbif.c -o libbif.o