You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

406 lines
13 KiB

Index: 3rdParty/V8/CMakeLists.txt
--- 3rdParty/V8/CMakeLists.txt.orig 2017-08-09 23:29:14.000000000 +0200
+++ 3rdParty/V8/CMakeLists.txt 2017-08-10 10:05:46.985352000 +0200
@@ -226,7 +226,7 @@
list(APPEND V8_GYP_ARGS --format ninja)
list(APPEND V8_GYP_ARGS -S.${V8_TARGET_ARCH})
- if (LINUX)
+ if (LINUX OR FREEBSD)
set(V8_LIBRARY_DIR "${V8_LIBRARY_DIR}/obj.target/src")
set(ICU_LIBRARY_DIR "${ICU_LIBRARY_DIR}/obj.target/third_party/icu")
elseif (SOLARIS)
@@ -272,7 +272,7 @@
"${PROJECT_NAME}: Libraries"
)
- list(APPEND LINK_DIRECTORIES "${NINJA_BUILD_DIR}/obj/third_party/icu")
+ list(INSERT LINK_DIRECTORIES 0 "${NINJA_BUILD_DIR}/obj/third_party/icu")
set(ICU_LIBS
"icui18n;icuuc"
@@ -510,7 +510,7 @@
list(APPEND V8_GYP_ARGS --format make)
list(APPEND V8_GYP_ARGS -S.${V8_TARGET_ARCH})
- if (LINUX)
+ if (LINUX OR FREEBSD)
set(V8_LIBRARY_DIR "${V8_LIBRARY_DIR}/obj.target/src")
set(ICU_LIBRARY_DIR "${ICU_LIBRARY_DIR}/obj.target/third_party/icu")
elseif (SOLARIS)
@@ -577,7 +577,7 @@
"${PROJECT_NAME}: Libraries"
)
- list(APPEND LINK_DIRECTORIES "${ICU_LIBRARY_DIR}")
+ list(INSERT LINK_DIRECTORIES 0 "${ICU_LIBRARY_DIR}")
set(ICU_LIBS
"icui18n;icuuc"
Index: 3rdParty/V8/v5.7.0.0/src/base/platform/platform-freebsd.cc
--- 3rdParty/V8/v5.7.0.0/src/base/platform/platform-freebsd.cc.orig 2017-08-09 23:29:14.000000000 +0200
+++ 3rdParty/V8/v5.7.0.0/src/base/platform/platform-freebsd.cc 2017-08-10 10:05:04.106841000 +0200
@@ -8,6 +8,7 @@
#include <pthread.h>
#include <semaphore.h>
#include <signal.h>
+#include <stdio.h>
#include <stdlib.h>
#include <sys/resource.h>
#include <sys/time.h>
Index: 3rdParty/V8/v5.7.0.0/src/base/platform/platform-posix.cc
--- 3rdParty/V8/v5.7.0.0/src/base/platform/platform-posix.cc.orig 2017-08-09 23:29:14.000000000 +0200
+++ 3rdParty/V8/v5.7.0.0/src/base/platform/platform-posix.cc 2017-08-10 10:05:04.107108000 +0200
@@ -26,6 +26,9 @@
defined(__NetBSD__) || defined(__OpenBSD__)
#include <sys/sysctl.h> // NOLINT, for sysctl
#endif
+#if defined(__FreeBSD__)
+#include <sys/thr.h>
+#endif
#undef MAP_TYPE
@@ -36,6 +39,7 @@
#include <cmath>
#include <cstdlib>
+#include <cstdio>
#include "src/base/lazy-instance.h"
#include "src/base/macros.h"
Index: 3rdParty/rocksdb/v5.6.X/Makefile
--- 3rdParty/rocksdb/v5.6.X/Makefile.orig 2017-08-10 10:05:05.131733000 +0200
+++ 3rdParty/rocksdb/v5.6.X/Makefile 2017-08-10 10:06:56.621114000 +0200
@@ -155,15 +155,8 @@
$(foreach path, $(missing_make_config_paths), \
$(warning Warning: $(path) dont exist))
-ifeq ($(PLATFORM), OS_AIX)
-# no debug info
-else ifneq ($(PLATFORM), IOS)
-CFLAGS += -g
-CXXFLAGS += -g
-else
# no debug info for IOS, that will make our library big
OPT += -DNDEBUG
-endif
ifeq ($(PLATFORM), OS_AIX)
ARFLAGS = -X64 rs
@@ -567,7 +560,7 @@
analyze tools tools_lib
-all: $(LIBRARY) $(BENCHMARKS) tools tools_lib test_libs $(TESTS)
+all: $(LIBRARY)
static_lib: $(LIBRARY)
Index: 3rdParty/rocksdb/v5.6.X/port/port_posix.h
--- 3rdParty/rocksdb/v5.6.X/port/port_posix.h.orig 2017-08-09 23:29:14.000000000 +0200
+++ 3rdParty/rocksdb/v5.6.X/port/port_posix.h 2017-08-10 10:05:05.132022000 +0200
@@ -30,7 +30,7 @@
#define PLATFORM_IS_LITTLE_ENDIAN \
(__DARWIN_BYTE_ORDER == __DARWIN_LITTLE_ENDIAN)
#endif
-#elif defined(OS_SOLARIS)
+#elif defined(OS_SOLARIS) || defined(__sun)
#include <sys/isa_defs.h>
#ifdef _LITTLE_ENDIAN
#define PLATFORM_IS_LITTLE_ENDIAN true
@@ -44,7 +44,7 @@
#define PLATFORM_IS_LITTLE_ENDIAN (BYTE_ORDER == LITTLE_ENDIAN)
#include <alloca.h>
#elif defined(OS_FREEBSD) || defined(OS_OPENBSD) || defined(OS_NETBSD) || \
- defined(OS_DRAGONFLYBSD) || defined(OS_ANDROID)
+ defined(OS_DRAGONFLYBSD) || defined(OS_ANDROID) || defined(__FreeBSD__)
#include <sys/endian.h>
#include <sys/types.h>
#define PLATFORM_IS_LITTLE_ENDIAN (_BYTE_ORDER == _LITTLE_ENDIAN)
Index: 3rdParty/rocksdb/v5.6.X/tools/ldb_cmd.cc
--- 3rdParty/rocksdb/v5.6.X/tools/ldb_cmd.cc.orig 2017-08-09 23:29:14.000000000 +0200
+++ 3rdParty/rocksdb/v5.6.X/tools/ldb_cmd.cc 2017-08-10 10:05:05.132595000 +0200
@@ -465,7 +465,7 @@
option_map_.find(option);
if (itr != option_map_.end()) {
try {
-#if defined(CYGWIN)
+#if 1
value = strtol(itr->second.c_str(), 0, 10);
#else
value = std::stoi(itr->second);
@@ -1317,7 +1317,7 @@
itr = options.find(ARG_MAX_KEYS);
if (itr != options.end()) {
try {
-#if defined(CYGWIN)
+#if 1
max_keys_ = strtol(itr->second.c_str(), 0, 10);
#else
max_keys_ = std::stoi(itr->second);
@@ -2231,7 +2231,7 @@
itr = options.find(ARG_MAX_KEYS);
if (itr != options.end()) {
try {
-#if defined(CYGWIN)
+#if 1
max_keys_scanned_ = strtol(itr->second.c_str(), 0, 10);
#else
max_keys_scanned_ = std::stoi(itr->second);
Index: CMakeLists.txt
--- CMakeLists.txt.orig 2017-08-09 23:29:14.000000000 +0200
+++ CMakeLists.txt 2017-08-10 10:05:07.020958000 +0200
@@ -549,9 +549,10 @@
################################################################################
if (NOT WINDOWS)
- set(SYS_LIBS ${SYS_LIBS} resolv)
-
- if (NOT DARWIN)
+ if (NOT FREEBSD)
+ set(SYS_LIBS ${SYS_LIBS} resolv)
+ endif ()
+ if (NOT DARWIN AND NOT FREEBSD)
set(SYS_LIBS ${SYS_LIBS} rt)
endif ()
endif ()
@@ -921,6 +922,11 @@
## SUB-PROJECTS
################################################################################
+set(SYS_LIBS ${SYS_LIBS} crypto)
+set(SYS_LIBS ${SYS_LIBS} ncurses)
+set(SYS_LIBS ${SYS_LIBS} execinfo)
+set(SYS_LIBS ${SYS_LIBS} m)
+
list(INSERT SYSTEM_LIBRARIES 0
${BT_LIBS}
${ZLIB_LIBS}
Index: arangod/Aql/Condition.cpp
--- arangod/Aql/Condition.cpp.orig 2017-08-09 23:29:14.000000000 +0200
+++ arangod/Aql/Condition.cpp 2017-08-10 10:05:07.021406000 +0200
@@ -34,6 +34,8 @@
#include "Logger/Logger.h"
#include "Transaction/Methods.h"
+#include <cmath>
+
#ifdef _WIN32
// turn off warnings about too long type name for debug symbols blabla in MSVC
// only...
Index: arangod/Aql/Expression.cpp
--- arangod/Aql/Expression.cpp.orig 2017-08-09 23:29:14.000000000 +0200
+++ arangod/Aql/Expression.cpp 2017-08-10 10:05:07.021785000 +0200
@@ -632,7 +632,7 @@
try {
// stoll() might throw an exception if the string is not a number
- int64_t position = static_cast<int64_t>(std::stoll(value));
+ int64_t position = static_cast<int64_t>(strtol(value.c_str(), NULL, 10));
return result.at(trx, position, mustDestroy, true);
} catch (...) {
// no number found.
Index: arangod/Aql/Functions.cpp
--- arangod/Aql/Functions.cpp.orig 2017-08-09 23:29:14.000000000 +0200
+++ arangod/Aql/Functions.cpp 2017-08-10 10:05:07.022416000 +0200
@@ -299,10 +299,10 @@
isValid = true;
return 0.0;
}
- size_t behind = 0;
- double value = std::stod(str, &behind);
- while (behind < str.size()) {
- char c = str[behind];
+ char *behind = NULL;
+ double value = strtod(str.c_str(), &behind);
+ while (behind < str.c_str() + str.size()) {
+ char c = *behind;
if (c != ' ' && c != '\t' && c != '\r' && c != '\n' && c != '\f') {
isValid = false;
return 0.0;
@@ -2738,7 +2738,7 @@
AqlValue value = ExtractFunctionParameterValue(trx, parameters, 0);
double input = value.toDouble(trx);
- return NumberValue(trx, std::log2(input), true);
+ return NumberValue(trx, log2(input), true);
}
/// @brief function LOG10
@@ -2774,7 +2774,7 @@
AqlValue value = ExtractFunctionParameterValue(trx, parameters, 0);
double input = value.toDouble(trx);
- return NumberValue(trx, std::exp2(input), true);
+ return NumberValue(trx, exp2(input), true);
}
/// @brief function SIN
Index: arangod/Aql/SortNode.cpp
--- arangod/Aql/SortNode.cpp.orig 2017-08-09 23:29:14.000000000 +0200
+++ arangod/Aql/SortNode.cpp 2017-08-10 10:05:07.022914000 +0200
@@ -196,5 +196,5 @@
if (nrItems <= 3.0) {
return depCost + nrItems;
}
- return depCost + nrItems * std::log2(static_cast<double>(nrItems));
+ return depCost + nrItems * log2(static_cast<double>(nrItems));
}
Index: arangod/Indexes/Index.cpp
--- arangod/Indexes/Index.cpp.orig 2017-08-09 23:29:14.000000000 +0200
+++ arangod/Indexes/Index.cpp 2017-08-10 10:05:07.023190000 +0200
@@ -590,7 +590,7 @@
// by default, no sort conditions are supported
coveredAttributes = 0;
if (itemsInIndex > 0) {
- estimatedCost = itemsInIndex * std::log2(itemsInIndex);
+ estimatedCost = itemsInIndex * log2(itemsInIndex);
} else {
estimatedCost = 0.0;
}
Index: arangod/Scheduler/ListenTask.cpp
--- arangod/Scheduler/ListenTask.cpp.orig 2017-08-09 23:29:14.000000000 +0200
+++ arangod/Scheduler/ListenTask.cpp 2017-08-10 10:05:07.707052000 +0200
@@ -22,6 +22,11 @@
/// @author Achim Brandt
////////////////////////////////////////////////////////////////////////////////
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
#include "ListenTask.h"
#include "Basics/MutexLocker.h"
Index: etc/arangodb3/arango-dfdb.conf.in
--- etc/arangodb3/arango-dfdb.conf.in.orig 2017-08-09 23:29:14.000000000 +0200
+++ etc/arangodb3/arango-dfdb.conf.in 2017-08-10 10:05:08.224322000 +0200
@@ -3,7 +3,7 @@
[database]
auto-upgrade = false
upgrade-check = false
-directory= @LOCALSTATEDIR@/lib/arangodb3
+directory= @LOCALSTATEDIR@/arangodb
[server]
rest-server = false
@@ -18,7 +18,7 @@
[javascript]
startup-directory = @PKGDATADIR@/js
-app-path = @LOCALSTATEDIR@/lib/arangodb3-apps
+app-path = @LOCALSTATEDIR@/arangodb/apps
script = @PKGDATADIR@/js/server/arango-dfdb.js
v8-contexts = 1
Index: etc/arangodb3/arangod.conf.in
--- etc/arangodb3/arangod.conf.in.orig 2017-08-09 23:29:14.000000000 +0200
+++ etc/arangodb3/arangod.conf.in 2017-08-10 10:07:59.965330000 +0200
@@ -5,7 +5,7 @@
#
[database]
-directory = @LOCALSTATEDIR@/lib/arangodb3
+directory = @LOCALSTATEDIR@/arangodb
# maximal-journal-size = 33554432
@@ -54,7 +54,7 @@
[javascript]
startup-directory = @PKGDATADIR@/js
-app-path = @LOCALSTATEDIR@/lib/arangodb3-apps
+app-path = @LOCALSTATEDIR@/arangodb/apps
# app-path = @HOMEDRIVE@/@HOMEPATH@/arangodb3/apps
# number of V8 contexts available for JavaScript execution. use 0 to
@@ -70,7 +70,7 @@
[log]
level = info
-@COMMENT_LOGFILE@file = @LOCALSTATEDIR@/log/arangodb3/arangod.log
+@COMMENT_LOGFILE@file = @LOCALSTATEDIR@/arangodb/log/arangod.log
[cluster]
Index: lib/Basics/operating-system.h
--- lib/Basics/operating-system.h.orig 2017-08-09 23:29:14.000000000 +0200
+++ lib/Basics/operating-system.h 2017-08-10 10:05:08.224907000 +0200
@@ -440,6 +440,7 @@
#define TRI_GCC_THREAD_LOCAL_STORAGE 1
+#define TRI_HAVE_SC_PHYS_PAGES 1
#define TRI_HAVE_LINUX_PROC 1
#define ARANGODB_HAVE_DOMAIN_SOCKETS 1
#define TRI_HAVE_POSIX_MMAP 1
Index: lib/Basics/socket-utils.h
--- lib/Basics/socket-utils.h.orig 2017-08-09 23:29:14.000000000 +0200
+++ lib/Basics/socket-utils.h 2017-08-10 10:05:08.225110000 +0200
@@ -26,6 +26,11 @@
#include "Basics/Common.h"
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <netdb.h>
+
#ifdef TRI_HAVE_WINSOCK2_H
#include <WinSock2.h>
#include <WS2tcpip.h>
Index: lib/Endpoint/EndpointIp.cpp
--- lib/Endpoint/EndpointIp.cpp.orig 2017-08-09 23:29:14.000000000 +0200
+++ lib/Endpoint/EndpointIp.cpp 2017-08-10 10:05:08.225342000 +0200
@@ -29,6 +29,10 @@
#include "Endpoint/Endpoint.h"
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/tcp.h>
+
using namespace arangodb;
using namespace arangodb::basics;
Index: lib/Logger/LogAppenderSyslog.cpp
--- lib/Logger/LogAppenderSyslog.cpp.orig 2017-08-09 23:29:14.000000000 +0200
+++ lib/Logger/LogAppenderSyslog.cpp 2017-08-10 10:05:08.225530000 +0200
@@ -64,7 +64,7 @@
if ('0' <= facility[0] && facility[0] <= '9') {
value = StringUtils::int32(facility);
} else {
- CODE* ptr = reinterpret_cast<CODE*>(TRI_facilitynames);
+ CODE* ptr = static_cast<CODE*>((CODE *)TRI_facilitynames);
while (ptr->c_name != 0) {
if (strcmp(ptr->c_name, facility.c_str()) == 0) {
Index: lib/SimpleHttpClient/SimpleHttpClient.cpp
--- lib/SimpleHttpClient/SimpleHttpClient.cpp.orig 2017-08-09 23:29:14.000000000 +0200
+++ lib/SimpleHttpClient/SimpleHttpClient.cpp 2017-08-10 10:05:08.225831000 +0200
@@ -812,7 +812,7 @@
uint32_t contentLength;
try {
- contentLength = static_cast<uint32_t>(std::stol(line, nullptr, 16));
+ contentLength = static_cast<uint32_t>(strtol(line.c_str(), NULL, 16));
} catch (...) {
setErrorMessage("found invalid content-length", true);
// reset connection
Index: lib/Ssl/SslFeature.cpp
--- lib/Ssl/SslFeature.cpp.orig 2017-08-09 23:29:14.000000000 +0200
+++ lib/Ssl/SslFeature.cpp 2017-08-10 10:05:08.226007000 +0200
@@ -34,10 +34,6 @@
#include "Random/UniformCharacter.h"
#include "Ssl/ssl-helper.h"
-#ifndef OPENSSL_THREADS
-#error missing thread support for openssl, please recomple OpenSSL with threads
-#endif
-
using namespace arangodb;
using namespace arangodb::basics;
using namespace arangodb::options;