mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-07 07:28:57 +02:00
bonnie++ 1.98 (#4169)
Added a patch to enable large file support on Haiku. Now exports additional benchmarking tools: * generate_randfile * getc_putc * getc_putc_helper
This commit is contained in:
committed by
Jérôme Duval
parent
e3fdb45984
commit
03b83a9f01
60
app-benchmarks/bonnie++/patches/bonnie++-1.98.patchset
Normal file
60
app-benchmarks/bonnie++/patches/bonnie++-1.98.patchset
Normal file
@@ -0,0 +1,60 @@
|
||||
From 64c9e52d2704334f4f68a5e7393cd15bf96a9c8b Mon Sep 17 00:00:00 2001
|
||||
From: Kyle Ambroff-Kao <kyle@ambroffkao.com>
|
||||
Date: Sun, 15 Sep 2019 14:45:20 -0700
|
||||
Subject: [PATCH] Fix support for large files on Haiku
|
||||
|
||||
---
|
||||
bon_io.cpp | 2 +-
|
||||
configure.in | 2 ++
|
||||
port.h.in | 2 +-
|
||||
3 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/bon_io.cpp b/bon_io.cpp
|
||||
index bb482f0..4a1c3a6 100644
|
||||
--- a/bon_io.cpp
|
||||
+++ b/bon_io.cpp
|
||||
@@ -292,7 +292,7 @@ int CFileOp::m_open(CPCCHAR base_name, bool create)
|
||||
else
|
||||
{
|
||||
flags = O_RDWR;
|
||||
-#ifdef _LARGEFILE64_SOURCE
|
||||
+#if defined(_LARGEFILE64_SOURCE) && !defined(__HAIKU__)
|
||||
flags |= O_LARGEFILE;
|
||||
#endif
|
||||
}
|
||||
diff --git a/configure.in b/configure.in
|
||||
index 4e75dd2..715819c 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -94,6 +94,7 @@ AC_TRY_RUN([#ifndef _LARGEFILE64_SOURCE
|
||||
#include <stdlib.h>
|
||||
|
||||
int main () {
|
||||
+#ifndef __HAIKU__
|
||||
int fd;
|
||||
off64_t i = off64_t(1) << 32 + 1;
|
||||
const char * const name = "test.2g";
|
||||
@@ -117,6 +118,7 @@ int main () {
|
||||
exit(1);
|
||||
}
|
||||
close(fd);
|
||||
+#endif
|
||||
return 0;
|
||||
}], large_file="yes")
|
||||
if [[ -n "$large_file" ]]; then
|
||||
diff --git a/port.h.in b/port.h.in
|
||||
index 70d748e..5cacfbc 100644
|
||||
--- a/port.h.in
|
||||
+++ b/port.h.in
|
||||
@@ -23,7 +23,7 @@
|
||||
// UNIX here
|
||||
typedef struct timeval TIMEVAL_TYPE;
|
||||
|
||||
-#ifdef _LARGEFILE64_SOURCE
|
||||
+#if defined(_LARGEFILE64_SOURCE) && !defined(__HAIKU__)
|
||||
#define OFF_TYPE off64_t
|
||||
#define file_lseek lseek64
|
||||
#define file_creat creat64
|
||||
--
|
||||
2.23.0
|
||||
|
||||
Reference in New Issue
Block a user