pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/benchmarks/bonnie++ bonnie++: assume large file suppor...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c3feee11ca19
branches:  trunk
changeset: 381224:c3feee11ca19
user:      maya <maya%pkgsrc.org@localhost>
date:      Fri Jun 01 10:55:52 2018 +0000

description:
bonnie++: assume large file support exists on NetBSD, handle
fallout from it.

NetBSD has large file support without O_LARGEFILE/open64/lseek64.
Not tested on other operating systems, but hopefully a non-functional
change for them.

This is the equivalent of removing the checks for large file support
and using O_LARGEFILE to test for the availability of different functions
for 64bit.

diffstat:

 benchmarks/bonnie++/Makefile                  |   5 +++-
 benchmarks/bonnie++/distinfo                  |   6 +++-
 benchmarks/bonnie++/patches/patch-ab          |  10 ++++++--
 benchmarks/bonnie++/patches/patch-bon__io.cpp |  17 +++++++++++++++
 benchmarks/bonnie++/patches/patch-port.h.in   |  29 +++++++++++++++++++++++++++
 5 files changed, 61 insertions(+), 6 deletions(-)

diffs (112 lines):

diff -r 1f29ee625912 -r c3feee11ca19 benchmarks/bonnie++/Makefile
--- a/benchmarks/bonnie++/Makefile      Fri Jun 01 07:58:27 2018 +0000
+++ b/benchmarks/bonnie++/Makefile      Fri Jun 01 10:55:52 2018 +0000
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.33 2017/08/22 18:51:44 bsiegert Exp $
+# $NetBSD: Makefile,v 1.34 2018/06/01 10:55:52 maya Exp $
 #
 
 DISTNAME=      bonnie++-1.97.3
 CATEGORIES=    benchmarks
+PKGREVISION=   1
 MASTER_SITES=  http://www.coker.com.au/bonnie++/experimental/
 EXTRACT_SUFX=  .tgz
 
@@ -17,6 +18,8 @@
 
 INSTALLATION_DIRS=     bin share/doc/bonnie++ ${PKGMANDIR}/man1 ${PKGMANDIR}/man8
 
+CFLAGS.NetBSD+=                -D_LARGEFILE64_SOURCE=1
+
 # todo: patch bonnie++.8 to point to correct path to readme.html
 post-install:
        ${INSTALL_DATA} ${WRKSRC}/readme.html ${DESTDIR}${PREFIX}/share/doc/bonnie++/
diff -r 1f29ee625912 -r c3feee11ca19 benchmarks/bonnie++/distinfo
--- a/benchmarks/bonnie++/distinfo      Fri Jun 01 07:58:27 2018 +0000
+++ b/benchmarks/bonnie++/distinfo      Fri Jun 01 10:55:52 2018 +0000
@@ -1,7 +1,9 @@
-$NetBSD: distinfo,v 1.11 2017/08/22 18:51:44 bsiegert Exp $
+$NetBSD: distinfo,v 1.12 2018/06/01 10:55:52 maya Exp $
 
 SHA1 (bonnie++-1.97.3.tgz) = 47ce25f21146a63bb007ba94e26adb49c4c15de7
 RMD160 (bonnie++-1.97.3.tgz) = 227f0e6b8e643bdd120e013c4f9f35426b3a7475
 SHA512 (bonnie++-1.97.3.tgz) = 44de20b5e46aeaf7f7214766b3c555b8799138f6fd92f87fe9b7dfa6f19815c629d6122c2ef4e4d98a5528dbfcd4c70b3b850eeba05739f6dd20251bf8d7c893
 Size (bonnie++-1.97.3.tgz) = 100166 bytes
