diff --git a/benchmarks/bonnie++/Makefile b/benchmarks/bonnie++/Makefile index 4c6918a50398..9ff61fd57a4b 100644 --- a/benchmarks/bonnie++/Makefile +++ b/benchmarks/bonnie++/Makefile @@ -1,29 +1,30 @@ PORTNAME= bonnie++ PORTVERSION= 1.98 CATEGORIES= benchmarks MASTER_SITES= https://www.coker.com.au/bonnie++/ MAINTAINER= martymac@FreeBSD.org COMMENT= Performance Test of Filesystem I/O WWW= https://www.coker.com.au/bonnie++/ LICENSE= GPLv2 USES= shebangfix tar:tgz +USE_CXXSTD= c++14 GNU_CONFIGURE= yes SHEBANG_FILES= bon_csv2txt.in PORTDOCS= readme.html OPTIONS_DEFINE= DOCS post-patch: @${REINPLACE_CMD} \ 's|/usr/share/|${PREFIX}/share/|g' ${WRKSRC}/bonnie++.8 post-install: @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/readme.html ${STAGEDIR}${DOCSDIR} .include diff --git a/benchmarks/bonnie++/files/patch-bonnie++.cpp b/benchmarks/bonnie++/files/patch-bonnie++.cpp index 12e01be32bfb..556dbb273624 100644 --- a/benchmarks/bonnie++/files/patch-bonnie++.cpp +++ b/benchmarks/bonnie++/files/patch-bonnie++.cpp @@ -1,45 +1,45 @@ ---- bonnie++.cpp.orig 2019-09-02 18:10:39.852145000 +0200 -+++ bonnie++.cpp 2019-09-02 18:12:18.027222000 +0200 -@@ -298,11 +298,7 @@ +--- bonnie++.cpp.orig 2018-09-16 01:13:24 UTC ++++ bonnie++.cpp +@@ -298,11 +298,7 @@ int main(int argc, char *argv[]) { char *sbuf = _strdup(optarg); char *size = strtok(sbuf, ":"); -#ifdef _LARGEFILE64_SOURCE file_size = size_from_str(size, "gt"); -#else - file_size = size_from_str(size, "g"); -#endif char * chunk_size = strtok(NULL, ":"); if(chunk_size) { -@@ -398,15 +394,6 @@ +@@ -398,15 +394,6 @@ int main(int argc, char *argv[]) if(file_size % 1024 > 512) file_size = file_size + 1024 - (file_size % 1024); } -#ifndef _LARGEFILE64_SOURCE - if(file_size == 2048) - file_size = 2047; - if(file_size > 2048) - { - fprintf(stderr, "Large File Support not present, can't do %dM.\n", file_size); - usage(); - } -#endif globals.byte_io_size = min(file_size, globals.byte_io_size); globals.byte_io_size = max(0, globals.byte_io_size); -@@ -479,14 +466,6 @@ +@@ -479,14 +466,6 @@ int main(int argc, char *argv[]) && (directory_max_size < directory_min_size || directory_max_size < 0 || directory_min_size < 0) ) usage(); -#ifndef _LARGEFILE64_SOURCE - if(file_size > (1 << (31 - 20 + globals.io_chunk_bits)) ) - { - fprintf(stderr - , "The small chunk size and large IO size make this test impossible in 32bit.\n"); - usage(); - } -#endif if(file_size && globals.ram && (file_size * concurrency) < (globals.ram * 2) ) { fprintf(stderr diff --git a/benchmarks/bonnie++/files/patch-bonnie.h.in b/benchmarks/bonnie++/files/patch-bonnie.h.in index d6b9d5e1759e..0f3baa575613 100644 --- a/benchmarks/bonnie++/files/patch-bonnie.h.in +++ b/benchmarks/bonnie++/files/patch-bonnie.h.in @@ -1,20 +1,20 @@ ---- bonnie.h.in.orig 2009-07-03 03:39:33 UTC +--- bonnie.h.in.orig 2018-09-13 13:07:36 UTC +++ bonnie.h.in @@ -1,8 +1,6 @@ #ifndef BONNIE #define BONNIE -using namespace std; - #define BON_VERSION "@version@" #define CSV_VERSION "@csv_version@" -@@ -12,6 +10,8 @@ using namespace std; +@@ -11,6 +9,8 @@ using namespace std; + #include #include #include - -+using namespace std; + ++using namespace std; + typedef FILE *PFILE; - #define SemKey 4711 diff --git a/benchmarks/bonnie++/files/patch-duration.cpp b/benchmarks/bonnie++/files/patch-duration.cpp index 3368eb7060de..165556362f6e 100644 --- a/benchmarks/bonnie++/files/patch-duration.cpp +++ b/benchmarks/bonnie++/files/patch-duration.cpp @@ -1,17 +1,17 @@ ---- duration.cpp.orig 2016-06-30 09:41:58.000000000 +0000 -+++ duration.cpp 2016-10-18 20:09:09.173611133 +0000 +--- duration.cpp.orig 2016-06-30 09:41:58 UTC ++++ duration.cpp @@ -1,5 +1,3 @@ -using namespace std; - #include #include "duration.h" -@@ -20,6 +18,8 @@ +@@ -19,6 +17,8 @@ using namespace std; + #include #endif #endif - -+using namespace std; + ++using namespace std; + Duration_Base::Duration_Base() : m_start(0.0) - , m_max(0.0) diff --git a/benchmarks/bonnie++/files/patch-getc_putc.cpp b/benchmarks/bonnie++/files/patch-getc_putc.cpp index 3ff9c2956453..0a501cba3251 100644 --- a/benchmarks/bonnie++/files/patch-getc_putc.cpp +++ b/benchmarks/bonnie++/files/patch-getc_putc.cpp @@ -1,20 +1,20 @@ ---- getc_putc.cpp.orig 2018-09-15 09:00:31.000000000 +0200 -+++ getc_putc.cpp 2019-09-05 12:09:25.705704000 +0200 -@@ -206,7 +206,7 @@ +--- getc_putc.cpp.orig 2018-09-15 07:00:31 UTC ++++ getc_putc.cpp +@@ -206,7 +206,7 @@ int main(int argc, char *argv[]) return 1; } fflush(NULL); - TEST_FUNC_READ("getc()", if( (c = getc(fp)) == EOF), res[Getc]); + TEST_FUNC_READ("getc()", int tmp = getc(fp); c = (char)tmp; if (tmp == EOF), res[Getc]); if(fseek(fp, 0, SEEK_SET) != 0) { fprintf(stderr, "Can't seek.\n"); -@@ -221,7 +221,7 @@ +@@ -221,7 +221,7 @@ int main(int argc, char *argv[]) return 1; } fflush(NULL); - TEST_FUNC_READ("getc_unlocked()", if( (c = getc_unlocked(fp)) == EOF), res[GetcUnlocked]); + TEST_FUNC_READ("getc_unlocked()", int tmp = getc_unlocked(fp); c = (char)tmp; if (tmp == EOF), res[GetcUnlocked]); if(!quiet) printf("done\n"); diff --git a/benchmarks/bonnie++/files/patch-getc_putc_helper.cpp b/benchmarks/bonnie++/files/patch-getc_putc_helper.cpp index a7edca3b1b6c..bdd0c4ddc218 100644 --- a/benchmarks/bonnie++/files/patch-getc_putc_helper.cpp +++ b/benchmarks/bonnie++/files/patch-getc_putc_helper.cpp @@ -1,11 +1,11 @@ ---- getc_putc_helper.cpp.orig 2009-07-03 04:26:05.000000000 +0200 -+++ getc_putc_helper.cpp 2019-09-05 12:09:25.707876000 +0200 -@@ -45,7 +45,7 @@ +--- getc_putc_helper.cpp.orig 2009-07-03 02:26:05 UTC ++++ getc_putc_helper.cpp +@@ -45,7 +45,7 @@ int main(int argc, char *argv[]) return 1; } fflush(NULL); - TEST_FUNC_READ("getc() no thread", if( (c = getc(fp)) == EOF), res[1]); + TEST_FUNC_READ("getc() no thread", int tmp = getc(fp); c = (char)tmp; if (tmp == EOF), res[1]); if(fseek(fp, 0, SEEK_SET) != 0) { fprintf(stderr, "Can't seek.\n"); diff --git a/benchmarks/bonnie++/files/patch-port.h.in b/benchmarks/bonnie++/files/patch-port.h.in index 6c6566bdec7a..3635d9f9bf48 100644 --- a/benchmarks/bonnie++/files/patch-port.h.in +++ b/benchmarks/bonnie++/files/patch-port.h.in @@ -1,18 +1,18 @@ ---- port.h.in.orig 2016-10-18 19:58:02.629657140 +0000 -+++ port.h.in 2016-10-18 20:02:26.501248353 +0000 +--- port.h.in.orig 2016-06-30 09:40:52 UTC ++++ port.h.in @@ -6,14 +6,7 @@ @semun@ @bool@ @snprintf@ -#ifndef _LARGEFILE64_SOURCE -@large_file@ -#endif -#ifdef _LARGEFILE64_SOURCE -#define OFF_T_PRINTF "%lld" -#else -#define OFF_T_PRINTF "%d" -#endif +#define OFF_T_PRINTF "%ld" #if @true_false@ #define false 0 diff --git a/benchmarks/bonnie++/files/patch-rand.h b/benchmarks/bonnie++/files/patch-rand.h index 24ee7dc54583..70721dbb2e64 100644 --- a/benchmarks/bonnie++/files/patch-rand.h +++ b/benchmarks/bonnie++/files/patch-rand.h @@ -1,15 +1,15 @@ ---- rand.h.orig 2016-06-30 09:38:55.000000000 +0000 -+++ rand.h 2016-10-18 20:04:31.159630423 +0000 +--- rand.h.orig 2016-06-30 09:38:55 UTC ++++ rand.h @@ -1,11 +1,11 @@ #ifndef RAND_H #define RAND_H -using namespace std; #include "port.h" #include #include #include +using namespace std; class Rand {