|
|
|
|
Index: 3rdParty/V8-4.3.61/build/all.gyp
|
|
|
|
|
--- 3rdParty/V8-4.3.61/build/all.gyp.orig 2016-02-19 11:26:48.000000000 +0100
|
|
|
|
|
+++ 3rdParty/V8-4.3.61/build/all.gyp 2016-02-20 16:49:59.332640657 +0100
|
|
|
|
|
@@ -8,10 +8,7 @@
|
|
|
|
|
'target_name': 'All',
|
|
|
|
|
'type': 'none',
|
|
|
|
|
'dependencies': [
|
|
|
|
|
- '../samples/samples.gyp:*',
|
|
|
|
|
- '../src/d8.gyp:d8',
|
|
|
|
|
- '../test/cctest/cctest.gyp:*',
|
|
|
|
|
- '../test/unittests/unittests.gyp:*',
|
|
|
|
|
+ '../src/d8.gyp:d8'
|
|
|
|
|
],
|
|
|
|
|
'conditions': [
|
|
|
|
|
['component!="shared_library"', {
|
|
|
|
|
Index: 3rdParty/V8-4.3.61/src/base/platform/platform-freebsd.cc
|
|
|
|
|
--- 3rdParty/V8-4.3.61/src/base/platform/platform-freebsd.cc.orig 2016-02-19 11:26:48.000000000 +0100
|
|
|
|
|
+++ 3rdParty/V8-4.3.61/src/base/platform/platform-freebsd.cc 2016-02-20 16:49:59.332640657 +0100
|
|
|
|
|
@@ -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-4.3.61/src/base/platform/platform-posix.cc
|
|
|
|
|
--- 3rdParty/V8-4.3.61/src/base/platform/platform-posix.cc.orig 2016-02-19 11:26:48.000000000 +0100
|
|
|
|
|
+++ 3rdParty/V8-4.3.61/src/base/platform/platform-posix.cc 2016-02-20 16:49:59.332640657 +0100
|
|
|
|
|
@@ -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-4.3.61/tools/gyp/v8.gyp
|
|
|
|
|
--- 3rdParty/V8-4.3.61/tools/gyp/v8.gyp.orig 2016-02-19 11:26:48.000000000 +0100
|
|
|
|
|
+++ 3rdParty/V8-4.3.61/tools/gyp/v8.gyp 2016-02-20 16:49:59.332640657 +0100
|
|
|
|
|
@@ -348,6 +348,9 @@
|
|
|
|
|
'../..',
|
|
|
|
|
],
|
|
|
|
|
'sources': [ ### gcmole(all) ###
|
|
|
|
|
+ '<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
|
|
|
|
|
+ '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc',
|
|
|
|
|
+ '../../src/snapshot/snapshot-empty.cc',
|
|
|
|
|
'../../src/accessors.cc',
|
|
|
|
|
'../../src/accessors.h',
|
|
|
|
|
'../../src/allocation.cc',
|
|
|
|
|
Index: Installation/file-list-js.sh
|
|
|
|
|
--- Installation/file-list-js.sh.orig 2016-02-19 11:26:48.000000000 +0100
|
|
|
|
|
+++ Installation/file-list-js.sh 2016-02-20 16:49:59.332640657 +0100
|
|
|
|
|
@@ -1,4 +1,4 @@
|
|
|
|
|
-#!/bin/bash
|
|
|
|
|
+#!/usr/bin/env bash
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
|
|
SRCDIR=$1
|
|
|
|
|
Index: Makefile.in
|
|
|
|
|
--- Makefile.in.orig 2016-02-19 11:26:48.000000000 +0100
|
|
|
|
|
+++ Makefile.in 2016-02-20 16:49:59.342552043 +0100
|
|
|
|
|
@@ -999,7 +999,8 @@
|
|
|
|
|
@MATH_LIBS@ \
|
|
|
|
|
@OPENSSL_LIBS@ \
|
|
|
|
|
@ICU_LIBS@ \
|
|
|
|
|
- @ZLIB_LIBS@
|
|
|
|
|
+ @ZLIB_LIBS@ \
|
|
|
|
|
+ @LIBS@
|
|
|
|
|
|
|
|
|
|
LN_S = @LN_S@
|
|
|
|
|
LTLIBOBJS = @LTLIBOBJS@
|
|
|
|
|
@@ -11354,7 +11355,7 @@
|
|
|
|
|
################################################################################
|
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
|
|
-@ENABLE_ARMV6_TRUE@@ENABLE_V8_DEBUG_TRUE@ cd @top_srcdir@/3rdParty/$(V8DIR) \
|
|
|
|
|
+@ENABLE_ARMV6_TRUE@@ENABLE_V8_DEBUG_TRUE@ cd @top_srcdir@/3rdParty/$(V8DIR) && \
|
|
|
|
|
@ENABLE_ARMV6_TRUE@@ENABLE_V8_DEBUG_TRUE@ export GYPFLAGS="-Darm_fpu=vfp -Darm_version=6 -Dstandalone_static_library=1 $(GOLD_V8_GYP)" \
|
|
|
|
|
@ENABLE_ARMV6_TRUE@@ENABLE_V8_DEBUG_TRUE@ && $(MAKE) \
|
|
|
|
|
@ENABLE_ARMV6_TRUE@@ENABLE_V8_DEBUG_TRUE@ CC="$(CC)" \
|
|
|
|
|
@@ -11367,7 +11368,7 @@
|
|
|
|
|
@ENABLE_ARMV6_TRUE@@ENABLE_V8_DEBUG_TRUE@ LDFLAGS="-march=armv6" \
|
|
|
|
|
@ENABLE_ARMV6_TRUE@@ENABLE_V8_DEBUG_TRUE@ debug=on v8_optimized_debug=0 v8_enable_backtrace=on \
|
|
|
|
|
@ENABLE_ARMV6_TRUE@@ENABLE_V8_DEBUG_TRUE@ library=static strictaliasing=off snapshot=off werror=no hardfp=on @V8_TARGET@
|
|
|
|
|
-@ENABLE_ARMV6_TRUE@@ENABLE_V8_DEBUG_FALSE@ cd @top_srcdir@/3rdParty/$(V8DIR) \
|
|
|
|
|
+@ENABLE_ARMV6_TRUE@@ENABLE_V8_DEBUG_FALSE@ cd @top_srcdir@/3rdParty/$(V8DIR) && \
|
|
|
|
|
@ENABLE_ARMV6_TRUE@@ENABLE_V8_DEBUG_FALSE@ export GYPFLAGS="-Darm_fpu=vfp -Darm_version=6 -Dstandalone_static_library=1 $(GOLD_V8_GYP)" \
|
|
|
|
|
@ENABLE_ARMV6_TRUE@@ENABLE_V8_DEBUG_FALSE@ && $(MAKE) \
|
|
|
|
|
@ENABLE_ARMV6_TRUE@@ENABLE_V8_DEBUG_FALSE@ CC="$(CC)" \
|
|
|
|
|
@@ -11383,7 +11384,7 @@
|
|
|
|
|
################################################################################
|
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
|
|
-@ENABLE_ARMV6_FALSE@@ENABLE_ARMV7_TRUE@@ENABLE_V8_DEBUG_TRUE@ cd @top_srcdir@/3rdParty/$(V8DIR) \
|
|
|
|
|
+@ENABLE_ARMV6_FALSE@@ENABLE_ARMV7_TRUE@@ENABLE_V8_DEBUG_TRUE@ cd @top_srcdir@/3rdParty/$(V8DIR) && \
|
|
|
|
|
@ENABLE_ARMV6_FALSE@@ENABLE_ARMV7_TRUE@@ENABLE_V8_DEBUG_TRUE@ export GYPFLAGS="-Darm_fpu=vfp -Darm_version=6 -Dstandalone_static_library=1 $(GOLD_V8_GYP)" \
|
|
|
|
|
@ENABLE_ARMV6_FALSE@@ENABLE_ARMV7_TRUE@@ENABLE_V8_DEBUG_TRUE@ && $(MAKE) \
|
|
|
|
|
@ENABLE_ARMV6_FALSE@@ENABLE_ARMV7_TRUE@@ENABLE_V8_DEBUG_TRUE@ CC="$(CC)" \
|
|
|
|
|
@@ -11396,7 +11397,7 @@
|
|
|
|
|
@ENABLE_ARMV6_FALSE@@ENABLE_ARMV7_TRUE@@ENABLE_V8_DEBUG_TRUE@ LDFLAGS="-march=armv7" \
|
|
|
|
|
@ENABLE_ARMV6_FALSE@@ENABLE_ARMV7_TRUE@@ENABLE_V8_DEBUG_TRUE@ debug=on v8_optimized_debug=0 v8_enable_backtrace=on \
|
|
|
|
|
@ENABLE_ARMV6_FALSE@@ENABLE_ARMV7_TRUE@@ENABLE_V8_DEBUG_TRUE@ library=static strictaliasing=off snapshot=off werror=no @V8_TARGET@
|
|
|
|
|
-@ENABLE_ARMV6_FALSE@@ENABLE_ARMV7_TRUE@@ENABLE_V8_DEBUG_FALSE@ cd @top_srcdir@/3rdParty/$(V8DIR) \
|
|
|
|
|
+@ENABLE_ARMV6_FALSE@@ENABLE_ARMV7_TRUE@@ENABLE_V8_DEBUG_FALSE@ cd @top_srcdir@/3rdParty/$(V8DIR) && \
|
|
|
|
|
@ENABLE_ARMV6_FALSE@@ENABLE_ARMV7_TRUE@@ENABLE_V8_DEBUG_FALSE@ export GYPFLAGS=" -Darm_version=7 -Dstandalone_static_library=1 $(GOLD_V8_GYP)" \
|
|
|
|
|
@ENABLE_ARMV6_FALSE@@ENABLE_ARMV7_TRUE@@ENABLE_V8_DEBUG_FALSE@ && $(MAKE) \
|
|
|
|
|
@ENABLE_ARMV6_FALSE@@ENABLE_ARMV7_TRUE@@ENABLE_V8_DEBUG_FALSE@ CC="$(CC)" \
|
|
|
|
|
@@ -11412,7 +11413,7 @@
|
|
|
|
|
################################################################################
|
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
|
|
-@ENABLE_ARMV6_FALSE@@ENABLE_ARMV7_FALSE@@ENABLE_DARWIN_TRUE@@ENABLE_V8_DEBUG_TRUE@ cd @top_srcdir@/3rdParty/$(V8DIR) \
|
|
|
|
|
+@ENABLE_ARMV6_FALSE@@ENABLE_ARMV7_FALSE@@ENABLE_DARWIN_TRUE@@ENABLE_V8_DEBUG_TRUE@ cd @top_srcdir@/3rdParty/$(V8DIR) && \
|
|
|
|
|
@ENABLE_ARMV6_FALSE@@ENABLE_ARMV7_FALSE@@ENABLE_DARWIN_TRUE@@ENABLE_V8_DEBUG_TRUE@ export GYPFLAGS="-Dstandalone_static_library=1 $(GOLD_V8_GYP)" \
|
|
|
|
|
@ENABLE_ARMV6_FALSE@@ENABLE_ARMV7_FALSE@@ENABLE_DARWIN_TRUE@@ENABLE_V8_DEBUG_TRUE@ && $(MAKE) \
|
|
|
|
|
@ENABLE_ARMV6_FALSE@@ENABLE_ARMV7_FALSE@@ENABLE_DARWIN_TRUE@@ENABLE_V8_DEBUG_TRUE@ CC="$(CC)" \
|
|
|
|
|
@@ -11429,7 +11430,7 @@
|
|
|
|
|
################################################################################
|
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
|
|
-@ENABLE_ARMV6_FALSE@@ENABLE_ARMV7_FALSE@@ENABLE_DARWIN_TRUE@@ENABLE_V8_DEBUG_FALSE@ cd @top_srcdir@/3rdParty/$(V8DIR) \
|
|
|
|
|
+@ENABLE_ARMV6_FALSE@@ENABLE_ARMV7_FALSE@@ENABLE_DARWIN_TRUE@@ENABLE_V8_DEBUG_FALSE@ cd @top_srcdir@/3rdParty/$(V8DIR) && \
|
|
|
|
|
@ENABLE_ARMV6_FALSE@@ENABLE_ARMV7_FALSE@@ENABLE_DARWIN_TRUE@@ENABLE_V8_DEBUG_FALSE@ export GYPFLAGS="-Dstandalone_static_library=1 $(GOLD_V8_GYP)" \
|
|
|
|
|
@ENABLE_ARMV6_FALSE@@ENABLE_ARMV7_FALSE@@ENABLE_DARWIN_TRUE@@ENABLE_V8_DEBUG_FALSE@ && $(MAKE) \
|
|
|
|
|
@ENABLE_ARMV6_FALSE@@ENABLE_ARMV7_FALSE@@ENABLE_DARWIN_TRUE@@ENABLE_V8_DEBUG_FALSE@ CC="$(CC)" \
|
|
|
|
|
@@ -11445,7 +11446,7 @@
|
|
|
|
|
################################################################################
|
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
|
|
-@ENABLE_ARMV6_FALSE@@ENABLE_ARMV7_FALSE@@ENABLE_DARWIN_FALSE@@ENABLE_V8_DEBUG_TRUE@ cd @top_srcdir@/3rdParty/$(V8DIR) \
|
|
|
|
|
+@ENABLE_ARMV6_FALSE@@ENABLE_ARMV7_FALSE@@ENABLE_DARWIN_FALSE@@ENABLE_V8_DEBUG_TRUE@ cd @top_srcdir@/3rdParty/$(V8DIR) && \
|
|
|
|
|
@ENABLE_ARMV6_FALSE@@ENABLE_ARMV7_FALSE@@ENABLE_DARWIN_FALSE@@ENABLE_V8_DEBUG_TRUE@ export GYPFLAGS="-Dstandalone_static_library=1 $(GOLD_V8_GYP)" \
|
|
|
|
|
@ENABLE_ARMV6_FALSE@@ENABLE_ARMV7_FALSE@@ENABLE_DARWIN_FALSE@@ENABLE_V8_DEBUG_TRUE@ && $(MAKE) \
|
|
|
|
|
@ENABLE_ARMV6_FALSE@@ENABLE_ARMV7_FALSE@@ENABLE_DARWIN_FALSE@@ENABLE_V8_DEBUG_TRUE@ CC="$(CC)" \
|
|
|
|
|
@@ -11457,7 +11458,7 @@
|
|
|
|
|
@ENABLE_ARMV6_FALSE@@ENABLE_ARMV7_FALSE@@ENABLE_DARWIN_FALSE@@ENABLE_V8_DEBUG_TRUE@ CXXFLAGS="-O0 -ggdb $(DEBUG_V8_FLAGS) $(GOLD_V8_FLAGS) $(STDLIB_FLAGS)" \
|
|
|
|
|
@ENABLE_ARMV6_FALSE@@ENABLE_ARMV7_FALSE@@ENABLE_DARWIN_FALSE@@ENABLE_V8_DEBUG_TRUE@ debug=on v8_optimized_debug=0 v8_enable_backtrace=on \
|
|
|
|
|
@ENABLE_ARMV6_FALSE@@ENABLE_ARMV7_FALSE@@ENABLE_DARWIN_FALSE@@ENABLE_V8_DEBUG_TRUE@ library=static strictaliasing=off snapshot=off werror=no @V8_TARGET@
|
|
|
|
|
-@ENABLE_ARMV6_FALSE@@ENABLE_ARMV7_FALSE@@ENABLE_DARWIN_FALSE@@ENABLE_V8_DEBUG_FALSE@ cd @top_srcdir@/3rdParty/$(V8DIR) \
|
|
|
|
|
+@ENABLE_ARMV6_FALSE@@ENABLE_ARMV7_FALSE@@ENABLE_DARWIN_FALSE@@ENABLE_V8_DEBUG_FALSE@ cd @top_srcdir@/3rdParty/$(V8DIR) && \
|
|
|
|
|
@ENABLE_ARMV6_FALSE@@ENABLE_ARMV7_FALSE@@ENABLE_DARWIN_FALSE@@ENABLE_V8_DEBUG_FALSE@ export GYPFLAGS="-Dstandalone_static_library=1 $(GOLD_V8_GYP)" \
|
|
|
|
|
@ENABLE_ARMV6_FALSE@@ENABLE_ARMV7_FALSE@@ENABLE_DARWIN_FALSE@@ENABLE_V8_DEBUG_FALSE@ && $(MAKE) \
|
|
|
|
|
@ENABLE_ARMV6_FALSE@@ENABLE_ARMV7_FALSE@@ENABLE_DARWIN_FALSE@@ENABLE_V8_DEBUG_FALSE@ CC="$(CC)" \
|
|
|
|
|
Index: arangod/Aql/Condition.cpp
|
|
|
|
|
--- arangod/Aql/Condition.cpp.orig 2016-02-19 11:26:48.000000000 +0100
|
|
|
|
|
+++ arangod/Aql/Condition.cpp 2016-02-20 16:49:59.342552043 +0100
|
|
|
|
|
@@ -38,6 +38,8 @@
|
|
|
|
|
#include "Basics/json.h"
|
|
|
|
|
#include "Basics/JsonHelper.h"
|
|
|
|
|
|
|
|
|
|
+#include <cmath>
|
|
|
|
|
+
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
|
// turn off warnings about too long type name for debug symbols blabla in MSVC only...
|
|
|
|
|
#pragma warning(disable : 4503)
|
|
|
|
|
@@ -489,7 +491,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: arangod/Aql/Expression.cpp
|
|
|
|
|
--- arangod/Aql/Expression.cpp.orig 2016-02-19 11:26:48.000000000 +0100
|
|
|
|
|
+++ arangod/Aql/Expression.cpp 2016-02-20 16:49:59.342552043 +0100
|
|
|
|
|
@@ -652,7 +652,7 @@
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
// stoll() might throw an exception if the string is not a number
|
|
|
|
|
- int64_t position = static_cast<int64_t>(std::stoll(value.c_str()));
|
|
|
|
|
+ int64_t position = static_cast<int64_t>(std::strtol(value.c_str(), NULL, 10));
|
|
|
|
|
auto j = result.extractArrayMember(trx, myCollection, position, true);
|
|
|
|
|
result.destroy();
|
|
|
|
|
return AqlValue(new Json(TRI_UNKNOWN_MEM_ZONE, j.steal()));
|
|
|
|
|
Index: arangod/Aql/Functions.cpp
|
|
|
|
|
--- arangod/Aql/Functions.cpp.orig 2016-02-19 11:26:48.000000000 +0100
|
|
|
|
|
+++ arangod/Aql/Functions.cpp 2016-02-20 16:49:59.342552043 +0100
|
|
|
|
|
@@ -247,10 +247,10 @@
|
|
|
|
|
case TRI_JSON_STRING_REFERENCE: {
|
|
|
|
|
try {
|
|
|
|
|
std::string const str = triagens::basics::JsonHelper::getStringValue(json, "");
|
|
|
|
|
- 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;
|
|
|
|
|
Index: arangod/Aql/TraversalNode.cpp
|
|
|
|
|
--- arangod/Aql/TraversalNode.cpp.orig 2016-02-19 11:26:48.000000000 +0100
|
|
|
|
|
+++ arangod/Aql/TraversalNode.cpp 2016-02-20 16:49:59.342552043 +0100
|
|
|
|
|
@@ -375,7 +375,7 @@
|
|
|
|
|
|
|
|
|
|
std::vector<triagens::arango::traverser::TraverserExpression*> oneExpressionSet;
|
|
|
|
|
oneExpressionSet.reserve(oneSetLength);
|
|
|
|
|
- size_t n = 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-02-19 11:26:48.000000000 +0100
|
|
|
|
|
+++ arangod/Indexes/Index.cpp 2016-02-20 16:49:59.342552043 +0100
|
|
|
|
|
@@ -515,7 +515,7 @@
|
|
|
|
|
double& estimatedCost) const {
|
|
|
|
|
// by default, no sort conditions are supported
|
|
|
|
|
if (itemsInIndex > 0) {
|
|
|
|
|
- estimatedCost = itemsInIndex * std::log2(itemsInIndex);
|
|
|
|
|
+ estimatedCost = itemsInIndex * log2(itemsInIndex);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
estimatedCost = 0.0;
|
|
|
|
|
Index: arangod/Indexes/SkiplistIndex.cpp
|
|
|
|
|
--- arangod/Indexes/SkiplistIndex.cpp.orig 2016-02-19 11:26:48.000000000 +0100
|
|
|
|
|
+++ arangod/Indexes/SkiplistIndex.cpp 2016-02-20 16:49:59.342552043 +0100
|
|
|
|
|
@@ -38,6 +38,8 @@
|
|
|
|
|
#include "VocBase/transaction.h"
|
|
|
|
|
#include "VocBase/VocShaper.h"
|
|
|
|
|
|
|
|
|
|
+#include <cmath>
|
|
|
|
|
+
|
|
|
|
|
using namespace triagens::arango;
|
|
|
|
|
using Json = triagens::basics::Json;
|
|
|
|
|
|
|
|
|
|
@@ -1316,7 +1318,7 @@
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
else if (coveredAttributes > 0) {
|
|
|
|
|
- estimatedCost = (itemsInIndex / coveredAttributes) * std::log2(static_cast<double>(itemsInIndex));
|
|
|
|
|
+ estimatedCost = (itemsInIndex / coveredAttributes) * log2(static_cast<double>(itemsInIndex));
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@@ -1324,7 +1326,7 @@
|
|
|
|
|
|
|
|
|
|
// 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: arangosh/V8Client/ImportHelper.cpp
|
|
|
|
|
--- arangosh/V8Client/ImportHelper.cpp.orig 2016-02-19 11:26:48.000000000 +0100
|
|
|
|
|
+++ arangosh/V8Client/ImportHelper.cpp 2016-02-20 16:49:59.342552043 +0100
|
|
|
|
|
@@ -540,7 +540,7 @@
|
|
|
|
|
try {
|
|
|
|
|
if (fieldLength > 8) {
|
|
|
|
|
// long integer numbers might be problematic. check if we get out of range
|
|
|
|
|
- std::stoll(std::string(field, fieldLength)); // this will fail if the number cannot be converted
|
|
|
|
|
+ std::strtol(std::string(field, fieldLength).c_str(), NULL, 10); // this will fail if the number cannot be converted
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int64_t num = StringUtils::int64(field, fieldLength);
|
|
|
|
|
Index: lib/Basics/JsonHelper.cpp
|
|
|
|
|
--- lib/Basics/JsonHelper.cpp.orig 2016-02-19 11:26:48.000000000 +0100
|
|
|
|
|
+++ lib/Basics/JsonHelper.cpp 2016-02-20 16:49:59.342552043 +0100
|
|
|
|
|
@@ -129,7 +129,7 @@
|
|
|
|
|
if (isString(k) && isString(v)) {
|
|
|
|
|
std::string const key = std::string(k->_value._string.data, k->_value._string.length - 1);
|
|
|
|
|
std::string const value = std::string(v->_value._string.data, v->_value._string.length - 1);
|
|
|
|
|
- result.emplace(std::make_pair(key, value));
|
|
|
|
|
+ result.insert(std::make_pair(key, value));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Index: lib/Basics/json.cpp
|
|
|
|
|
--- lib/Basics/json.cpp.orig 2016-02-19 11:26:48.000000000 +0100
|
|
|
|
|
+++ lib/Basics/json.cpp 2016-02-20 16:49:59.342552043 +0100
|
|
|
|
|
@@ -1172,7 +1172,7 @@
|
|
|
|
|
case TRI_JSON_STRING_REFERENCE:
|
|
|
|
|
try {
|
|
|
|
|
// try converting string to number
|
|
|
|
|
- double v = std::stod(json->_value._string.data);
|
|
|
|
|
+ double v = std::strtod(json->_value._string.data, NULL);
|
|
|
|
|
return static_cast<int64_t>(v);
|
|
|
|
|
}
|
|
|
|
|
catch (...) {
|
|
|
|
|
@@ -1217,7 +1217,7 @@
|
|
|
|
|
case TRI_JSON_STRING_REFERENCE:
|
|
|
|
|
try {
|
|
|
|
|
// try converting string to number
|
|
|
|
|
- double v = std::stod(json->_value._string.data);
|
|
|
|
|
+ double v = std::strtod(json->_value._string.data, NULL);
|
|
|
|
|
return v;
|
|
|
|
|
}
|
|
|
|
|
catch (...) {
|
|
|
|
|
Index: lib/Basics/operating-system.h
|
|
|
|
|
--- lib/Basics/operating-system.h.orig 2016-02-19 11:26:48.000000000 +0100
|
|
|
|
|
+++ lib/Basics/operating-system.h 2016-02-20 16:49:59.342552043 +0100
|
|
|
|
|
@@ -299,6 +299,7 @@
|
|
|
|
|
|
|
|
|
|
#define TRI_GCC_THREAD_LOCAL_STORAGE 1
|
|
|
|
|
|
|
|
|
|
+#define TRI_HAVE_SC_PHYS_PAGES 1
|
|
|
|
|
#define TRI_HAVE_LINUX_PROC 1
|
|
|
|
|
#define TRI_HAVE_LINUX_SOCKETS 1
|
|
|
|
|
#define TRI_HAVE_POSIX_SPIN 1
|
|
|
|
|
Index: lib/JsonParser/json-parser.cpp
|
|
|
|
|
--- lib/JsonParser/json-parser.cpp.orig 2016-02-19 11:26:48.000000000 +0100
|
|
|
|
|
+++ lib/JsonParser/json-parser.cpp 2016-02-20 16:49:59.342552043 +0100
|
|
|
|
|
@@ -38,6 +38,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-02-19 11:26:48.000000000 +0100
|
|
|
|
|
+++ lib/JsonParser/json-parser.ll 2016-02-20 16:49:59.342552043 +0100
|
|
|
|
|
@@ -38,6 +38,7 @@
|
|
|
|
|
#ifndef __FreeBSD__
|
|
|
|
|
int fileno(FILE *stream);
|
|
|
|
|
#endif
|
|
|
|
|
+#include <stdio.h>
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#define YY_NO_INPUT
|
|
|
|
|
Index: lib/ProgramOptions/program-options.cpp
|
|
|
|
|
--- lib/ProgramOptions/program-options.cpp.orig 2016-02-19 11:26:48.000000000 +0100
|
|
|
|
|
+++ lib/ProgramOptions/program-options.cpp 2016-02-20 16:49:59.342552043 +0100
|
|
|
|
|
@@ -199,7 +199,7 @@
|
|
|
|
|
for (size_t i = 0; i < TRI_LengthVector(&options->_items); ++i) {
|
|
|
|
|
auto item = static_cast<TRI_PO_item_t const*>(TRI_AtVector(&options->_items, i));
|
|
|
|
|
|
|
|
|
|
- distances.emplace(TRI_Levenshtein(std::string(option), std::string(item->_desc->_name)), item->_desc->_name);
|
|
|
|
|
+ distances.insert(std::make_pair(TRI_Levenshtein(std::string(option), std::string(item->_desc->_name)), item->_desc->_name));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (! distances.empty()) {
|
|
|
|
|
Index: lib/Rest/InitializeRest.cpp
|
|
|
|
|
--- lib/Rest/InitializeRest.cpp.orig 2016-02-19 11:26:48.000000000 +0100
|
|
|
|
|
+++ lib/Rest/InitializeRest.cpp 2016-02-20 16:49:59.342552043 +0100
|
|
|
|
|
@@ -37,7 +37,6 @@
|
|
|
|
|
#include <openssl/opensslconf.h>
|
|
|
|
|
|
|
|
|
|
#ifndef OPENSSL_THREADS
|
|
|
|
|
-#error missing thread support for openssl, please recomple OpenSSL with threads
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#include "Basics/locks.h"
|
|
|
|
|
Index: lib/SimpleHttpClient/SimpleHttpClient.cpp
|
|
|
|
|
--- lib/SimpleHttpClient/SimpleHttpClient.cpp.orig 2016-02-19 11:26:48.000000000 +0100
|
|
|
|
|
+++ lib/SimpleHttpClient/SimpleHttpClient.cpp 2016-02-20 16:49:59.342552043 +0100
|
|
|
|
|
@@ -806,7 +806,7 @@
|
|
|
|
|
uint32_t contentLength;
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
- contentLength = static_cast<uint32_t>(std::stol(line, nullptr, 16)); // C++11
|
|
|
|
|
+ contentLength = static_cast<uint32_t>(strtol(line.c_str(), NULL, 16)); // C++11
|
|
|
|
|
}
|
|
|
|
|
catch (...) {
|
|
|
|
|
setErrorMessage("found invalid content-length", true);
|