1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-18 19:49:40 +00:00

Update to 5.2.2.

This commit is contained in:
Vanilla I. Shu 2018-05-31 03:53:34 +00:00
parent 8e13ab7430
commit 8221a12992
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=471193
24 changed files with 181 additions and 151 deletions

View File

@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= foundationdb
PORTVERSION= 5.1.7
PORTVERSION= 5.2.2
CATEGORIES= databases
MAINTAINER= vanilla@FreeBSD.org
@ -22,8 +22,10 @@ USES= compiler:c++14-lang gmake mono python:build shebangfix
USE_GITHUB= yes
GH_ACCOUNT= apple
USE_RC_SUBR= foundationdb
SHEBANG_FILES= build/link-wrapper.sh bindings/c/generate_asm.py
SHEBANG_FILES= build/csprojtom4.py build/link-wrapper.sh build/vcxprojtom4.py \
bindings/c/generate_asm.py
MAKE_ENV+= PYTHON=${PYTHON_CMD}
CXXFLAGS+= -Wno-varargs
USERS= ${PORTNAME}
GROUPS= ${PORTNAME}

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1524403792
SHA256 (apple-foundationdb-5.1.7_GH0.tar.gz) = 6dd8b391527fc8070c9714117e0ed2ced50d993b20d64f3f2981bf9ef8734870
SIZE (apple-foundationdb-5.1.7_GH0.tar.gz) = 3982458
TIMESTAMP = 1527730920
SHA256 (apple-foundationdb-5.2.2_GH0.tar.gz) = f632b354cc6ebfdcb5133278901511129a341806d3aa4f4184cc13766f7d841e
SIZE (apple-foundationdb-5.2.2_GH0.tar.gz) = 4495353

View File

@ -1,10 +1,10 @@
--- FDBLibTLS/local.mk.orig 2018-04-19 02:55:50 UTC
--- FDBLibTLS/local.mk.orig 2018-05-16 23:59:08 UTC
+++ FDBLibTLS/local.mk
@@ -1,6 +1,6 @@
-FDBLibTLS_CFLAGS := -fPIC -I/usr/local/include -I$(BOOSTDIR)
-FDBLibTLS_CFLAGS := -fPIC -I/usr/local/include -I$(BOOSTDIR) -Ifdbrpc
-FDBLibTLS_STATIC_LIBS := -ltls -lssl -lcrypto
-FDBLibTLS_LDFLAGS := -L/usr/local/lib -static-libstdc++ -static-libgcc -lrt
+FDBLibTLS_CFLAGS := -fPIC -I/usr/local/include -I$(BOOSTDIR)/include
+FDBLibTLS_CFLAGS := -fPIC -I/usr/local/include -I$(BOOSTDIR)/include -I../fdbrpc
+FDBLibTLS_LIBS := -lssl -lcrypto
+FDBLibTLS_LDFLAGS := -lc++
FDBLibTLS_LDFLAGS += -Wl,-soname,FDBLibTLS.so -Wl,--version-script=FDBLibTLS/FDBLibTLS.map

View File

