--- bonnie++-1.96/port.h.in.orig 2016-02-02 16:27:37.985436571 +0000
+++ bonnie++-1.96/port.h.in 2016-02-02 16:34:54.335729981 +0000
@@ -4,9 +4,9 @@
#include "conf.h"
#ifndef HAVE_MIN_MAX
-#if defined(HAVE_ALGO_H) || defined(HAVE_ALGO)
-#ifdef HAVE_ALGO
-#include <algo>
+#if defined(HAVE_ALGO_H) || defined(HAVE_ALGORITHM)
+#ifdef HAVE_ALGORITHM
+#include <algorithm>
#else
#include <algo.h>
#endif
@@ -49,8 +49,8 @@
#endif
typedef int FILE_TYPE;
-#define __min min
-#define __max max
+// #define __min min
+// #define __max max
typedef unsigned int UINT;
typedef unsigned long ULONG;
typedef const char * PCCHAR;
--- bonnie++-1.96/bonnie++.cpp.orig 2016-02-02 16:35:22.160876227 +0000
+++ bonnie++-1.96/bonnie++.cpp 2016-02-02 16:37:23.018511442 +0000
@@ -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(".");
}
@@ -393,8 +393,8 @@
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);
if(machine == NULL)
{
--- bonnie++-1.96/duration.cpp.orig 2016-02-02 16:40:22.751456099 +0000
+++ bonnie++-1.96/duration.cpp 2016-02-02 16:40:31.686503061 +0000
@@ -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;
}