FreeBSD Bugzilla – Attachment 141782 Details for
Bug 188678
benchmarks/bonnie++ Clang/libc++ compatibility patch
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
benchmarks_bonnie++_patch.txt
benchmarks_bonnie++_patch.txt (text/plain; charset="UTF-8"), 3.63 KB, created by
Matthew Rezny
on 2014-05-10 11:18:57 UTC
(
hide
)
Description:
benchmarks_bonnie++_patch.txt
Filename:
MIME Type:
Creator:
Matthew Rezny
Created:
2014-05-10 11:18:57 UTC
Size:
3.63 KB
patch
obsolete
>Index: benchmarks/bonnie++/files/patch-bonnie++.cpp >=================================================================== >--- benchmarks/bonnie++/files/patch-bonnie++.cpp (revision 353316) >+++ benchmarks/bonnie++/files/patch-bonnie++.cpp (working copy) >@@ -1,8 +1,24 @@ >-$FreeBSD$ >- >---- bonnie++.cpp.orig Mon Aug 25 17:08:46 2003 >-+++ bonnie++.cpp Mon Aug 25 17:08:46 2003 >-@@ -322,11 +322,7 @@ >+--- bonnie++.cpp.orig 2009-07-03 04:38:14.000000000 +0200 >++++ bonnie++.cpp 2014-05-10 12:04:25.000000000 +0200 >+@@ -73,7 +73,7 @@ >+ 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 @@ >+ , 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 @@ > { > char *sbuf = _strdup(optarg); > char *size = strtok(sbuf, ":"); >@@ -14,7 +30,7 @@ > size = strtok(NULL, ""); > if(size) > { >-@@ -411,15 +407,6 @@ >+@@ -384,17 +380,8 @@ > if(file_size % 1024 > 512) > file_size = file_size + 1024 - (file_size % 1024); > } >@@ -27,10 +43,14 @@ > - 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); > >-@@ -503,14 +490,6 @@ >+ if(machine == NULL) >+ { >+@@ -465,14 +452,6 @@ > && (directory_max_size < directory_min_size || directory_max_size < 0 > || directory_min_size < 0) ) > usage(); >Index: benchmarks/bonnie++/files/patch-duration.cpp >=================================================================== >--- benchmarks/bonnie++/files/patch-duration.cpp (revision 353316) >+++ benchmarks/bonnie++/files/patch-duration.cpp (working copy) >@@ -1,5 +1,5 @@ >---- duration.cpp.orig 2009-08-21 18:45:50.068536643 +0000 >-+++ duration.cpp 2009-08-21 18:45:58.564755017 +0000 >+--- duration.cpp.orig 2008-12-23 23:26:42.000000000 +0100 >++++ duration.cpp 2014-05-10 12:04:40.000000000 +0200 > @@ -1,5 +1,3 @@ > -using namespace std; > - >@@ -15,3 +15,12 @@ > Duration_Base::Duration_Base() > : m_start(0.0) > , m_max(0.0) >+@@ -38,7 +38,7 @@ >+ getTime(&tv); >+ double ret; >+ ret = tv - m_start; >+- m_max = __max(m_max, ret); >++ m_max = max(m_max, ret); >+ return ret; >+ } >+ >Index: benchmarks/bonnie++/files/patch-port.h.in >=================================================================== >--- benchmarks/bonnie++/files/patch-port.h.in (revision 353316) >+++ benchmarks/bonnie++/files/patch-port.h.in (working copy) >@@ -1,5 +1,5 @@ >---- port.h.in.orig 2009-08-21 18:45:50.068536643 +0000 >-+++ port.h.in 2009-08-21 18:45:58.564755017 +0000 >+--- port.h.in.orig 2008-12-24 01:16:16.000000000 +0100 >++++ port.h.in 2014-05-10 12:05:20.000000000 +0200 > @@ -4,12 +4,12 @@ > #include "conf.h" > >@@ -33,3 +33,12 @@ > > #if @true_false@ > #define false 0 >+@@ -49,8 +42,6 @@ >+ #endif >+ >+ typedef int FILE_TYPE; >+-#define __min min >+-#define __max max >+ typedef unsigned int UINT; >+ typedef unsigned long ULONG; >+ typedef const char * PCCHAR;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 188678
:
141780
|
141781
| 141782