@ -1,4 +1,4 @@
--- Makefile.orig 2018-04-19 02:55:50 UTC
--- Makefile.orig 2018-05-11 01:30:59 UTC
+++ Makefile
@@ -6,6 +6,8 @@ TOPDIR := $(shell pwd)
@ -43,7 +43,7 @@
OTHER_PROJECTS := bindings/python bindings/ruby bindings/go
CS_MK_GENERATED := $(CS_PROJECTS:=/generated.mk)
@@ -101,7 +112,7 @@ CPP_MK_GENERATED := $(CPP_PROJECTS:=/gen
@@ -101,7 +112,7 @@ CPP_MK_GENERATED := $(CPP_PROJECTS:=/generated.mk)
MK_GENERATED := $(CS_MK_GENERATED) $(CPP_MK_GENERATED)
# build/valgrind.mk needs to be included before any _MK_GENERATED (which in turn includes local.mk)

View File

@ -0,0 +1,55 @@
--- build/csprojtom4.py.orig 2018-05-31 02:58:48 UTC
+++ build/csprojtom4.py
@@ -1,5 +1,5 @@
#!/usr/local/bin/python2.7
-#
+#i
# csprojtom4.py
#
# This source file is part of the FoundationDB open source project
@@ -23,8 +23,8 @@
import sys
if len(sys.argv) != 2:
- print """Usage:
- %s [input]""" % sys.argv[0]
+ print("""Usage:
+ %s [input]""" % sys.argv[0])
sys.exit()
csproj = sys.argv[1]
@@ -34,20 +34,20 @@ from xml.dom.minidom import parse
try:
dom = parse(csproj)
except:
- print "ERROR: Unable to open CSProj file %s" % csproj
+ print("ERROR: Unable to open CSProj file %s" % csproj)
sys.exit()
outputType = dom.getElementsByTagName("OutputType")[0].childNodes[0].data
assemblyName = dom.getElementsByTagName("AssemblyName")[0].childNodes[0].data
if outputType == "Exe":
- print "define(`GENTARGET', `bin/%s.exe')dnl" % assemblyName
- print "define(`GENOUTPUTTYPE', `exe')dnl"
+ print("define(`GENTARGET', `bin/%s.exe')dnl" % assemblyName)
+ print("define(`GENOUTPUTTYPE', `exe')dnl")
elif outputType == "Library":
- print "define(`GENTARGET', `bin/%s.dll')dnl" % assemblyName
- print "define(`GENOUTPUTTYPE', `library')dnl"
+ print("define(`GENTARGET', `bin/%s.dll')dnl" % assemblyName)
+ print("define(`GENOUTPUTTYPE', `library')dnl")
else:
- print "ERROR: Unable to determine output type"
+ print("ERROR: Unable to determine output type")
sys.exit()
sources = [node.getAttribute("Include").replace('\\', '/') for node in
@@ -55,5 +55,5 @@ sources = [node.getAttribute("Include").replace('\\',
assemblies = [node.getAttribute("Include") for node in
dom.getElementsByTagName("Reference")]
-print "define(`GENSOURCES', `%s')dnl" % ' '.join(sources)
-print "define(`GENREFERENCES', `%s')dnl" % ','.join(assemblies)
+print("define(`GENSOURCES', `%s')dnl" % ' '.join(sources))
+print("define(`GENREFERENCES', `%s')dnl" % ','.join(assemblies))

View File

@ -0,0 +1,56 @@
--- build/vcxprojtom4.py.orig 2018-05-31 02:52:54 UTC
+++ build/vcxprojtom4.py
@@ -23,8 +23,8 @@
import sys
if len(sys.argv) != 2:
- print """Usage:
- %s [input]""" % sys.argv[0]
+ print("""Usage:
+ %s [input]""" % sys.argv[0])
sys.exit()
vcxproj = sys.argv[1]
@@ -34,7 +34,7 @@ from xml.dom.minidom import parse
try:
dom = parse(vcxproj)
except:
- print "ERROR: Unable to open VCXProj file %s" % vcxproj
+ print("ERROR: Unable to open VCXProj file %s" % vcxproj)
sys.exit()
# We need to find out what kind of project/configuration we're going
@@ -49,19 +49,19 @@ for group in groups:
configType = ctnodes[0].childNodes[0].data
break
-print "define(`GENCONFIGTYPE', `%s')dnl" % configType
+print("define(`GENCONFIGTYPE', `%s')dnl" % configType)
if configType == "StaticLibrary":
- print "define(`GENTARGET', `lib/lib`'GENNAME.a')dnl"
- print "define(`GENOUTDIR', `lib')dnl"
+ print("define(`GENTARGET', `lib/lib`'GENNAME.a')dnl")
+ print("define(`GENOUTDIR', `lib')dnl")
elif configType == "DynamicLibrary":
- print "define(`GENTARGET', `lib/lib`'GENNAME.$(DLEXT)')dnl"
- print "define(`GENOUTDIR', `lib')dnl"
+ print("define(`GENTARGET', `lib/lib`'GENNAME.$(DLEXT)')dnl")
+ print("define(`GENOUTDIR', `lib')dnl")
elif configType == "Application":
- print "define(`GENTARGET', `bin/'`GENNAME')dnl"
- print "define(`GENOUTDIR', `bin')dnl"
+ print("define(`GENTARGET', `bin/'`GENNAME')dnl")
+ print("define(`GENOUTDIR', `bin')dnl")
else:
- print "ERROR: Unable to determine configuration type"
+ print("ERROR: Unable to determine configuration type")
sys.exit()
sources = [node.getAttribute("Include").replace('\\', '/') for node in
@@ -70,4 +70,4 @@ sources = [node.getAttribute("Include").replace('\\',
dom.getElementsByTagName("ClInclude")
if not node.getElementsByTagName("ExcludedFromBuild") and node.hasAttribute("Include")]
-print "define(`GENSOURCES', `%s')dnl" % ' '.join(sorted(sources))
+print("define(`GENSOURCES', `%s')dnl" % ' '.join(sorted(sources)))

View File

@ -1,11 +0,0 @@
--- fdbclient/MultiVersionAssignmentVars.h.orig 2018-04-29 11:43:19 UTC
+++ fdbclient/MultiVersionAssignmentVars.h
@@ -135,7 +135,7 @@ public:
~DLThreadSingleAssignmentVar() {
lock.assertNotEntered();
if(f) {
- ASSERT(futureRefCount == 1);
+ ASSERT_ABORT(futureRefCount == 1);
api->futureDestroy(f);
}
}

View File

@ -1,20 +0,0 @@
--- fdbclient/NativeAPI.actor.cpp.orig 2018-04-28 15:48:35 UTC
+++ fdbclient/NativeAPI.actor.cpp
@@ -93,7 +93,7 @@ LocationInfo::~LocationInfo() {
for( auto const& alternative : getAlternatives() )
handles.push_back( alternative.v.getVersion.getEndpoint().token ); // must match above choice of UID
std::sort( handles.begin(), handles.end() );
- ASSERT( handles.size() );
+ ASSERT_ABORT( handles.size() );
auto it = cx->ssid_locationInfo.find( handles );
if( it != cx->ssid_locationInfo.end() )
@@ -540,7 +540,7 @@ DatabaseContext::~DatabaseContext() {
monitorMasterProxiesInfoChange.cancel();
for(auto it = ssid_locationInfo.begin(); it != ssid_locationInfo.end(); it = ssid_locationInfo.erase(it))
it->second->notifyContextDestroyed();
- ASSERT( ssid_locationInfo.empty() );
+ ASSERT_ABORT( ssid_locationInfo.empty() );
locationCache.insert( allKeys, Reference<LocationInfo>() );
}

View File

@ -1,4 +1,4 @@
--- fdbmonitor/fdbmonitor.cpp.orig 2018-04-19 02:55:50 UTC
--- fdbmonitor/fdbmonitor.cpp.orig 2018-05-11 01:30:59 UTC
+++ fdbmonitor/fdbmonitor.cpp
@@ -35,6 +35,10 @@
#include <linux/limits.h>
@ -20,7 +20,7 @@
typedef int fdb_fd_set;
#endif
@@ -83,7 +87,7 @@ void monitor_fd( fdb_fd_set list, int fd
@@ -83,7 +87,7 @@ void monitor_fd( fdb_fd_set list, int fd, int* maxfd,
FD_SET( fd, list );
if ( fd > *maxfd )
*maxfd = fd;
@ -29,7 +29,7 @@
/* ignore maxfd */
struct kevent ev;
EV_SET( &ev, fd, EVFILT_READ, EV_ADD, 0, 0, cmd );
@@ -94,7 +98,7 @@ void monitor_fd( fdb_fd_set list, int fd
@@ -94,7 +98,7 @@ void monitor_fd( fdb_fd_set list, int fd, int* maxfd,
void unmonitor_fd( fdb_fd_set list, int fd ) {
#ifdef __linux__
FD_CLR( fd, list );
@ -38,7 +38,7 @@
struct kevent ev;
EV_SET( &ev, fd, EVFILT_READ, EV_DELETE, 0, 0, NULL );
kevent( list, &ev, 1, NULL, 0, NULL ); // FIXME: check?
@@ -188,7 +192,7 @@ const char* get_value_multi(const CSimpl
@@ -188,7 +192,7 @@ const char* get_value_multi(const CSimpleIni& ini, con
}
double timer() {
@ -47,7 +47,7 @@
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
return double(ts.tv_sec) + (ts.tv_nsec * 1e-9);
@@ -822,7 +826,7 @@ void read_child_output( Command* cmd, in
@@ -822,7 +826,7 @@ void read_child_output( Command* cmd, int pipe_idx, fd
}
}
@ -56,7 +56,7 @@
void watch_conf_dir( int kq, int* confd_fd, std::string confdir ) {
struct kevent ev;
std::string original = confdir;
@@ -839,7 +843,7 @@ void watch_conf_dir( int kq, int* confd_
@@ -839,7 +843,7 @@ void watch_conf_dir( int kq, int* confd_fd, std::strin
std::string child = confdir;
/* Find the nearest existing ancestor */
@ -65,7 +65,7 @@
child = confdir;
confdir = parentDirectory(confdir);
}
@@ -876,7 +880,7 @@ void watch_conf_file( int kq, int* conff
@@ -876,7 +880,7 @@ void watch_conf_file( int kq, int* conff_fd, const cha
}
/* Open and watch */
@ -74,7 +74,7 @@
if ( *conff_fd >= 0 ) {
EV_SET( &ev, *conff_fd, EVFILT_VNODE, EV_ADD | EV_CLEAR, NOTE_WRITE | NOTE_ATTRIB, 0, NULL );
kevent( kq, &ev, 1, NULL, 0, NULL );
@@ -983,7 +987,7 @@ std::unordered_map<int, std::unordered_s
@@ -983,7 +987,7 @@ std::unordered_map<int, std::unordered_set<std::string
int main(int argc, char** argv) {
std::string lockfile = "/var/run/fdbmonitor.pid";

View File

@ -1,4 +1,4 @@
--- fdbrpc/AsyncFileCached.actor.cpp.orig 2018-04-19 02:55:50 UTC
--- fdbrpc/AsyncFileCached.actor.cpp.orig 2018-05-30 22:33:28 UTC
+++ fdbrpc/AsyncFileCached.actor.cpp
@@ -31,7 +31,7 @@ EvictablePage::~EvictablePage() {
if (pageCache->pageSize == 4096)
@ -9,12 +9,3 @@
}
if (index > -1) {
pageCache->pages[index] = pageCache->pages.back();
@@ -233,7 +233,7 @@ Future<Void> AsyncFileCached::quiesce()
AsyncFileCached::~AsyncFileCached() {
while ( !pages.empty() ) {
auto ok = pages.begin()->second->evict();
- ASSERT( ok );
+ ASSERT_ABORT( ok );
}
openFiles.erase( filename );
}

View File

@ -1,11 +0,0 @@
--- fdbrpc/AsyncFileCached.actor.h.orig 2018-04-28 14:44:18 UTC
+++ fdbrpc/AsyncFileCached.actor.h
@@ -450,7 +450,7 @@ struct AFCPage : public EvictablePage, p
virtual ~AFCPage() {
clearDirty();
- ASSERT( flushableIndex == -1 );
+ ASSERT_ABORT( flushableIndex == -1 );
}
void setDirty() {

View File

@ -1,6 +1,6 @@
--- fdbrpc/IAsyncFile.actor.cpp.orig 2018-04-25 15:06:34 UTC
--- fdbrpc/IAsyncFile.actor.cpp.orig 2018-05-11 01:30:59 UTC
+++ fdbrpc/IAsyncFile.actor.cpp
@@ -42,7 +42,7 @@ ACTOR static Future<Void> zeroRangeHelpe
@@ -42,7 +42,7 @@ ACTOR static Future<Void> zeroRangeHelper( Reference<I
Void _ = wait( yield() );
}

View File

@ -1,6 +1,6 @@
--- fdbrpc/Platform.cpp.orig 2018-04-19 02:55:50 UTC
--- fdbrpc/Platform.cpp.orig 2018-05-11 01:30:59 UTC
+++ fdbrpc/Platform.cpp
@@ -87,7 +87,7 @@ int eraseDirectoryRecursive(std::string
@@ -87,7 +87,7 @@ int eraseDirectoryRecursive(std::string const& dir) {
__eraseDirectoryRecurseiveCount = 0;
#ifdef _WIN32
system( ("rd /s /q \"" + dir + "\"").c_str() );

View File

@ -1,11 +0,0 @@
--- fdbserver/TLogServer.actor.cpp.orig 2018-04-28 15:41:40 UTC
+++ fdbserver/TLogServer.actor.cpp
@@ -425,7 +425,7 @@ struct LogData : NonCopyable, public Ref
tLogData->bytesDurable += bytesInput.getValue() - bytesDurable.getValue();
TraceEvent("TLogBytesWhenRemoved", tli.id()).detail("sharedBytesInput", tLogData->bytesInput).detail("sharedBytesDurable", tLogData->bytesDurable).detail("localBytesInput", bytesInput.getValue()).detail("localBytesDurable", bytesDurable.getValue());
- ASSERT(tLogData->bytesDurable <= tLogData->bytesInput);
+ ASSERT_ABORT(tLogData->bytesDurable <= tLogData->bytesInput);
endRole(tli.id(), "TLog", "Error", true);
if(!tLogData->terminated) {

View File

@ -1,11 +0,0 @@
--- fdbserver/VFSAsync.cpp.orig 2018-04-28 14:51:27 UTC
+++ fdbserver/VFSAsync.cpp
@@ -460,7 +460,7 @@ static int asyncDeviceCharacteristics(sq
//resulting in a locking error
auto itr = SharedMemoryInfo::table.find(filename);
if(itr != SharedMemoryInfo::table.end()) {
- ASSERT(itr->second.refcount == 0);
+ ASSERT_ABORT(itr->second.refcount == 0);
itr->second.cleanup();
}
}

View File

@ -1,6 +1,6 @@
--- fdbserver/fdbserver.actor.cpp.orig 2018-04-19 02:55:50 UTC
--- fdbserver/fdbserver.actor.cpp.orig 2018-05-11 01:30:59 UTC
+++ fdbserver/fdbserver.actor.cpp
@@ -59,7 +59,7 @@
@@ -60,7 +60,7 @@
#define BOOST_DATE_TIME_NO_LIB
#include <boost/interprocess/managed_shared_memory.hpp>
@ -9,7 +9,7 @@
#include <execinfo.h>
#include <signal.h>
#ifdef ALLOC_INSTRUMENTATION
@@ -72,6 +72,7 @@
@@ -73,6 +73,7 @@
#endif
#include "flow/SimpleOpt.h"
@ -17,7 +17,7 @@
enum {
OPT_CONNFILE, OPT_SEEDCONNFILE, OPT_SEEDCONNSTRING, OPT_ROLE, OPT_LISTEN, OPT_PUBLICADDR, OPT_DATAFOLDER, OPT_LOGFOLDER, OPT_PARENTPID, OPT_NEWCONSOLE, OPT_NOBOX, OPT_TESTFILE, OPT_RESTARTING, OPT_RANDOMSEED, OPT_KEY, OPT_MEMLIMIT, OPT_STORAGEMEMLIMIT, OPT_MACHINEID, OPT_DCID, OPT_MACHINE_CLASS, OPT_BUGGIFY, OPT_VERSION, OPT_CRASHONERROR, OPT_HELP, OPT_NETWORKIMPL, OPT_NOBUFSTDOUT, OPT_BUFSTDOUTERR, OPT_TRACECLOCK, OPT_NUMTESTERS, OPT_DEVHELP, OPT_ROLLSIZE, OPT_MAXLOGS, OPT_MAXLOGSSIZE, OPT_KNOB, OPT_TESTSERVERS, OPT_TEST_ON_SERVERS, OPT_METRICSCONNFILE, OPT_METRICSPREFIX,
@@ -350,7 +351,7 @@ public:
@@ -351,7 +352,7 @@ class WorldReadablePermissions { (public)
throw platform_error();
}
permission.set_permissions( &sa );
@ -26,7 +26,7 @@
// There is nothing to do here, since the default permissions are fine
#else
#error Port me!
@@ -360,7 +361,7 @@ public:
@@ -361,7 +362,7 @@ class WorldReadablePermissions { (public)
virtual ~WorldReadablePermissions() {
#ifdef _WIN32
LocalFree( sa.lpSecurityDescriptor );

View File

@ -1,4 +1,4 @@
--- fdbserver/worker.actor.cpp.orig 2018-04-26 12:45:22 UTC
--- fdbserver/worker.actor.cpp.orig 2018-05-11 01:30:59 UTC
+++ fdbserver/worker.actor.cpp
@@ -39,7 +39,7 @@
#include "fdbclient/ClientWorkerInterface.h"
@ -9,7 +9,7 @@
#ifdef USE_GPERFTOOLS
#include "gperftools/profiler.h"
#endif
@@ -267,7 +267,7 @@ ACTOR Future<Void> registrationClient( R
@@ -267,7 +267,7 @@ ACTOR Future<Void> registrationClient( Reference<Async
}
}

View File

@ -1,6 +1,6 @@
--- flow/Deque.h.orig 2018-04-22 14:36:29 UTC
--- flow/Deque.h.orig 2018-05-11 01:30:59 UTC
+++ flow/Deque.h
@@ -166,7 +166,7 @@ private:
@@ -166,7 +166,7 @@ class Deque { (private)
new (&newArr[i - begin]) T(std::move(arr[i&mask]));
arr[i&mask].~T();
}
@ -9,7 +9,7 @@
arr = newArr;
end -= begin;
begin = 0;
@@ -177,8 +177,8 @@ private:
@@ -177,8 +177,8 @@ class Deque { (private)
for (int i = begin; i != end; i++)
arr[i&mask].~T();
if(arr)

View File

@ -1,11 +0,0 @@
--- flow/IThreadPool.cpp.orig 2018-04-28 14:40:31 UTC
+++ flow/IThreadPool.cpp
@@ -35,7 +35,7 @@ class ThreadPool : public IThreadPool, p
Event stopped;
static thread_local IThreadPoolReceiver* threadUserObject;
explicit Thread(ThreadPool *pool, IThreadPoolReceiver *userObject) : pool(pool), userObject(userObject) {}
- ~Thread() { ASSERT(!userObject); }
+ ~Thread() { ASSERT_ABORT(!userObject); }
void run() {
deprioritizeThread();

View File

@ -1,6 +1,6 @@
--- flow/Net2.actor.cpp.orig 2018-04-19 02:55:50 UTC
--- flow/Net2.actor.cpp.orig 2018-05-11 01:30:59 UTC
+++ flow/Net2.actor.cpp
@@ -56,7 +56,7 @@ uint64_t compatibleProtocolVersionMask =
@@ -56,7 +56,7 @@ uint64_t compatibleProtocolVersionMask = 0xfffffffffff
uint64_t minValidProtocolVersion = 0x0FDB00A200060001LL;
@ -9,7 +9,7 @@
#include <execinfo.h>
volatile double net2liveness = 0;
@@ -403,8 +403,7 @@ private:
@@ -403,8 +403,7 @@ class Connection : public IConnection, ReferenceCounte
void init() {
// Socket settings that have to be set after connect or accept succeeds

View File

@ -1,4 +1,4 @@
--- flow/Platform.cpp.orig 2018-04-19 02:55:50 UTC
--- flow/Platform.cpp.orig 2018-05-11 01:30:59 UTC
+++ flow/Platform.cpp
@@ -71,6 +71,7 @@
@ -8,7 +8,7 @@
#include <sys/mman.h>
#include <unistd.h>
#include <ftw.h>
@@ -119,6 +120,12 @@
@@ -119,7 +120,13 @@
#include <IOKit/IOBSD.h>
#endif
@ -17,10 +17,11 @@
+#include <sys/sysctl.h>
+#include <sys/cpuset.h>
+#include <sys/resource.h>
+#endif
#endif
+#endif
std::string removeWhitespace(const std::string &t)
{
@@ -198,7 +205,7 @@ double getProcessorTimeThread() {
throw platform_error();
}
@ -54,7 +55,7 @@
return 0;
#endif
}
@@ -427,6 +442,24 @@ void getMachineRAMInfo(MachineRAMInfo& m
@@ -427,6 +442,24 @@ void getMachineRAMInfo(MachineRAMInfo& memInfo) {
memInfo.total = pagesize * (vm_stat.free_count + vm_stat.active_count + vm_stat.inactive_count + vm_stat.wire_count);
memInfo.available = pagesize * vm_stat.free_count;
memInfo.committed = memInfo.total - memInfo.available;
@ -79,7 +80,7 @@
#else
#warning getMachineRAMInfo unimplemented on this platform
#endif
@@ -435,7 +468,7 @@ void getMachineRAMInfo(MachineRAMInfo& m
@@ -435,7 +468,7 @@ void getMachineRAMInfo(MachineRAMInfo& memInfo) {
void getDiskBytes(std::string const& directory, int64_t& free, int64_t& total) {
INJECT_FAULT( platform_error, "getDiskBytes" );
#if defined(__unixish__)
@ -88,7 +89,7 @@
struct statvfs buf;
if (statvfs(directory.c_str(), &buf)) {
TraceEvent(SevError, "GetDiskBytesStatvfsError").detail("Directory", directory).GetLastError();
@@ -477,7 +510,7 @@ void getDiskBytes(std::string const& dir
@@ -477,7 +510,7 @@ void getDiskBytes(std::string const& directory, int64_
#endif
}
@ -155,7 +156,7 @@
struct timespec ts;
clock_gettime(CLOCK_REALTIME, &ts);
return uint64_t(ts.tv_sec) * 1e9 + ts.tv_nsec;
@@ -1481,7 +1538,7 @@ static void *allocateInternal(size_t len
@@ -1481,7 +1538,7 @@ static void *allocateInternal(size_t length, bool larg
flags |= MAP_HUGETLB;
return mmap(NULL, length, PROT_READ|PROT_WRITE, flags, -1, 0);
@ -176,7 +177,7 @@
#endif
}
@@ -1615,7 +1677,7 @@ void renameFile( std::string const& from
@@ -1615,7 +1677,7 @@ void renameFile( std::string const& fromPath, std::str
//renamedFile();
return;
}
@ -185,7 +186,7 @@
if (!rename( fromPath.c_str(), toPath.c_str() )) {
//FIXME: We cannot inject faults after renaming the file, because we could end up with two asyncFileNonDurable open for the same file
//renamedFile();
@@ -1733,7 +1795,7 @@ bool createDirectory( std::string const&
@@ -1733,7 +1795,7 @@ bool createDirectory( std::string const& directory ) {
}
TraceEvent(SevError, "CreateDirectory").detail("Directory", directory).GetLastError();
throw platform_error();
@ -194,7 +195,7 @@
size_t sep = 0;
do {
sep = directory.find_first_of('/', sep + 1);
@@ -1774,7 +1836,7 @@ std::string abspath( std::string const&
@@ -1774,7 +1836,7 @@ std::string abspath( std::string const& filename ) {
if (*x == '/')
*x = CANONICAL_PATH_SEPARATOR;
return nameBuffer;
@ -221,7 +222,7 @@
return S_ISREG(fileAttributes) && StringRef(name).endsWith(extension);
#else
#error Port me!
@@ -1858,7 +1920,7 @@ bool acceptFile( FILE_ATTRIBUTE_DATA fil
@@ -1858,7 +1920,7 @@ bool acceptFile( FILE_ATTRIBUTE_DATA fileAttributes, s
bool acceptDirectory( FILE_ATTRIBUTE_DATA fileAttributes, std::string name, std::string extension ) {
#ifdef _WIN32
return (fileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0;
@ -230,7 +231,7 @@
return S_ISDIR(fileAttributes);
#else
#error Port me!
@@ -1894,7 +1956,7 @@ std::vector<std::string> findFiles( std:
@@ -1894,7 +1956,7 @@ std::vector<std::string> findFiles( std::string const&
}
FindClose(h);
}
@ -239,7 +240,7 @@
DIR *dip;
if ((dip = opendir(directory.c_str())) != NULL) {
@@ -1958,7 +2020,7 @@ void findFilesRecursively(std::string pa
@@ -1958,7 +2020,7 @@ void findFilesRecursively(std::string path, std::vecto
void threadSleep( double seconds ) {
#ifdef _WIN32
Sleep( (DWORD)(seconds * 1e3) );
@ -248,7 +249,7 @@
struct timespec req, rem;
req.tv_sec = seconds;
@@ -1996,7 +2058,7 @@ void makeTemporary( const char* filename
@@ -1996,7 +2058,7 @@ void makeTemporary( const char* filename ) {
THREAD_HANDLE startThread(void (*func) (void *), void *arg) {
return (void *)_beginthread(func, 0, arg);
}
@ -257,7 +258,7 @@
THREAD_HANDLE startThread(void *(*func) (void *), void *arg) {
pthread_t t;
pthread_create(&t, NULL, func, arg);
@@ -2009,7 +2071,7 @@ THREAD_HANDLE startThread(void *(*func)
@@ -2009,7 +2071,7 @@ THREAD_HANDLE startThread(void *(*func) (void *), void
void waitThread(THREAD_HANDLE thread) {
#ifdef _WIN32
WaitForSingleObject(thread, INFINITE);
@ -266,7 +267,7 @@
pthread_join(thread, NULL);
#else
#error Port me!
@@ -2038,7 +2100,7 @@ int64_t fileSize(std::string const& file
@@ -2038,7 +2100,7 @@ int64_t fileSize(std::string const& filename) {
return 0;
else
return file_status.st_size;
@ -275,7 +276,7 @@
struct stat file_status;
if(stat(filename.c_str(), &file_status) != 0)
return 0;
@@ -2181,6 +2243,8 @@ std::string getDefaultPluginPath( const
@@ -2181,6 +2243,8 @@ std::string getDefaultPluginPath( const char* plugin_n
return format( "/usr/lib/foundationdb/plugins/%s.so", plugin_name );
#elif defined(__APPLE__)
return format( "/usr/local/foundationdb/plugins/%s.dylib", plugin_name );
@ -293,7 +294,7 @@
#error Port me!
#endif
@@ -2446,7 +2510,7 @@ bool isLibraryLoaded(const char* lib_pat
@@ -2446,7 +2510,7 @@ bool isLibraryLoaded(const char* lib_path) {
}
void* loadLibrary(const char* lib_path) {

View File

@ -1,4 +1,4 @@
--- flow/Platform.h.orig 2018-04-22 14:30:05 UTC
--- flow/Platform.h.orig 2018-05-11 01:30:59 UTC
+++ flow/Platform.h
@@ -22,7 +22,7 @@
#define FLOW_PLATFORM_H
@ -9,12 +9,12 @@
#define __unixish__ 1
#endif
@@ -183,6 +183,8 @@ THREAD_HANDLE startThread(void *(func) (
@@ -182,6 +182,8 @@ THREAD_HANDLE startThread(void *(func) (void *), void
#if defined(_WIN32)
#define DYNAMIC_LIB_EXT ".dll"
#elif defined(__linux)
#define DYNAMIC_LIB_EXT ".so"
+#elif defined(__FreeBSD__)
+#define DYNAMIC_LIB_EXT ".so"
+#elif defined(__FreeBSD__)
#define DYNAMIC_LIB_EXT ".so"
#elif defined(__APPLE__)
#define DYNAMIC_LIB_EXT ".dylib"
#else

View File

@ -1,6 +1,6 @@
--- flow/ThreadPrimitives.cpp.orig 2018-04-24 15:27:55 UTC
--- flow/ThreadPrimitives.cpp.orig 2018-05-11 01:30:59 UTC
+++ flow/ThreadPrimitives.cpp
@@ -37,7 +37,7 @@ extern std::string format( const char *f
@@ -37,7 +37,7 @@ extern std::string format( const char *form, ... );
Event::Event() {
#ifdef _WIN32
ev = CreateEvent(NULL, FALSE, FALSE, NULL);

View File

@ -1,4 +1,4 @@
--- flow/ThreadPrimitives.h.orig 2018-04-22 14:33:39 UTC
--- flow/ThreadPrimitives.h.orig 2018-05-11 01:30:59 UTC
+++ flow/ThreadPrimitives.h
@@ -25,7 +25,7 @@
#include "Error.h"
@ -9,7 +9,7 @@
#include <semaphore.h>
#endif
@@ -63,11 +63,11 @@ public:
@@ -63,11 +63,11 @@ class ThreadSpinLock { (public)
#endif
}
void leave() {
@ -23,12 +23,12 @@
__sync_synchronize();
#endif
#if VALGRIND
@@ -117,6 +117,8 @@ private:
@@ -116,6 +116,8 @@ class Event { (private)
#ifdef _WIN32
void* ev;
#elif defined(__linux__)
sem_t sem;
+#elif defined(__FreeBSD__)
+ sem_t sem;
+#elif defined(__FreeBSD__)
sem_t sem;
#elif defined(__APPLE__)
mach_port_t self;
semaphore_t sem;