diff options
Diffstat (limited to 'benchmarks/bonnie++/files/patch-bonnie++.cpp')
-rw-r--r-- | benchmarks/bonnie++/files/patch-bonnie++.cpp | 36 |
1 files changed, 7 insertions, 29 deletions
diff --git a/benchmarks/bonnie++/files/patch-bonnie++.cpp b/benchmarks/bonnie++/files/patch-bonnie++.cpp index 2d0cb9272723..550f66b03411 100644 --- a/benchmarks/bonnie++/files/patch-bonnie++.cpp +++ b/benchmarks/bonnie++/files/patch-bonnie++.cpp @@ -1,24 +1,6 @@ ---- bonnie++.cpp.orig 2009-07-03 02:38:14 UTC -+++ bonnie++.cpp -@@ -73,7 +73,7 @@ public: - void set_io_chunk_size(int size) - { delete m_buf; pa_new(size, m_buf, m_buf_pa); m_io_chunk_size = size; } - void set_file_chunk_size(int size) -- { delete m_buf; m_buf = new char[__max(size, m_io_chunk_size)]; m_file_chunk_size = size; } -+ { delete m_buf; m_buf = new char[max(size, m_io_chunk_size)]; m_file_chunk_size = size; } - - // Return the page-aligned version of the local buffer - char *buf() { return m_buf_pa; } -@@ -138,7 +138,7 @@ CGlobalItems::CGlobalItems(bool *exitFla - , m_buf(NULL) - , m_buf_pa(NULL) - { -- pa_new(__max(m_io_chunk_size, m_file_chunk_size), m_buf, m_buf_pa); -+ pa_new(max(m_io_chunk_size, m_file_chunk_size), m_buf, m_buf_pa); - SetName("."); - } - -@@ -294,11 +294,7 @@ int main(int argc, char *argv[]) +--- bonnie++.cpp.orig 2016-06-30 09:41:41.000000000 +0000 ++++ bonnie++.cpp 2016-10-18 19:52:40.381679719 +0000 +@@ -294,11 +294,7 @@ { char *sbuf = _strdup(optarg); char *size = strtok(sbuf, ":"); @@ -30,7 +12,7 @@ size = strtok(NULL, ""); if(size) { -@@ -384,17 +380,8 @@ int main(int argc, char *argv[]) +@@ -384,15 +380,6 @@ if(file_size % 1024 > 512) file_size = file_size + 1024 - (file_size % 1024); } @@ -43,14 +25,10 @@ - usage(); - } -#endif -- globals.byte_io_size = __min(file_size, globals.byte_io_size); -- globals.byte_io_size = __max(0, globals.byte_io_size); -+ globals.byte_io_size = min(file_size, globals.byte_io_size); -+ globals.byte_io_size = max(0, globals.byte_io_size); + globals.byte_io_size = min(file_size, globals.byte_io_size); + globals.byte_io_size = max(0, globals.byte_io_size); - if(machine == NULL) - { -@@ -465,14 +452,6 @@ int main(int argc, char *argv[]) +@@ -465,14 +452,6 @@ && (directory_max_size < directory_min_size || directory_max_size < 0 || directory_min_size < 0) ) usage(); |