-SHA1 (patch-ab) = ff04e53fb456be781f4e0751ab5776bf8c1b5c0d
+SHA1 (patch-ab) = 18756a4f3efaf8d478c3edc5be424c099c47e374
+SHA1 (patch-bon__io.cpp) = 2ce4504424c8fbf88ee5d1eb21e3556f541a05f4
+SHA1 (patch-port.h.in) = 089d93456efab27a91d5574ed6b8f5956a734620
diff -r 1f29ee625912 -r c3feee11ca19 benchmarks/bonnie++/patches/patch-ab
--- a/benchmarks/bonnie++/patches/patch-ab      Fri Jun 01 07:58:27 2018 +0000
+++ b/benchmarks/bonnie++/patches/patch-ab      Fri Jun 01 10:55:52 2018 +0000
@@ -1,9 +1,13 @@
-$NetBSD: patch-ab,v 1.5 2017/08/22 18:51:44 bsiegert Exp $
+$NetBSD: patch-ab,v 1.6 2018/06/01 10:55:52 maya Exp $
 
 --- Makefile.in.orig   2008-12-30 21:04:25.000000000 +0000
 +++ Makefile.in
-@@ -12,7 +12,7 @@ WFLAGS=-Wall -W -Wshadow -Wpointer-arith
- CFLAGS=-O2 @debug@ -DNDEBUG $(WFLAGS) $(MORECFLAGS)
+@@ -9,10 +9,10 @@ prefix=@prefix@
+ eprefix=@exec_prefix@
+ #MORE_WARNINGS=-Weffc++
+ WFLAGS=-Wall -W -Wshadow -Wpointer-arith -Wwrite-strings -pedantic -ffor-scope -Wcast-align -Wsign-compare -Wpointer-arith -Wwrite-strings -Wformat-security -Wswitch-enum -Winit-self 
$(MORE_WARNINGS)
+-CFLAGS=-O2 @debug@ -DNDEBUG $(WFLAGS) $(MORECFLAGS)
++CFLAGS+=-O2 @debug@ -DNDEBUG $(WFLAGS) $(MORECFLAGS)
  CXX=@CXX@ $(CFLAGS)
  LINK=@CXX@
 -THREAD_LFLAGS=@thread_ldflags@
diff -r 1f29ee625912 -r c3feee11ca19 benchmarks/bonnie++/patches/patch-bon__io.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/benchmarks/bonnie++/patches/patch-bon__io.cpp     Fri Jun 01 10:55:52 2018 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-bon__io.cpp,v 1.1 2018/06/01 10:55:52 maya Exp $
+
+Test specifically for O_LARGEFILE, instead of tying all
+of the largefile support for the LFS functions
+(not available on NetBSD)
+
+--- bon_io.cpp.orig    2009-07-03 02:26:00.000000000 +0000
++++ bon_io.cpp
+@@ -291,7 +291,7 @@ int CFileOp::m_open(CPCCHAR base_name, b
+   else
+   {
+     flags = O_RDWR;
+-#ifdef _LARGEFILE64_SOURCE
++#ifdef O_LARGEFILE
+     flags |= O_LARGEFILE;
+ #endif
+   }
diff -r 1f29ee625912 -r c3feee11ca19 benchmarks/bonnie++/patches/patch-port.h.in
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/benchmarks/bonnie++/patches/patch-port.h.in       Fri Jun 01 10:55:52 2018 +0000
@@ -0,0 +1,29 @@
+$NetBSD: patch-port.h.in,v 1.1 2018/06/01 10:55:52 maya Exp $
+
+Undo the hack of -D_LARGEFILE64_SOURCE=1 in this spot.
+
+e.g. NetBSD does large file support without open64/lseek64/...
+we want the rest of the code to work with large files, but
+can't use this code.
+
+O_LARGEFILE should be available wherever open64 and such are.
+
+--- port.h.in.orig     2016-06-30 09:40:52.000000000 +0000
++++ port.h.in
+@@ -1,6 +1,7 @@
+ #ifndef PORT_UNIX_H
+ #define PORT_UNIX_H
+ 
++#include <unistd.h>
+ #include "conf.h"
+ 
+ @semun@
+@@ -23,7 +24,7 @@
+ // UNIX here
+ typedef struct timeval TIMEVAL_TYPE;
+ 
+-#ifdef _LARGEFILE64_SOURCE
++#ifdef O_LARGEFILE
+ #define OFF_TYPE off64_t
+ #define file_lseek lseek64
+ #define file_creat creat64



Home | Main Index | Thread Index | Old Index