Fix large file support in bonnie++. Remove #ifdef BSD from patch.

OK sthen@
This commit is contained in:
bluhm 2015-08-18 20:41:29 +00:00
parent 52046db400
commit f8bfc1eae8
3 changed files with 12 additions and 17 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.12 2014/12/09 20:46:00 sthen Exp $
# $OpenBSD: Makefile,v 1.13 2015/08/18 20:41:29 bluhm Exp $
# -Winit-self
NOT_FOR_ARCHS= ${GCC3_ARCHS}
@ -6,7 +6,7 @@ NOT_FOR_ARCHS= ${GCC3_ARCHS}
COMMENT= enhanced performance test of filesystem I/O
DISTNAME= bonnie++-1.97
REVISION= 1
REVISION= 2
WRKDIST= ${WRKDIR}/${DISTNAME}.1
CATEGORIES= benchmarks
MASTER_SITES= http://www.coker.com.au/bonnie++/experimental/

View File

@ -1,4 +1,4 @@
$OpenBSD: patch-configure_in,v 1.3 2014/10/13 19:10:44 sthen Exp $
$OpenBSD: patch-configure_in,v 1.4 2015/08/18 20:41:29 bluhm Exp $
--- configure.in.orig Tue Jan 18 21:35:28 2011
+++ configure.in Mon Oct 13 20:09:28 2014
@@ -60,7 +60,7 @@ if [[ -n "$snprintf" ]]; then
@ -10,18 +10,16 @@ $OpenBSD: patch-configure_in,v 1.3 2014/10/13 19:10:44 sthen Exp $
AC_SUBST(linux_pthread)
AC_TRY_COMPILE([#define _GNU_SOURCE
@@ -92,6 +92,14 @@ AC_TRY_RUN([#ifndef _LARGEFILE64_SOURCE
@@ -92,6 +92,12 @@ AC_TRY_RUN([#ifndef _LARGEFILE64_SOURCE
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
+
+#ifdef BSD
+#define O_LARGEFILE 0
+#define off64_t off_t
+#define lseek64 lseek
+#define creat64 creat
+#define open64 open
+#endif
int main () {
int fd;

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-port_h_in,v 1.2 2014/10/13 19:10:44 sthen Exp $
--- port.h.in.orig Wed Dec 24 00:16:16 2008
+++ port.h.in Mon Oct 13 20:09:28 2014
$OpenBSD: patch-port_h_in,v 1.3 2015/08/18 20:41:29 bluhm Exp $
--- port.h.in.orig Wed Dec 24 01:16:16 2008
+++ port.h.in Wed Aug 5 23:15:25 2015
@@ -1,6 +1,8 @@
#ifndef PORT_UNIX_H
#define PORT_UNIX_H
@ -10,22 +10,19 @@ $OpenBSD: patch-port_h_in,v 1.2 2014/10/13 19:10:44 sthen Exp $
#include "conf.h"
#ifndef HAVE_MIN_MAX
@@ -37,10 +39,18 @@
@@ -37,10 +39,11 @@
typedef struct timeval TIMEVAL_TYPE;
#ifdef _LARGEFILE64_SOURCE
+#ifdef BSD
-#define OFF_TYPE off64_t
-#define file_lseek lseek64
-#define file_creat creat64
-#define file_open open64
+#define O_LARGEFILE 0
+#define OFF_TYPE off_t
+#define file_lseek lseek
+#define file_creat creat
+#define file_open open
+#else
#define OFF_TYPE off64_t
#define file_lseek lseek64
#define file_creat creat64
#define file_open open64
+#endif
#else
#define OFF_TYPE off_t
#define file_lseek lseek