svn commit: r353774 - in head/benchmarks/bonnie++: . files

Ganael LAPLANCHE martymac at FreeBSD.org
Mon May 12 06:50:05 UTC 2014


Author: martymac
Date: Mon May 12 06:50:03 2014
New Revision: 353774
URL: http://svnweb.freebsd.org/changeset/ports/353774
QAT: https://qat.redports.org/buildarchive/r353774/

Log:
  Fix build with Gcc/libstdc++
  
  PR:		ports/188678
  Submitted by:	Matthew Rezny <matthew at reztek.cz>
  Tested by:	marino

Modified:
  head/benchmarks/bonnie++/Makefile
  head/benchmarks/bonnie++/files/patch-bonnie++.cpp   (contents, props changed)
  head/benchmarks/bonnie++/files/patch-duration.cpp
  head/benchmarks/bonnie++/files/patch-port.h.in

Modified: head/benchmarks/bonnie++/Makefile
==============================================================================
--- head/benchmarks/bonnie++/Makefile	Mon May 12 06:29:42 2014	(r353773)
+++ head/benchmarks/bonnie++/Makefile	Mon May 12 06:50:03 2014	(r353774)
@@ -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

Modified: head/benchmarks/bonnie++/files/patch-bonnie++.cpp
==============================================================================
--- head/benchmarks/bonnie++/files/patch-bonnie++.cpp	Mon May 12 06:29:42 2014	(r353773)
+++ head/benchmarks/bonnie++/files/patch-bonnie++.cpp	Mon May 12 06:50:03 2014	(r353774)
@@ -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();

Modified: head/benchmarks/bonnie++/files/patch-duration.cpp
==============================================================================
--- head/benchmarks/bonnie++/files/patch-duration.cpp	Mon May 12 06:29:42 2014	(r353773)
+++ head/benchmarks/bonnie++/files/patch-duration.cpp	Mon May 12 06:50:03 2014	(r353774)
@@ -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;
+ }
+ 

Modified: head/benchmarks/bonnie++/files/patch-port.h.in
==============================================================================
--- head/benchmarks/bonnie++/files/patch-port.h.in	Mon May 12 06:29:42 2014	(r353773)
+++ head/benchmarks/bonnie++/files/patch-port.h.in	Mon May 12 06:50:03 2014	(r353774)
@@ -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;


More information about the svn-ports-all mailing list