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.
744 lines
26 KiB
744 lines
26 KiB
Index: 3rdParty/V8/CMakeLists.txt |
|
--- 3rdParty/V8/CMakeLists.txt.orig 2016-08-01 13:49:49.000000000 +0200 |
|
+++ 3rdParty/V8/CMakeLists.txt 2016-08-01 19:05:25.192150244 +0200 |
|
@@ -121,7 +121,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/tools/gyp") |
|
set(ICU_LIBRARY_DIR "${ICU_LIBRARY_DIR}/obj.target/third_party/icu") |
|
elseif (SOLARIS) |
|
@@ -167,7 +167,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;icudata" |
|
@@ -389,7 +389,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/tools/gyp") |
|
set(ICU_LIBRARY_DIR "${ICU_LIBRARY_DIR}/obj.target/third_party/icu") |
|
elseif (SOLARIS) |
|
@@ -452,7 +452,7 @@ |
|
"${PROJECT_NAME}: Libraries" |
|
) |
|
|
|
- list(APPEND LINK_DIRECTORIES "${ICU_LIBRARY_DIR}") |
|
+ list(INSERT LINK_DIRECTORIES 0 "${ICU_LIBRARY_DIR}") |
|
|
|
set(ICU_LIBS |
|
"icui18n;icuuc;icudata" |
|
Index: 3rdParty/V8/V8-5.0.71.39/build/all.gyp |
|
--- 3rdParty/V8/V8-5.0.71.39/build/all.gyp.orig 2016-08-01 13:49:49.000000000 +0200 |
|
+++ 3rdParty/V8/V8-5.0.71.39/build/all.gyp 2016-08-01 19:05:25.192150244 +0200 |
|
@@ -8,11 +8,7 @@ |
|
'target_name': 'All', |
|
'type': 'none', |
|
'dependencies': [ |
|
- '../samples/samples.gyp:*', |
|
- '../src/d8.gyp:d8', |
|
- '../test/cctest/cctest.gyp:*', |
|
- '../test/fuzzer/fuzzer.gyp:*', |
|
- '../test/unittests/unittests.gyp:*', |
|
+ '../src/d8.gyp:d8' |
|
], |
|
'conditions': [ |
|
['component!="shared_library"', { |
|
Index: 3rdParty/V8/V8-5.0.71.39/src/base/platform/platform-freebsd.cc |
|
--- 3rdParty/V8/V8-5.0.71.39/src/base/platform/platform-freebsd.cc.orig 2016-08-01 13:49:49.000000000 +0200 |
|
+++ 3rdParty/V8/V8-5.0.71.39/src/base/platform/platform-freebsd.cc 2016-08-01 19:05:25.192150244 +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/V8-5.0.71.39/src/base/platform/platform-posix.cc |
|
--- 3rdParty/V8/V8-5.0.71.39/src/base/platform/platform-posix.cc.orig 2016-08-01 13:49:49.000000000 +0200 |
|
+++ 3rdParty/V8/V8-5.0.71.39/src/base/platform/platform-posix.cc 2016-08-01 19:05:25.192150244 +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/V8/V8-5.0.71.39/tools/gyp/v8.gyp |
|
--- 3rdParty/V8/V8-5.0.71.39/tools/gyp/v8.gyp.orig 2016-08-01 13:49:49.000000000 +0200 |
|
+++ 3rdParty/V8/V8-5.0.71.39/tools/gyp/v8.gyp 2016-08-01 19:05:25.192150244 +0200 |
|
@@ -438,6 +438,9 @@ |
|
'V8_IMMINENT_DEPRECATION_WARNINGS', |
|
], |
|
'sources': [ ### gcmole(all) ### |
|
+ '<(SHARED_INTERMEDIATE_DIR)/libraries.cc', |
|
+ '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc', |
|
+ '../../src/snapshot/snapshot-empty.cc', |
|
'../../include/v8-debug.h', |
|
'../../include/v8-experimental.h', |
|
'../../include/v8-platform.h', |
|
Index: 3rdParty/rocksdb/rocksdb/CMakeLists.txt |
|
--- 3rdParty/rocksdb/rocksdb/CMakeLists.txt.orig 2016-08-01 13:49:49.000000000 +0200 |
|
+++ 3rdParty/rocksdb/rocksdb/CMakeLists.txt 2016-08-01 19:05:25.192150244 +0200 |
|
@@ -169,11 +169,7 @@ |
|
message(STATUS "Compiler type GNU: ${CMAKE_CXX_COMPILER}") |
|
endif () |
|
# -DSNAPPY -DZLIB |
|
- if (SOLARIS OR DARWIN) |
|
set(ROCKSDB_MALLOC_USABLE_SIZE "") |
|
- else() |
|
- set(ROCKSDB_MALLOC_USABLE_SIZE "-DROCKSDB_MALLOC_USABLE_SIZE") |
|
- endif() |
|
set(BASE_FLAGS "${BASE_FLAGS} -W -Wextra -Wall -Wsign-compare -Wshadow -Wno-unused-parameter -fno-omit-frame-pointer -momit-leaf-frame-pointer -fno-builtin-memcmp -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers ${ROCKSDB_MALLOC_USABLE_SIZE} -isystem -fPIC -D${OS_DEFINE} ${POSIX_FLAG}") |
|
|
|
set(CMAKE_C_FLAGS "-g" CACHE INTERNAL "default C compiler flags") |
|
Index: 3rdParty/rocksdb/rocksdb/Makefile |
|
--- 3rdParty/rocksdb/rocksdb/Makefile.orig 2016-08-01 13:49:49.000000000 +0200 |
|
+++ 3rdParty/rocksdb/rocksdb/Makefile 2016-08-01 19:05:25.192150244 +0200 |
|
@@ -138,13 +138,7 @@ |
|
include make_config.mk |
|
CLEAN_FILES += make_config.mk |
|
|
|
-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_SOLARIS) |
|
PLATFORM_CXXFLAGS += -D _GLIBCXX_USE_C99 |
|
@@ -458,7 +452,7 @@ |
|
analyze tools |
|
|
|
|
|
-all: $(LIBRARY) $(BENCHMARKS) tools $(TESTS) |
|
+all: $(LIBRARY) |
|
|
|
static_lib: $(LIBRARY) |
|
|
|
Index: 3rdParty/rocksdb/rocksdb/port/port_posix.h |
|
--- 3rdParty/rocksdb/rocksdb/port/port_posix.h.orig 2016-08-01 13:49:49.000000000 +0200 |
|
+++ 3rdParty/rocksdb/rocksdb/port/port_posix.h 2016-08-01 19:05:25.192150244 +0200 |
|
@@ -27,7 +27,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 |
|
@@ -35,7 +35,7 @@ |
|
#define PLATFORM_IS_LITTLE_ENDIAN false |
|
#endif |
|
#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/rocksdb/tools/ldb_cmd.cc |
|
--- 3rdParty/rocksdb/rocksdb/tools/ldb_cmd.cc.orig 2016-08-01 13:49:49.000000000 +0200 |
|
+++ 3rdParty/rocksdb/rocksdb/tools/ldb_cmd.cc 2016-08-01 19:05:25.192150244 +0200 |
|
@@ -213,7 +213,7 @@ |
|
map<string, string>::const_iterator itr = 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 = stoi(itr->second); |
|
@@ -974,7 +974,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_ = stoi(itr->second); |
|
@@ -1870,7 +1870,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_ = stoi(itr->second); |
|
Index: 3rdParty/rocksdb/rocksdb/util/env_posix.cc |
|
--- 3rdParty/rocksdb/rocksdb/util/env_posix.cc.orig 2016-08-01 13:49:49.000000000 +0200 |
|
+++ 3rdParty/rocksdb/rocksdb/util/env_posix.cc 2016-08-01 19:05:25.192150244 +0200 |
|
@@ -52,6 +52,11 @@ |
|
#include "util/thread_local.h" |
|
#include "util/thread_status_updater.h" |
|
|
|
+#if defined(OS_FREEBSD) || defined(__FreeBSD__) |
|
+#define fdatasync fsync |
|
+#define fread_unlocked fread |
|
+#endif |
|
+ |
|
#if !defined(TMPFS_MAGIC) |
|
#define TMPFS_MAGIC 0x01021994 |
|
#endif |
|
Index: 3rdParty/rocksdb/rocksdb/util/options_builder.cc |
|
--- 3rdParty/rocksdb/rocksdb/util/options_builder.cc.orig 2016-08-01 13:49:49.000000000 +0200 |
|
+++ 3rdParty/rocksdb/rocksdb/util/options_builder.cc 2016-08-01 19:05:25.192150244 +0200 |
|
@@ -27,7 +27,7 @@ |
|
// Otherwise, calculate a score based on threshold and expected value of |
|
// two styles, weighing reads 4X important than writes. |
|
int expected_levels = static_cast<int>(ceil( |
|
- std::log(target_db_size / write_buffer_size) / std::log(kBytesForLevelMultiplier))); |
|
+ log(target_db_size / write_buffer_size) / log(kBytesForLevelMultiplier))); |
|
|
|
int expected_max_files_universal = |
|
static_cast<int>(ceil(log2(target_db_size / write_buffer_size))); |
|
@@ -118,8 +118,8 @@ |
|
int write_amplification_threshold, |
|
uint64_t target_db_size, Options* options) { |
|
int expected_levels_one_level0_file = |
|
- static_cast<int>(ceil(std::log(target_db_size / options->write_buffer_size) / |
|
- std::log(kBytesForLevelMultiplier))); |
|
+ static_cast<int>(ceil(log(target_db_size / options->write_buffer_size) / |
|
+ log(kBytesForLevelMultiplier))); |
|
|
|
int level0_stop_writes_trigger = |
|
read_amplification_threshold - expected_levels_one_level0_file; |
|
Index: 3rdParty/rocksdb/rocksdb/util/options_helper.cc |
|
--- 3rdParty/rocksdb/rocksdb/util/options_helper.cc.orig 2016-08-01 13:49:49.000000000 +0200 |
|
+++ 3rdParty/rocksdb/rocksdb/util/options_helper.cc 2016-08-01 19:05:25.192150244 +0200 |
|
@@ -160,7 +160,7 @@ |
|
|
|
uint64_t ParseUint64(const std::string& value) { |
|
size_t endchar; |
|
-#ifndef CYGWIN |
|
+#if 0 |
|
uint64_t num = std::stoull(value.c_str(), &endchar); |
|
#else |
|
char* endptr; |
|
@@ -198,7 +198,7 @@ |
|
|
|
int ParseInt(const std::string& value) { |
|
size_t endchar; |
|
-#ifndef CYGWIN |
|
+#if 0 |
|
int num = std::stoi(value.c_str(), &endchar); |
|
#else |
|
char* endptr; |
|
@@ -220,7 +220,7 @@ |
|
} |
|
|
|
double ParseDouble(const std::string& value) { |
|
-#ifndef CYGWIN |
|
+#if 0 |
|
return std::stod(value); |
|
#else |
|
return std::strtod(value.c_str(), 0); |
|
Index: 3rdParty/rocksdb/rocksdb/util/string_util.h |
|
--- 3rdParty/rocksdb/rocksdb/util/string_util.h.orig 2016-08-01 13:49:49.000000000 +0200 |
|
+++ 3rdParty/rocksdb/rocksdb/util/string_util.h 2016-08-01 19:05:25.202130703 +0200 |
|
@@ -16,7 +16,7 @@ |
|
|
|
template <typename T> |
|
inline std::string ToString(T value) { |
|
-#if !(defined OS_ANDROID) && !(defined CYGWIN) |
|
+#if 0 |
|
return std::to_string(value); |
|
#else |
|
// Andorid or cygwin doesn't support all of C++11, std::to_string() being |
|
Index: 3rdParty/rocksdb/rocksdb/util/thread_posix.cc |
|
--- 3rdParty/rocksdb/rocksdb/util/thread_posix.cc.orig 2016-08-01 13:49:49.000000000 +0200 |
|
+++ 3rdParty/rocksdb/rocksdb/util/thread_posix.cc 2016-08-01 19:05:25.202130703 +0200 |
|
@@ -10,6 +10,7 @@ |
|
#include "util/thread_posix.h" |
|
#include <atomic> |
|
#include <unistd.h> |
|
+#include <stdlib.h> |
|
#ifdef OS_LINUX |
|
#include <sys/syscall.h> |
|
#endif |
|
Index: CMakeLists.txt |
|
--- CMakeLists.txt.orig 2016-08-01 13:49:49.000000000 +0200 |
|
+++ CMakeLists.txt 2016-08-01 19:05:25.202130703 +0200 |
|
@@ -475,9 +475,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 () |
|
@@ -786,6 +787,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: Installation/file-list-js.sh |
|
--- Installation/file-list-js.sh.orig 2016-08-01 13:49:49.000000000 +0200 |
|
+++ Installation/file-list-js.sh 2016-08-01 19:05:25.202130703 +0200 |
|
@@ -1,4 +1,4 @@ |
|
-#!/bin/bash |
|
+#!/usr/bin/env bash |
|
set -e |
|
|
|
SRCDIR=$1 |
|
Index: arangod/Aql/Condition.cpp |
|
--- arangod/Aql/Condition.cpp.orig 2016-08-01 13:49:49.000000000 +0200 |
|
+++ arangod/Aql/Condition.cpp 2016-08-01 19:05:25.202130703 +0200 |
|
@@ -32,6 +32,8 @@ |
|
#include "Basics/JsonHelper.h" |
|
#include "Utils/Transaction.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 2016-08-01 13:49:49.000000000 +0200 |
|
+++ arangod/Aql/Expression.cpp 2016-08-01 19:05:25.202130703 +0200 |
|
@@ -583,7 +583,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(position, mustDestroy, true); |
|
} catch (...) { |
|
// no number found. |
|
Index: arangod/Aql/Functions.cpp |
|
--- arangod/Aql/Functions.cpp.orig 2016-08-01 13:49:49.000000000 +0200 |
|
+++ arangod/Aql/Functions.cpp 2016-08-01 19:05:25.202130703 +0200 |
|
@@ -267,10 +267,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; |
|
@@ -2652,7 +2652,7 @@ |
|
bool failed = false; // we're intentionally ignoring this variable here |
|
double input = value.toDouble(failed); |
|
|
|
- return NumberValue(trx, std::log2(input), true); |
|
+ return NumberValue(trx, log2(input), true); |
|
} |
|
|
|
/// @brief function LOG10 |
|
@@ -2694,7 +2694,7 @@ |
|
bool failed = false; // we're intentionally ignoring this variable here |
|
double input = value.toDouble(failed); |
|
|
|
- return NumberValue(trx, std::exp2(input), true); |
|
+ return NumberValue(trx, exp2(input), true); |
|
} |
|
|
|
/// @brief function SIN |
|
Index: arangod/Aql/TraversalNode.cpp |
|
--- arangod/Aql/TraversalNode.cpp.orig 2016-08-01 13:49:49.000000000 +0200 |
|
+++ arangod/Aql/TraversalNode.cpp 2016-08-01 19:05:25.202130703 +0200 |
|
@@ -444,7 +444,7 @@ |
|
|
|
std::vector<arangodb::traverser::TraverserExpression*> oneExpressionSet; |
|
oneExpressionSet.reserve(oneSetLength); |
|
- size_t n = static_cast<size_t>(std::stoull(k)); |
|
+ size_t n = std::strtoul(k.c_str(), NULL, 10); |
|
_expressions.emplace(n, oneExpressionSet); |
|
auto it = _expressions.find(n); |
|
|
|
Index: arangod/Indexes/Index.cpp |
|
--- arangod/Indexes/Index.cpp.orig 2016-08-01 13:49:49.000000000 +0200 |
|
+++ arangod/Indexes/Index.cpp 2016-08-01 19:05:25.202130703 +0200 |
|
@@ -494,7 +494,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/Indexes/RocksDBIndex.cpp |
|
--- arangod/Indexes/RocksDBIndex.cpp.orig 2016-08-01 13:49:49.000000000 +0200 |
|
+++ arangod/Indexes/RocksDBIndex.cpp 2016-08-01 19:05:25.202130703 +0200 |
|
@@ -849,7 +849,7 @@ |
|
return true; |
|
} else if (coveredAttributes > 0) { |
|
estimatedCost = (itemsInIndex / coveredAttributes) * |
|
- std::log2(static_cast<double>(itemsInIndex)); |
|
+ log2(static_cast<double>(itemsInIndex)); |
|
if (sortCondition->isAscending()) { |
|
// reverse iteration is more expensive |
|
estimatedCost *= 4; |
|
@@ -862,7 +862,7 @@ |
|
coveredAttributes = 0; |
|
// by default no sort conditions are supported |
|
if (itemsInIndex > 0) { |
|
- estimatedCost = itemsInIndex * std::log2(static_cast<double>(itemsInIndex)); |
|
+ estimatedCost = itemsInIndex * log2(static_cast<double>(itemsInIndex)); |
|
// slightly penalize this type of index against other indexes which |
|
// are in memory |
|
estimatedCost *= 1.05; |
|
Index: arangod/Indexes/SkiplistIndex.cpp |
|
--- arangod/Indexes/SkiplistIndex.cpp.orig 2016-08-01 13:49:49.000000000 +0200 |
|
+++ arangod/Indexes/SkiplistIndex.cpp 2016-08-01 19:05:25.202130703 +0200 |
|
@@ -34,6 +34,8 @@ |
|
#include <velocypack/Iterator.h> |
|
#include <velocypack/velocypack-aliases.h> |
|
|
|
+#include <cmath> |
|
+ |
|
using namespace arangodb; |
|
|
|
static size_t sortWeight(arangodb::aql::AstNode const* node) { |
|
@@ -811,7 +813,7 @@ |
|
return true; |
|
} else if (coveredAttributes > 0) { |
|
estimatedCost = (itemsInIndex / coveredAttributes) * |
|
- std::log2(static_cast<double>(itemsInIndex)); |
|
+ log2(static_cast<double>(itemsInIndex)); |
|
return true; |
|
} |
|
} |
|
@@ -820,7 +822,7 @@ |
|
coveredAttributes = 0; |
|
// by default no sort conditions are supported |
|
if (itemsInIndex > 0) { |
|
- estimatedCost = itemsInIndex * std::log2(static_cast<double>(itemsInIndex)); |
|
+ estimatedCost = itemsInIndex * log2(static_cast<double>(itemsInIndex)); |
|
} else { |
|
estimatedCost = 0.0; |
|
} |
|
Index: arangod/Scheduler/ListenTask.cpp |
|
--- arangod/Scheduler/ListenTask.cpp.orig 2016-08-01 13:49:49.000000000 +0200 |
|
+++ arangod/Scheduler/ListenTask.cpp 2016-08-01 19:05:25.202130703 +0200 |
|
@@ -26,6 +26,11 @@ |
|
|
|
#include <errno.h> |
|
|
|
+#include <sys/types.h> |
|
+#include <sys/socket.h> |
|
+#include <netinet/in.h> |
|
+#include <arpa/inet.h> |
|
+ |
|
#ifdef TRI_HAVE_WINSOCK2_H |
|
#include "Basics/win-utils.h" |
|
#include <WinSock2.h> |
|
Index: arangod/Utils/Transaction.cpp |
|
--- arangod/Utils/Transaction.cpp.orig 2016-08-01 13:49:49.000000000 +0200 |
|
+++ arangod/Utils/Transaction.cpp 2016-08-01 19:05:25.202130703 +0200 |
|
@@ -103,7 +103,7 @@ |
|
|
|
// index does not support the sort condition |
|
if (itemsInIndex > 0) { |
|
- estimatedCost = itemsInIndex * std::log2(static_cast<double>(itemsInIndex)); |
|
+ estimatedCost = itemsInIndex * log2(static_cast<double>(itemsInIndex)); |
|
} else { |
|
estimatedCost = 0.0; |
|
} |
|
Index: cmake/ArangoDBMacros.cmake |
|
--- cmake/ArangoDBMacros.cmake.orig 2016-08-01 13:49:49.000000000 +0200 |
|
+++ cmake/ArangoDBMacros.cmake 2016-08-01 19:06:36.462171365 +0200 |
|
@@ -19,11 +19,11 @@ |
|
|
|
# /etc ------------------------------- |
|
if (ETCDIR STREQUAL "") |
|
- set(ETCDIR_NATIVE "${CMAKE_INSTALL_PREFIX}/etc/arangodb3") |
|
- set(ETCDIR_INSTALL "etc/arangodb3") |
|
+ set(ETCDIR_NATIVE "${CMAKE_INSTALL_PREFIX}/etc/arangodb") |
|
+ set(ETCDIR_INSTALL "etc/arangodb") |
|
else () |
|
- set(ETCDIR_NATIVE "${ETCDIR}/arangodb3") |
|
- set(ETCDIR_INSTALL "${ETCDIR}/arangodb3") |
|
+ set(ETCDIR_NATIVE "${ETCDIR}/arangodb") |
|
+ set(ETCDIR_INSTALL "${ETCDIR}/arangodb") |
|
endif () |
|
|
|
# MS stuff --------------------------- |
|
@@ -40,7 +40,7 @@ |
|
# /var |
|
set(VARDIR "" |
|
CACHE path |
|
- "System configuration directory (defaults to prefix/var/arangodb3)" |
|
+ "System configuration directory (defaults to prefix/var/arangodb)" |
|
) |
|
|
|
if (VARDIR STREQUAL "") |
|
@@ -54,13 +54,13 @@ |
|
file(TO_NATIVE_PATH "${VARDIR_NATIVE}" VARDIR_NATIVE) |
|
|
|
# database directory |
|
-FILE(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/var/lib/arangodb3") |
|
+FILE(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/var/arangodb/db") |
|
|
|
# apps |
|
-FILE(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/var/lib/arangodb3-apps") |
|
+FILE(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/lib/arangodb/apps") |
|
|
|
# logs |
|
-FILE(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/var/log/arangodb3") |
|
+FILE(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/var/arangodb/log") |
|
|
|
# resources |
|
set(TRI_RESOURCEDIR "resources") |
|
@@ -112,15 +112,15 @@ |
|
# Global macros ---------------------------------------------------------------- |
|
macro (generate_root_config name) |
|
FILE(READ ${PROJECT_SOURCE_DIR}/etc/arangodb3/${name}.conf.in FileContent) |
|
- STRING(REPLACE "@PKGDATADIR@" "@ROOTDIR@/share/arangodb3" |
|
+ STRING(REPLACE "@PKGDATADIR@" "@ROOTDIR@/share/arangodb" |
|
FileContent "${FileContent}") |
|
- STRING(REPLACE "@LOCALSTATEDIR@" "@ROOTDIR@/var" |
|
+ STRING(REPLACE "@LOCALSTATEDIR@" "@ROOTDIR@/var/arangodb" |
|
FileContent "${FileContent}") |
|
STRING(REPLACE "@SBINDIR@" "@ROOTDIR@/bin" |
|
FileContent "${FileContent}") |
|
STRING(REPLACE "@LIBEXECDIR@/arangodb3" "@ROOTDIR@/bin" |
|
FileContent "${FileContent}") |
|
- STRING(REPLACE "@SYSCONFDIR@" "@ROOTDIR@/etc/arangodb3" |
|
+ STRING(REPLACE "@SYSCONFDIR@" "@ROOTDIR@/etc/arangodb" |
|
FileContent "${FileContent}") |
|
if (ENABLE_UID_CFG) |
|
STRING(REPLACE "@DEFINEUID@" "" |
|
@@ -135,13 +135,13 @@ |
|
STRING(REGEX REPLACE "[\r\n]file =" "\n# file =" |
|
FileContent "${FileContent}") |
|
endif () |
|
- FILE(WRITE ${PROJECT_BINARY_DIR}/etc/arangodb3/${name}.conf "${FileContent}") |
|
+ FILE(WRITE ${PROJECT_BINARY_DIR}/etc/arangodb/${name}.conf "${FileContent}") |
|
endmacro () |
|
|
|
# generates config file using the configured paths ---------------------------- |
|
macro (generate_path_config name) |
|
FILE(READ ${PROJECT_SOURCE_DIR}/etc/arangodb3/${name}.conf.in FileContent) |
|
- STRING(REPLACE "@PKGDATADIR@" "${CMAKE_INSTALL_DATADIR}/arangodb3" |
|
+ STRING(REPLACE "@PKGDATADIR@" "${CMAKE_INSTALL_DATADIR}/arangodb" |
|
FileContent "${FileContent}") |
|
STRING(REPLACE "@LOCALSTATEDIR@" "${VARDIR_NATIVE}" |
|
FileContent "${FileContent}") |
|
@@ -152,7 +152,7 @@ |
|
STRING(REPLACE "@DEFINEUID@" "# " |
|
FileContent "${FileContent}") |
|
endif () |
|
- FILE(WRITE ${PROJECT_BINARY_DIR}/etc/arangodb3/${name}.conf "${FileContent}") |
|
+ FILE(WRITE ${PROJECT_BINARY_DIR}/etc/arangodb/${name}.conf "${FileContent}") |
|
endmacro () |
|
|
|
# installs a config file ------------------------------------------------------- |
|
@@ -163,7 +163,7 @@ |
|
generate_path_config(${name}) |
|
endif () |
|
install( |
|
- FILES ${PROJECT_BINARY_DIR}/etc/arangodb3/${name}.conf |
|
+ FILES ${PROJECT_BINARY_DIR}/etc/arangodb/${name}.conf |
|
DESTINATION ${ETCDIR_INSTALL}) |
|
endmacro () |
|
|
|
@@ -232,7 +232,7 @@ |
|
|
|
# install ---------------------------------------------------------------------- |
|
install(DIRECTORY ${PROJECT_SOURCE_DIR}/Documentation/man/ |
|
- DESTINATION share/man) |
|
+ DESTINATION man) |
|
|
|
if (MSVC) |
|
install_readme(README . README.txt) |
|
@@ -306,7 +306,7 @@ |
|
if (DARWIN) |
|
set(CPACK_PACKAGE_NAME "ArangoDB-CLI") |
|
else () |
|
- set(CPACK_PACKAGE_NAME "arangodb3") |
|
+ set(CPACK_PACKAGE_NAME "arangodb") |
|
endif () |
|
|
|
set(CPACK_PACKAGE_VENDOR "ArangoDB GmbH") |
|
@@ -415,7 +415,7 @@ |
|
|
|
install( |
|
DIRECTORY ${PROJECT_SOURCE_DIR}/js/common ${PROJECT_SOURCE_DIR}/js/client |
|
- DESTINATION ${CMAKE_INSTALL_DATADIR}/arangodb3/js |
|
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/arangodb/js |
|
FILES_MATCHING PATTERN "*.js" |
|
REGEX "^.*/common/test-data$" EXCLUDE |
|
REGEX "^.*/common/tests$" EXCLUDE |
|
@@ -427,7 +427,7 @@ |
|
|
|
install( |
|
DIRECTORY ${PROJECT_SOURCE_DIR}/js/actions ${PROJECT_SOURCE_DIR}/js/apps ${PROJECT_SOURCE_DIR}/js/contrib ${PROJECT_SOURCE_DIR}/js/node ${PROJECT_SOURCE_DIR}/js/server |
|
- DESTINATION ${CMAKE_INSTALL_DATADIR}/arangodb3/js |
|
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/arangodb/js |
|
REGEX "^.*/server/tests$" EXCLUDE |
|
REGEX "^.*/aardvark/APP/node_modules$" EXCLUDE |
|
) |
|
@@ -437,7 +437,7 @@ |
|
################################################################################ |
|
|
|
install( |
|
- DIRECTORY ${PROJECT_BINARY_DIR}/var/log/arangodb3 |
|
+ DIRECTORY ${PROJECT_BINARY_DIR}/var/arangodb/log |
|
DESTINATION ${VARDIR_INSTALL}/log) |
|
|
|
################################################################################ |
|
@@ -445,13 +445,13 @@ |
|
################################################################################ |
|
|
|
install( |
|
- DIRECTORY ${PROJECT_BINARY_DIR}/var/lib/arangodb3 |
|
- DESTINATION ${VARDIR_INSTALL}/lib) |
|
+ DIRECTORY ${PROJECT_BINARY_DIR}/var/arangodb/db |
|
+ DESTINATION ${VARDIR_INSTALL}/db) |
|
|
|
################################################################################ |
|
### @brief install apps directory |
|
################################################################################ |
|
|
|
install( |
|
- DIRECTORY ${PROJECT_BINARY_DIR}/var/lib/arangodb3-apps |
|
- DESTINATION ${VARDIR_INSTALL}/lib) |
|
+ DIRECTORY ${PROJECT_BINARY_DIR}/lib/arangodb/apps |
|
+ DESTINATION ${VARDIR_INSTALL}/lib/arangodb/apps) |
|
Index: lib/Basics/JsonHelper.cpp |
|
--- lib/Basics/JsonHelper.cpp.orig 2016-08-01 13:49:49.000000000 +0200 |
|
+++ lib/Basics/JsonHelper.cpp 2016-08-01 19:05:25.202130703 +0200 |
|
@@ -74,7 +74,7 @@ |
|
TRI_AtVector(&json->_value._objects, i)); |
|
|
|
if (TRI_IsStringJson(v)) { |
|
- result.emplace_back( |
|
+ result.push_back( |
|
std::string(v->_value._string.data, v->_value._string.length - 1)); |
|
} |
|
} |
|
Index: lib/Basics/operating-system.h |
|
--- lib/Basics/operating-system.h.orig 2016-08-01 13:49:49.000000000 +0200 |
|
+++ lib/Basics/operating-system.h 2016-08-01 19:05:25.212067999 +0200 |
|
@@ -457,6 +457,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 2016-08-01 13:49:49.000000000 +0200 |
|
+++ lib/Basics/socket-utils.h 2016-08-01 19:05:25.212067999 +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 2016-08-01 13:49:49.000000000 +0200 |
|
+++ lib/Endpoint/EndpointIp.cpp 2016-08-01 19:05:25.212067999 +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/JsonParser/json-parser.cpp |
|
--- lib/JsonParser/json-parser.cpp.orig 2016-08-01 13:49:49.000000000 +0200 |
|
+++ lib/JsonParser/json-parser.cpp 2016-08-01 19:05:25.212067999 +0200 |
|
@@ -36,6 +36,7 @@ |
|
#ifndef __FreeBSD__ |
|
int fileno(FILE *stream); |
|
#endif |
|
+#include <stdio.h> |
|
#endif |
|
|
|
#define YY_NO_INPUT |
|
Index: lib/JsonParser/json-parser.ll |
|
--- lib/JsonParser/json-parser.ll.orig 2016-08-01 13:49:49.000000000 +0200 |
|
+++ lib/JsonParser/json-parser.ll 2016-08-01 19:05:25.212067999 +0200 |
|
@@ -36,6 +36,7 @@ |
|
#ifndef __FreeBSD__ |
|
int fileno(FILE *stream); |
|
#endif |
|
+#include <stdio.h> |
|
#endif |
|
|
|
#define YY_NO_INPUT |
|
Index: lib/SimpleHttpClient/SimpleHttpClient.cpp |
|
--- lib/SimpleHttpClient/SimpleHttpClient.cpp.orig 2016-08-01 13:49:49.000000000 +0200 |
|
+++ lib/SimpleHttpClient/SimpleHttpClient.cpp 2016-08-01 19:05:25.212067999 +0200 |
|
@@ -808,7 +808,7 @@ |
|
|
|
try { |
|
contentLength = |
|
- static_cast<uint32_t>(std::stol(line, nullptr, 16)); |
|
+ 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 2016-08-01 13:49:49.000000000 +0200 |
|
+++ lib/Ssl/SslFeature.cpp 2016-08-01 19:05:25.212067999 +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;
|
|
|