[128610] trunk/dports/benchmarks/bonniexx

raimue at macports.org raimue at macports.org
Mon Nov 24 03:09:21 PST 2014


Revision: 128610
          https://trac.macports.org/changeset/128610
Author:   raimue at macports.org
Date:     2014-11-24 03:09:21 -0800 (Mon, 24 Nov 2014)
Log Message:
-----------
benchmarks/bonniexx:
Fix build on Yosemite due to clang throwing errors on min()/max() used in C++.
Not incrementing revision since this change should not change any linkage.

Modified Paths:
--------------
    trunk/dports/benchmarks/bonniexx/Portfile

Added Paths:
-----------
    trunk/dports/benchmarks/bonniexx/files/patch-minmax.diff

Modified: trunk/dports/benchmarks/bonniexx/Portfile
===================================================================
--- trunk/dports/benchmarks/bonniexx/Portfile	2014-11-24 11:00:07 UTC (rev 128609)
+++ trunk/dports/benchmarks/bonniexx/Portfile	2014-11-24 11:09:21 UTC (rev 128610)
@@ -28,7 +28,8 @@
                         patch-port.h.in \
                         patch-zcav.8 \
                         patch-zcav.cpp \
-                        patch-zcav_io.cpp
+                        patch-zcav_io.cpp \
+                        patch-minmax.diff
 
 worksrcdir ${distname}.1
 

Added: trunk/dports/benchmarks/bonniexx/files/patch-minmax.diff
===================================================================
--- trunk/dports/benchmarks/bonniexx/files/patch-minmax.diff	                        (rev 0)
+++ trunk/dports/benchmarks/bonniexx/files/patch-minmax.diff	2014-11-24 11:09:21 UTC (rev 128610)
@@ -0,0 +1,53 @@
+--- bonnie++.cpp.orig	2014-11-24 11:57:57.000000000 +0100
++++ bonnie++.cpp	2014-11-24 11:59:50.000000000 +0100
+@@ -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(".");
+ }
+ 
+@@ -380,8 +380,8 @@
+     if(file_size % 1024 > 512)
+       file_size = file_size + 1024 - (file_size % 1024);
+   }
+-  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)
+   {
+--- duration.cpp.orig	2014-11-24 12:02:36.000000000 +0100
++++ duration.cpp	2014-11-24 12:02:39.000000000 +0100
+@@ -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;
+ }
+ 
+--- port.h.in.orig	2014-11-24 11:59:19.000000000 +0100
++++ port.h.in	2014-11-24 11:59:28.000000000 +0100
+@@ -39,8 +39,6 @@
+ #endif
+ 
+ typedef int FILE_TYPE;
+-#define __min min
+-#define __max max
+ typedef unsigned int UINT;
+ typedef unsigned long ULONG;
+ typedef const char * PCCHAR;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20141124/4ce7cf22/attachment.html>


More information about the macports-changes mailing list