mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-19 19:59:43 +00:00
Fix build with Gcc/libstdc++
PR: ports/188678 Submitted by: Matthew Rezny <matthew@reztek.cz> Tested by: marino
This commit is contained in:
parent
e06788e1d6
commit
782412b4a4
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=353774
@ -3,7 +3,7 @@
|
||||
|
||||
PORTNAME= bonnie++
|
||||
PORTVERSION= 1.97
|
||||
PORTREVISION= 2
|
||||
PORTREVISION= 3
|
||||
CATEGORIES= benchmarks
|
||||
MASTER_SITES= http://www.coker.com.au/bonnie++/experimental/
|
||||
EXTRACT_SUFX= .tgz
|
||||
|
@ -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 @@ $FreeBSD$
|
||||
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 @@ $FreeBSD$
|
||||
- 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();
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user