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.

1249 lines
49 KiB

Index: 3rdParty/V8-4.3.61/build/all.gyp
--- 3rdParty/V8-4.3.61/build/all.gyp.orig 2015-12-21 16:28:37.000000000 +0100
+++ 3rdParty/V8-4.3.61/build/all.gyp 2016-01-19 21:46:29.009689912 +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 2015-12-21 16:28:37.000000000 +0100
+++ 3rdParty/V8-4.3.61/src/base/platform/platform-freebsd.cc 2016-01-19 21:46:29.009689912 +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 2015-12-21 16:28:37.000000000 +0100
+++ 3rdParty/V8-4.3.61/src/base/platform/platform-posix.cc 2016-01-19 21:46:29.009689912 +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 2015-12-21 16:28:37.000000000 +0100
+++ 3rdParty/V8-4.3.61/tools/gyp/v8.gyp 2016-01-19 21:46:29.009689912 +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 2015-12-21 16:28:37.000000000 +0100
+++ Installation/file-list-js.sh 2016-01-19 21:46:29.009689912 +0100
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -e
SRCDIR=$1
13 years ago
Index: Makefile.in
--- Makefile.in.orig 2015-12-21 16:28:37.000000000 +0100
+++ Makefile.in 2016-01-19 21:46:29.009689912 +0100
@@ -952,7 +952,8 @@
@MATH_LIBS@ \
@OPENSSL_LIBS@ \
@ICU_LIBS@ \
- @ZLIB_LIBS@
+ @ZLIB_LIBS@ \
+ @LIBS@
13 years ago
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
@@ -10629,7 +10630,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)" \
@@ -10642,7 +10643,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)" \
@@ -10658,7 +10659,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)" \
@@ -10671,7 +10672,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)" \
@@ -10687,7 +10688,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)" \
@@ -10704,7 +10705,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)" \
@@ -10720,7 +10721,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)" \
@@ -10732,7 +10733,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/AqlValue.cpp
--- arangod/Aql/AqlValue.cpp.orig 2015-12-21 16:28:37.000000000 +0100
+++ arangod/Aql/AqlValue.cpp 2016-01-19 21:46:29.019621900 +0100
@@ -37,6 +37,15 @@
using Json = triagens::basics::Json;
using JsonHelper = triagens::basics::JsonHelper;
+#include <string>
+#include <sstream>
+
+template <typename T> std::string my_to_string(const T& n) {
+ std::ostringstream stm;
+ stm << n;
+ return stm.str();
+}
+
////////////////////////////////////////////////////////////////////////////////
/// @brief a quick method to decide whether a value is true
////////////////////////////////////////////////////////////////////////////////
@@ -678,7 +687,7 @@
id.push_back('/');
id.append(key);
json(TRI_VOC_ATTRIBUTE_ID, Json(id));
- json(TRI_VOC_ATTRIBUTE_REV, Json(std::to_string(TRI_EXTRACT_MARKER_RID(_marker))));
+ json(TRI_VOC_ATTRIBUTE_REV, Json(my_to_string(TRI_EXTRACT_MARKER_RID(_marker))));
json(TRI_VOC_ATTRIBUTE_KEY, Json(key));
if (TRI_IS_EDGE_MARKER(_marker)) {
@@ -773,7 +782,7 @@
id.push_back('/');
id.append(key);
json(TRI_VOC_ATTRIBUTE_ID, Json(id));
- json(TRI_VOC_ATTRIBUTE_REV, Json(std::to_string(TRI_EXTRACT_MARKER_RID(_marker))));
+ json(TRI_VOC_ATTRIBUTE_REV, Json(my_to_string(TRI_EXTRACT_MARKER_RID(_marker))));
json(TRI_VOC_ATTRIBUTE_KEY, Json(key));
if (TRI_IS_EDGE_MARKER(_marker)) {
Index: arangod/Aql/AstNode.cpp
--- arangod/Aql/AstNode.cpp.orig 2015-12-21 16:28:37.000000000 +0100
+++ arangod/Aql/AstNode.cpp 2016-01-19 21:46:29.019621900 +0100
@@ -986,7 +986,7 @@
case VALUE_TYPE_STRING:
try {
// try converting string to number
- double v = std::stod(std::string(value.value._string, value.length));
+ double v = std::strtod(std::string(value.value._string, value.length).c_str(), NULL);
return ast->createNodeValueDouble(v);
}
catch (...) {
Index: arangod/Aql/ClusterBlocks.cpp
--- arangod/Aql/ClusterBlocks.cpp.orig 2015-12-21 16:28:37.000000000 +0100
+++ arangod/Aql/ClusterBlocks.cpp 2016-01-19 21:46:29.019621900 +0100
@@ -37,6 +37,15 @@
#include "VocBase/server.h"
#include "VocBase/vocbase.h"
+#include <string>
+#include <sstream>
+
+template <typename T> std::string my_to_string(const T& n) {
+ std::ostringstream stm;
+ stm << n;
+ return stm.str();
+}
+
using namespace std;
using namespace triagens::arango;
using namespace triagens::aql;
@@ -1243,7 +1252,7 @@
std::string DistributeBlock::createKey () const {
ClusterInfo* ci = ClusterInfo::instance();
uint64_t uid = ci->uniqid();
- return std::to_string(uid);
+ return my_to_string(uid);
}
// -----------------------------------------------------------------------------
@@ -1496,7 +1505,7 @@
std::unique_ptr<ClusterCommResult> res;
res.reset(sendRequest(rest::HttpRequest::HTTP_REQUEST_PUT,
"/_api/aql/shutdown/",
- string("{\"code\":" + std::to_string(errorCode) + "}")));
+ string("{\"code\":" + my_to_string(errorCode) + "}")));
if (throwExceptionAfterBadSyncRequest(res.get(), true)) {
// artificially ignore error in case query was not found during shutdown
return TRI_ERROR_NO_ERROR;
Index: arangod/Aql/Collection.cpp
--- arangod/Aql/Collection.cpp.orig 2015-12-21 16:28:37.000000000 +0100
+++ arangod/Aql/Collection.cpp 2016-01-19 21:46:29.019621900 +0100
@@ -38,6 +38,15 @@
#include "VocBase/transaction.h"
#include "VocBase/vocbase.h"
+#include <string>
+#include <sstream>
+
+template <typename T> std::string my_to_string(const T& n) {
+ std::ostringstream stm;
+ stm << n;
+ return stm.str();
+}
+
using namespace triagens::aql;
// -----------------------------------------------------------------------------
@@ -149,7 +158,7 @@
std::string id;
if (triagens::arango::ServerState::instance()->isDBServer() &&
documentCollection()->_info._planId > 0) {
- id = std::to_string(documentCollection()->_info._planId);
+ id = my_to_string(documentCollection()->_info._planId);
}
else {
id = name;
Index: arangod/Aql/ExecutionNode.cpp
--- arangod/Aql/ExecutionNode.cpp.orig 2015-12-21 16:28:37.000000000 +0100
+++ arangod/Aql/ExecutionNode.cpp 2016-01-19 21:46:29.019621900 +0100
@@ -38,6 +38,15 @@
const static bool Optional = true;
+#include <string>
+#include <sstream>
+
+template <typename T> std::string my_to_string(const T& n) {
+ std::ostringstream stm;
+ stm << n;
+ return stm.str();
+}
+
// -----------------------------------------------------------------------------
// --SECTION-- static initialization
// -----------------------------------------------------------------------------
@@ -2338,7 +2347,7 @@
else {
// use variable only. note that we cannot use the variable's name as it is not
// necessarily unique in one query (yes, COLLECT, you are to blame!)
- result.criteria.emplace_back(std::make_tuple(setter, std::to_string(variable->id), (*it).second));
+ result.criteria.emplace_back(std::make_tuple(setter, my_to_string(variable->id), (*it).second));
}
}
Index: arangod/Aql/ExecutionPlan.cpp
--- arangod/Aql/ExecutionPlan.cpp.orig 2015-12-21 16:28:37.000000000 +0100
+++ arangod/Aql/ExecutionPlan.cpp 2016-01-19 21:46:29.019621900 +0100
@@ -45,6 +45,15 @@
using namespace triagens::basics;
using JsonHelper = triagens::basics::JsonHelper;
+#include <string>
+#include <sstream>
+
+template <typename T> std::string my_to_string(const T& n) {
+ std::ostringstream stm;
+ stm << n;
+ return stm.str();
+}
+
// -----------------------------------------------------------------------------
// --SECTION-- constructors / destructors
// -----------------------------------------------------------------------------
@@ -273,7 +282,7 @@
return (*it).second;
}
- std::string msg = std::string("node [") + std::to_string(id) + std::string("] wasn't found");
+ std::string msg = std::string("node [") + my_to_string(id) + std::string("] wasn't found");
// node unknown
THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_INTERNAL, msg);
}
Index: arangod/Aql/Executor.cpp
--- arangod/Aql/Executor.cpp.orig 2015-12-21 16:28:37.000000000 +0100
+++ arangod/Aql/Executor.cpp 2016-01-19 21:46:29.019621900 +0100
@@ -40,6 +40,15 @@
#include "V8/v8-utils.h"
#include "V8Server/v8-shape-conv.h"
+#include <string>
+#include <sstream>
+
+template <typename T> std::string my_to_string(const T& n) {
+ std::ostringstream stm;
+ stm << n;
+ return stm.str();
+}
+
using namespace triagens::aql;
// -----------------------------------------------------------------------------
@@ -333,7 +342,7 @@
v8::Handle<v8::Object> constantValues = v8::Object::New(isolate);
for (auto const& it : _constantRegisters) {
std::string name = "r";
- name.append(std::to_string(it.second));
+ name.append(my_to_string(it.second));
constantValues->ForceSet(TRI_V8_STD_STRING(name), toV8(isolate, it.first));
}
Index: arangod/Aql/Expression.cpp
--- arangod/Aql/Expression.cpp.orig 2015-12-21 16:28:37.000000000 +0100
+++ arangod/Aql/Expression.cpp 2016-01-19 21:46:29.019621900 +0100
@@ -46,6 +46,15 @@
using Json = triagens::basics::Json;
using JsonHelper = triagens::basics::JsonHelper;
+#include <string>
+#include <sstream>
+
+template <typename T> std::string my_to_string(const T& n) {
+ std::ostringstream stm;
+ stm << n;
+ return stm.str();
+}
+
// -----------------------------------------------------------------------------
// --SECTION-- public static members
// -----------------------------------------------------------------------------
@@ -511,7 +520,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()));
@@ -531,7 +540,7 @@
AqlValue indexResult = executeSimpleExpression(index, &myCollection2, trx, argv, startPos, vars, regs, false);
if (indexResult.isNumber()) {
- auto&& indexString = std::to_string(indexResult.toInt64());
+ auto&& indexString = my_to_string(indexResult.toInt64());
auto j = result.extractObjectMember(trx, myCollection, indexString.c_str(), true, _buffer);
indexResult.destroy();
result.destroy();
Index: arangod/Aql/Functions.cpp
--- arangod/Aql/Functions.cpp.orig 2015-12-21 16:28:37.000000000 +0100
+++ arangod/Aql/Functions.cpp 2016-01-19 21:46:29.019621900 +0100
@@ -42,6 +42,15 @@
#include "VocBase/KeyGenerator.h"
#include "VocBase/VocShaper.h"
+#include <string>
+#include <sstream>
+
+template <typename T> std::string my_to_string(const T& n) {
+ std::ostringstream stm;
+ stm << n;
+ return stm.str();
+}
+
using namespace triagens::aql;
using Json = triagens::basics::Json;
using CollectionNameResolver = triagens::arango::CollectionNameResolver;
@@ -216,10 +225,10 @@
case TRI_JSON_STRING_REFERENCE: {
try {
std::string const str(json->_value._string.data, json->_value._string.length - 1);
- 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;
@@ -1728,7 +1737,7 @@
id.push_back('/');
id.append(key);
json(TRI_VOC_ATTRIBUTE_ID, Json(id));
- json(TRI_VOC_ATTRIBUTE_REV, Json(std::to_string(TRI_EXTRACT_MARKER_RID(marker))));
+ json(TRI_VOC_ATTRIBUTE_REV, Json(my_to_string(TRI_EXTRACT_MARKER_RID(marker))));
json(TRI_VOC_ATTRIBUTE_KEY, Json(key));
if (TRI_IS_EDGE_MARKER(marker)) {
Index: arangod/Aql/ModificationBlock.cpp
--- arangod/Aql/ModificationBlock.cpp.orig 2015-12-21 16:28:37.000000000 +0100
+++ arangod/Aql/ModificationBlock.cpp 2016-01-19 21:46:29.019621900 +0100
@@ -33,6 +33,15 @@
#include "V8/v8-globals.h"
#include "VocBase/vocbase.h"
+#include <string>
+#include <sstream>
+
+template <typename T> std::string my_to_string(const T& n) {
+ std::ostringstream stm;
+ stm << n;
+ return stm.str();
+}
+
using namespace std;
using namespace triagens::arango;
using namespace triagens::aql;
@@ -214,7 +223,7 @@
auto planId = _collection->documentCollection()->_info._planId;
auto vocbase = static_cast<ModificationNode const*>(_exeNode)->_vocbase;
- return triagens::arango::shardKeysChanged(vocbase->_name, std::to_string(planId), oldJson, newJson, isPatch);
+ return triagens::arango::shardKeysChanged(vocbase->_name, my_to_string(planId), oldJson, newJson, isPatch);
}
////////////////////////////////////////////////////////////////////////////////
Index: arangod/Aql/VariableGenerator.cpp
--- arangod/Aql/VariableGenerator.cpp.orig 2015-12-21 16:28:37.000000000 +0100
+++ arangod/Aql/VariableGenerator.cpp 2016-01-19 21:46:29.019621900 +0100
@@ -33,6 +33,15 @@
using namespace triagens::aql;
using Json = triagens::basics::Json;
+#include <string>
+#include <sstream>
+
+template <typename T> std::string my_to_string(const T& n) {
+ std::ostringstream stm;
+ stm << n;
+ return stm.str();
+}
+
// -----------------------------------------------------------------------------
// --SECTION-- constructors / destructors
// -----------------------------------------------------------------------------
@@ -204,7 +213,7 @@
std::string VariableGenerator::nextName () {
// note: if the naming scheme is adjusted, it may be necessary to adjust
// Variable::isUserDefined, too!
- return std::to_string(nextId()); // to_string: c++11
+ return my_to_string(nextId()); // to_string: c++11
}
////////////////////////////////////////////////////////////////////////////////
Index: arangod/Dispatcher/DispatcherThread.cpp
--- arangod/Dispatcher/DispatcherThread.cpp.orig 2015-12-21 16:28:37.000000000 +0100
+++ arangod/Dispatcher/DispatcherThread.cpp 2016-01-19 21:46:29.019621900 +0100
@@ -41,6 +41,15 @@
#include "Dispatcher/RequeueTask.h"
#include "Scheduler/Scheduler.h"
+#include <string>
+#include <sstream>
+
+template <typename T> std::string my_to_string(const T& n) {
+ std::ostringstream stm;
+ stm << n;
+ return stm.str();
+}
+
using namespace std;
using namespace triagens::basics;
using namespace triagens::rest;
@@ -73,7 +82,7 @@
(queue->_id == Dispatcher::STANDARD_QUEUE
? std::string("_std")
: (queue->_id == Dispatcher::AQL_QUEUE
- ? std::string("_aql") : ("_" + to_string(queue->_id))))),
+ ? std::string("_aql") : ("_" + my_to_string(queue->_id))))),
_queue(queue) {
allowAsynchronousCancelation();
Index: arangod/Indexes/Index.cpp
--- arangod/Indexes/Index.cpp.orig 2015-12-21 16:28:37.000000000 +0100
+++ arangod/Indexes/Index.cpp 2016-01-19 21:46:29.019621900 +0100
@@ -34,6 +34,15 @@
#include "VocBase/VocShaper.h"
+#include <string>
+#include <sstream>
+
+template <typename T> std::string my_to_string(const T& n) {
+ std::ostringstream stm;
+ stm << n;
+ return stm.str();
+}
+
using namespace triagens::arango;
// -----------------------------------------------------------------------------
@@ -335,7 +344,7 @@
bool withFigures) const {
triagens::basics::Json json(zone, triagens::basics::Json::Object, 4);
- json("id", triagens::basics::Json(zone, std::to_string(_iid)))
+ json("id", triagens::basics::Json(zone, my_to_string(_iid)))
("type", triagens::basics::Json(zone, typeName()));
if (dumpFields()) {
Index: arangod/Replication/ContinuousSyncer.cpp
--- arangod/Replication/ContinuousSyncer.cpp.orig 2015-12-21 16:28:37.000000000 +0100
+++ arangod/Replication/ContinuousSyncer.cpp 2016-01-20 08:44:36.360407529 +0100
@@ -47,6 +47,15 @@
#include "VocBase/vocbase.h"
#include "VocBase/voc-types.h"
+#include <string>
+#include <sstream>
+
+template <typename T> std::string my_to_string(const T& n) {
+ std::ostringstream stm;
+ stm << n;
+ return stm.str();
+}
+
using namespace std;
using namespace triagens::basics;
using namespace triagens::rest;
@@ -153,7 +162,7 @@
// check if we are aborted externally
if (_applier->wait(_configuration._connectionRetryWaitTime)) {
setProgress("fetching master state information failed. will retry now. retries left: " +
- std::to_string(_configuration._maxConnectRetries - connectRetries));
+ my_to_string(_configuration._maxConnectRetries - connectRetries));
continue;
}
@@ -1312,7 +1321,7 @@
string const progress = "fetched initial master state for from tick " + StringUtils::itoa(fromTick) +
", to tick " + StringUtils::itoa(toTick) +
", got start tick: " + StringUtils::itoa(readTick) + ", open transactions: " +
- std::to_string(_ongoingTransactions.size());
+ my_to_string(_ongoingTransactions.size());
setProgress(progress);
}
@@ -1347,7 +1356,7 @@
// send request
string const progress = "fetching master log from tick " + StringUtils::itoa(fetchTick) +
- ", open transactions: " + std::to_string(_ongoingTransactions.size());
+ ", open transactions: " + my_to_string(_ongoingTransactions.size());
setProgress(progress);
std::string body;
Index: arangod/Replication/InitialSyncer.cpp
--- arangod/Replication/InitialSyncer.cpp.orig 2015-12-21 16:28:37.000000000 +0100
+++ arangod/Replication/InitialSyncer.cpp 2016-01-19 21:46:29.019621900 +0100
@@ -45,6 +45,15 @@
#include "VocBase/vocbase.h"
#include "VocBase/voc-types.h"
+#include <string>
+#include <sstream>
+
+template <typename T> std::string my_to_string(const T& n) {
+ std::ostringstream stm;
+ stm << n;
+ return stm.str();
+}
+
using namespace std;
using namespace triagens::basics;
using namespace triagens::arango;
@@ -828,7 +837,7 @@
sendExtendBatch();
string const baseUrl = BaseUrl + "/keys";
- string url = baseUrl + "?collection=" + cid + "&to=" + std::to_string(maxTick);
+ string url = baseUrl + "?collection=" + cid + "&to=" + my_to_string(maxTick);
std::string progress = "fetching collection keys for collection '" + collectionName + "' from " + url;
setProgress(progress);
@@ -1033,7 +1042,7 @@
markers.emplace_back(df);
}
- string progress = "sorting " + std::to_string(markers.size()) + " local key(s) for collection '" + collectionName + "'";
+ string progress = "sorting " + my_to_string(markers.size()) + " local key(s) for collection '" + collectionName + "'";
setProgress(progress);
// sort all our local keys
@@ -1055,7 +1064,7 @@
TRI_voc_tick_t const chunkSize = 5000;
string const baseUrl = BaseUrl + "/keys";
- string url = baseUrl + "/" + keysId + "?chunkSize=" + std::to_string(chunkSize);
+ string url = baseUrl + "/" + keysId + "?chunkSize=" + my_to_string(chunkSize);
progress = "fetching remote keys chunks for collection '" + collectionName + "' from " + url;
setProgress(progress);
@@ -1143,7 +1152,7 @@
}
size_t const currentChunkId = i;
- progress = "processing keys chunk " + std::to_string(currentChunkId) + " for collection '" + collectionName + "'";
+ progress = "processing keys chunk " + my_to_string(currentChunkId) + " for collection '" + collectionName + "'";
setProgress(progress);
sendExtendBatch();
@@ -1191,7 +1200,7 @@
hash ^= TRI_EXTRACT_MARKER_RID(marker);
}
- if (std::to_string(hash) != std::string(hashJson->_value._string.data, hashJson->_value._string.length - 1)) {
+ if (my_to_string(hash) != std::string(hashJson->_value._string.data, hashJson->_value._string.length - 1)) {
match = false;
}
}
@@ -1203,8 +1212,8 @@
else {
// no match
// must transfer keys for non-matching range
- std::string url = baseUrl + "/" + keysId + "?type=keys&chunk=" + std::to_string(i) + "&chunkSize=" + std::to_string(chunkSize);
- progress = "fetching keys chunk " + std::to_string(currentChunkId) + " for collection '" + collectionName + "' from " + url;
+ std::string url = baseUrl + "/" + keysId + "?type=keys&chunk=" + my_to_string(i) + "&chunkSize=" + my_to_string(chunkSize);
+ progress = "fetching keys chunk " + my_to_string(currentChunkId) + " for collection '" + collectionName + "' from " + url;
setProgress(progress);
std::unique_ptr<SimpleHttpResult> response(_client->retryRequest(HttpRequest::HTTP_REQUEST_PUT,
@@ -1313,7 +1322,7 @@
// key not found locally
toFetch.emplace_back(i);
}
- else if (std::to_string(mptr->_rid) != std::string(ridJson->_value._string.data, ridJson->_value._string.length - 1)) {
+ else if (my_to_string(mptr->_rid) != std::string(ridJson->_value._string.data, ridJson->_value._string.length - 1)) {
// key found, but rid differs
toFetch.emplace_back(i);
++nextStart;
@@ -1354,8 +1363,8 @@
keysJson.add(triagens::basics::Json(static_cast<double>(it)));
}
- std::string url = baseUrl + "/" + keysId + "?type=docs&chunk=" + std::to_string(currentChunkId) + "&chunkSize=" + std::to_string(chunkSize);
- progress = "fetching documents chunk " + std::to_string(currentChunkId) + " for collection '" + collectionName + "' from " + url;
+ std::string url = baseUrl + "/" + keysId + "?type=docs&chunk=" + my_to_string(currentChunkId) + "&chunkSize=" + my_to_string(chunkSize);
+ progress = "fetching documents chunk " + my_to_string(currentChunkId) + " for collection '" + collectionName + "' from " + url;
setProgress(progress);
auto const keyJsonString = triagens::basics::JsonHelper::toString(keysJson.json());
@@ -1730,7 +1739,7 @@
size_t const n = TRI_LengthVector(&indexes->_value._objects);
if (n > 0) {
- string const progress = "creating " + std::to_string(n) + " index(es) for " + collectionMsg;
+ string const progress = "creating " + my_to_string(n) + " index(es) for " + collectionMsg;
setProgress(progress);
READ_LOCKER(_vocbase->_inventoryLock);
@@ -1916,7 +1925,7 @@
bool incremental,
std::string& errorMsg,
sync_phase_e phase) {
- std::string phaseMsg("starting phase " + translatePhase(phase) + " with " + std::to_string(collections.size()) + " collections");
+ std::string phaseMsg("starting phase " + translatePhase(phase) + " with " + my_to_string(collections.size()) + " collections");
setProgress(phaseMsg);
for (auto const& collection : collections) {
Index: arangod/RestHandler/RestImportHandler.cpp
--- arangod/RestHandler/RestImportHandler.cpp.orig 2015-12-21 16:28:37.000000000 +0100
+++ arangod/RestHandler/RestImportHandler.cpp 2016-01-19 21:46:29.019621900 +0100
@@ -37,6 +37,15 @@
#include "VocBase/edge-collection.h"
#include "VocBase/vocbase.h"
+#include <string>
+#include <sstream>
+
+template <typename T> std::string my_to_string(const T& n) {
+ std::ostringstream stm;
+ stm << n;
+ return stm.str();
+}
+
using namespace std;
using namespace triagens::basics;
using namespace triagens::rest;
@@ -1476,7 +1485,7 @@
if (n != m) {
errorMsg = positionise(lineNumber) + "wrong number of JSON values (got "
- + to_string(m) + ", expected " + to_string(n) + ")";
+ + my_to_string(m) + ", expected " + my_to_string(n) + ")";
return nullptr;
}
Index: arangod/RestHandler/RestReplicationHandler.cpp
--- arangod/RestHandler/RestReplicationHandler.cpp.orig 2015-12-21 16:28:37.000000000 +0100
+++ arangod/RestHandler/RestReplicationHandler.cpp 2016-01-19 21:46:29.019621900 +0100
@@ -52,6 +52,15 @@
#include "VocBase/update-policy.h"
#include "Wal/LogfileManager.h"
+#include <string>
+#include <sstream>
+
+template <typename T> std::string my_to_string(const T& n) {
+ std::ostringstream stm;
+ stm << n;
+ return stm.str();
+}
+
using namespace std;
using namespace triagens::basics;
using namespace triagens::rest;
@@ -759,7 +768,7 @@
TRI_Insert3ObjectJson(TRI_UNKNOWN_MEM_ZONE, json, "firstTick", TRI_CreateNullJson(TRI_UNKNOWN_MEM_ZONE));
}
else {
- auto tickString = std::to_string(tick);
+ auto tickString = my_to_string(tick);
TRI_Insert3ObjectJson(TRI_UNKNOWN_MEM_ZONE, json, "firstTick", TRI_CreateStringCopyJson(TRI_UNKNOWN_MEM_ZONE, tickString.c_str(), tickString.size()));
}
@@ -913,7 +922,7 @@
TRI_json_t json;
TRI_InitObjectJson(TRI_UNKNOWN_MEM_ZONE, &json);
- std::string const idString(std::to_string(id));
+ std::string const idString(my_to_string(id));
TRI_Insert3ObjectJson(TRI_UNKNOWN_MEM_ZONE, &json, "id",
TRI_CreateStringCopyJson(TRI_UNKNOWN_MEM_ZONE, idString.c_str(), idString.size()));
@@ -1649,7 +1658,7 @@
TRI_Insert3ObjectJson(TRI_CORE_MEM_ZONE, state, "time", TRI_CreateStringCopyJson(TRI_CORE_MEM_ZONE, s.timeString.c_str(), s.timeString.size()));
TRI_Insert3ObjectJson(TRI_CORE_MEM_ZONE, &json, "state", state);
- std::string const tickString(std::to_string(tick));
+ std::string const tickString(my_to_string(tick));
TRI_Insert3ObjectJson(TRI_CORE_MEM_ZONE, &json, "tick", TRI_CreateStringCopyJson(TRI_CORE_MEM_ZONE, tickString.c_str(), tickString.size()));
generateResult(&json);
@@ -3124,7 +3133,7 @@
// initialize a container with the keys
std::unique_ptr<CollectionKeys> keys(new CollectionKeys(_vocbase, col->_name, id, 300.0));
- std::string const idString(std::to_string(keys->id()));
+ std::string const idString(my_to_string(keys->id()));
keys->create(tickEnd);
size_t const count = keys->count();
@@ -3224,7 +3233,7 @@
triagens::basics::Json chunk(triagens::basics::Json::Object, 3);
chunk.set("low", triagens::basics::Json(std::get<0>(result)));
chunk.set("high", triagens::basics::Json(std::get<1>(result)));
- chunk.set("hash", triagens::basics::Json(std::to_string(std::get<2>(result))));
+ chunk.set("hash", triagens::basics::Json(my_to_string(std::get<2>(result))));
json.add(chunk);
}
Index: arangod/RestServer/ArangoServer.cpp
--- arangod/RestServer/ArangoServer.cpp.orig 2015-12-21 16:28:37.000000000 +0100
+++ arangod/RestServer/ArangoServer.cpp 2016-01-19 21:46:29.019621900 +0100
@@ -94,6 +94,15 @@
#include "VocBase/server.h"
#include "Wal/LogfileManager.h"
+#include <string>
+#include <sstream>
+
+template <typename T> std::string my_to_string(const T& n) {
+ std::ostringstream stm;
+ stm << n;
+ return stm.str();
+}
+
using namespace std;
using namespace triagens::basics;
using namespace triagens::rest;
@@ -118,7 +127,7 @@
std::string sep = "[";
for (auto const& e : v) {
- result += sep + std::to_string(e);
+ result += sep + my_to_string(e);
sep = ",";
}
Index: arangod/Utils/CollectionKeys.cpp
--- arangod/Utils/CollectionKeys.cpp.orig 2015-12-21 16:28:37.000000000 +0100
+++ arangod/Utils/CollectionKeys.cpp 2016-01-19 21:46:29.029592092 +0100
@@ -40,6 +40,15 @@
#include "VocBase/vocbase.h"
#include "Wal/LogfileManager.h"
+#include <string>
+#include <sstream>
+
+template <typename T> std::string my_to_string(const T& n) {
+ std::ostringstream stm;
+ stm << n;
+ return stm.str();
+}
+
using namespace triagens::arango;
// -----------------------------------------------------------------------------
@@ -224,7 +233,7 @@
triagens::basics::Json array(triagens::basics::Json::Array, 2);
array.add(triagens::basics::Json(std::string(TRI_EXTRACT_MARKER_KEY(marker))));
- array.add(triagens::basics::Json(std::to_string(TRI_EXTRACT_MARKER_RID(marker))));
+ array.add(triagens::basics::Json(my_to_string(TRI_EXTRACT_MARKER_RID(marker))));
json.add(array);
}
Index: arangod/Utils/Cursor.cpp
--- arangod/Utils/Cursor.cpp.orig 2015-12-21 16:28:37.000000000 +0100
+++ arangod/Utils/Cursor.cpp 2016-01-19 21:46:29.029592092 +0100
@@ -35,6 +35,15 @@
#include "VocBase/vocbase.h"
#include "VocBase/VocShaper.h"
+#include <string>
+#include <sstream>
+
+template <typename T> std::string my_to_string(const T& n) {
+ std::ostringstream stm;
+ stm << n;
+ return stm.str();
+}
+
using namespace triagens::arango;
// -----------------------------------------------------------------------------
@@ -323,7 +332,7 @@
id.append(key);
json(TRI_VOC_ATTRIBUTE_ID, triagens::basics::Json(id));
- json(TRI_VOC_ATTRIBUTE_REV, triagens::basics::Json(std::to_string(TRI_EXTRACT_MARKER_RID(marker))));
+ json(TRI_VOC_ATTRIBUTE_REV, triagens::basics::Json(my_to_string(TRI_EXTRACT_MARKER_RID(marker))));
json(TRI_VOC_ATTRIBUTE_KEY, triagens::basics::Json(key));
if (TRI_IS_EDGE_MARKER(marker)) {
Index: arangod/VocBase/datafile.cpp
--- arangod/VocBase/datafile.cpp.orig 2015-12-21 16:28:37.000000000 +0100
+++ arangod/VocBase/datafile.cpp 2016-01-20 08:44:16.651641611 +0100
@@ -40,6 +40,15 @@
#include "Basics/tri-strings.h"
#include "VocBase/server.h"
+#include <string>
+#include <sstream>
+
+template <typename T> std::string my_to_string(const T& n) {
+ std::ostringstream stm;
+ stm << n;
+ return stm.str();
+}
+
// #define DEBUG_DATAFILE 1
// -----------------------------------------------------------------------------
@@ -646,13 +655,13 @@
char* p = ((char*) marker) + sizeof(TRI_df_shape_marker_t);
TRI_shape_t* l = (TRI_shape_t*) p;
std::string tmp("shape #");
- tmp.append(std::to_string(l->_sid));
+ tmp.append(my_to_string(l->_sid));
entry._key = TRI_DuplicateString2Z(TRI_UNKNOWN_MEM_ZONE, tmp.c_str(), tmp.size());
}
else if (marker->_type == TRI_DF_MARKER_ATTRIBUTE) {
TRI_shape_aid_t aid = reinterpret_cast<TRI_df_attribute_marker_t const*>(marker)->_aid;
std::string tmp("attribute #");
- tmp.append(std::to_string(aid));
+ tmp.append(my_to_string(aid));
entry._key = TRI_DuplicateString2Z(TRI_UNKNOWN_MEM_ZONE, tmp.c_str(), tmp.size());
}
Index: arangosh/V8Client/ImportHelper.cpp
--- arangosh/V8Client/ImportHelper.cpp.orig 2015-12-21 16:28:37.000000000 +0100
+++ arangosh/V8Client/ImportHelper.cpp 2016-01-19 21:46:29.029592092 +0100
@@ -535,7 +535,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 2015-12-21 16:28:37.000000000 +0100
+++ lib/Basics/JsonHelper.cpp 2016-01-19 21:46:29.029592092 +0100
@@ -130,7 +130,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/files.cpp
--- lib/Basics/files.cpp.orig 2015-12-21 16:28:37.000000000 +0100
+++ lib/Basics/files.cpp 2016-01-19 21:46:29.029592092 +0100
@@ -54,6 +54,15 @@
#include <tchar.h>
#endif
+#include <string>
+#include <sstream>
+
+template <typename T> std::string my_to_string(const T& n) {
+ std::ostringstream stm;
+ stm << n;
+ return stm.str();
+}
+
using namespace std;
// -----------------------------------------------------------------------------
@@ -490,7 +499,7 @@
#endif
if (res != 0) {
- err = "error setting desired mode " + std::to_string(mode) + " for file " + path + ": " + strerror(errno);
+ err = "error setting desired mode " + my_to_string(mode) + " for file " + path + ": " + strerror(errno);
return errno;
}
Index: lib/Basics/json.cpp
--- lib/Basics/json.cpp.orig 2015-12-21 16:28:37.000000000 +0100
+++ lib/Basics/json.cpp 2016-01-19 21:46:29.029592092 +0100
@@ -1128,7 +1128,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 (...) {
@@ -1171,7 +1171,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 2015-12-21 16:28:37.000000000 +0100
+++ lib/Basics/operating-system.h 2016-01-19 21:46:29.029592092 +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/Basics/tri-zip.cpp
--- lib/Basics/tri-zip.cpp.orig 2015-12-21 16:28:37.000000000 +0100
+++ lib/Basics/tri-zip.cpp 2016-01-19 21:46:29.029592092 +0100
@@ -39,6 +39,15 @@
#include "Zip/iowin32.h"
#endif
+#include <string>
+#include <sstream>
+
+template <typename T> std::string my_to_string(const T& n) {
+ std::ostringstream stm;
+ stm << n;
+ return stm.str();
+}
+
// -----------------------------------------------------------------------------
// --SECTION-- private functions
// -----------------------------------------------------------------------------
@@ -67,7 +76,7 @@
filenameInZip[0] = '\0';
err = unzGetCurrentFileInfo64(uf, &fileInfo, filenameInZip, sizeof(filenameInZip), NULL, 0, NULL, 0);
if(err != UNZ_OK) {
- errorMessage = std::string("Failed to get file info for ") + filenameInZip + ": " + std::to_string(err);
+ errorMessage = std::string("Failed to get file info for ") + filenameInZip + ": " + my_to_string(err);
return TRI_ERROR_INTERNAL;
}
@@ -124,7 +133,7 @@
err = unzOpenCurrentFilePassword(uf, password);
if (err != UNZ_OK) {
- errorMessage = "failed to authenticate the password in the zip: " + std::to_string(err);
+ errorMessage = "failed to authenticate the password in the zip: " + my_to_string(err);
return TRI_ERROR_INTERNAL;
}
@@ -237,7 +246,7 @@
err = unzGetGlobalInfo64(uf, &gi);
if(err!= UNZ_OK) {
- errorMessage = "Failed to get info: " + std::to_string(err);
+ errorMessage = "Failed to get info: " + my_to_string(err);
return TRI_ERROR_INTERNAL;
}
@@ -254,7 +263,7 @@
break;
}
else if (err != UNZ_OK) {
- errorMessage = "Failed to jump to next file: " + std::to_string(err);
+ errorMessage = "Failed to jump to next file: " + my_to_string(err);
res = TRI_ERROR_INTERNAL;
break;
}
Index: lib/JsonParser/json-parser.cpp
--- lib/JsonParser/json-parser.cpp.orig 2015-12-21 16:28:37.000000000 +0100
+++ lib/JsonParser/json-parser.cpp 2016-01-19 21:46:29.029592092 +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 2015-12-21 16:28:37.000000000 +0100
+++ lib/JsonParser/json-parser.ll 2016-01-19 21:46:29.029592092 +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 2015-12-21 16:28:37.000000000 +0100
+++ lib/ProgramOptions/program-options.cpp 2016-01-19 21:46:29.029592092 +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 2015-12-21 16:28:37.000000000 +0100
+++ lib/Rest/InitializeRest.cpp 2016-01-19 21:46:29.029592092 +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/ClientConnection.cpp
--- lib/SimpleHttpClient/ClientConnection.cpp.orig 2015-12-21 16:28:37.000000000 +0100
+++ lib/SimpleHttpClient/ClientConnection.cpp 2016-01-19 21:46:29.029592092 +0100
@@ -62,6 +62,15 @@
#include <poll.h>
#endif
+#include <string>
+#include <sstream>
+
+template <typename T> std::string my_to_string(const T& n) {
+ std::ostringstream stm;
+ stm << n;
+ return stm.str();
+}
+
using namespace triagens::basics;
using namespace triagens::httpclient;
using namespace triagens::rest;
@@ -281,7 +290,7 @@
#endif
char const* pErr = STR_ERROR();
- _errorDetails = std::string("during prepare: ") + std::to_string(errno) + std::string(" - ") + pErr;
+ _errorDetails = std::string("during prepare: ") + my_to_string(errno) + std::string(" - ") + pErr;
TRI_set_errno(errno);
}
Index: lib/SimpleHttpClient/SimpleHttpClient.cpp
--- lib/SimpleHttpClient/SimpleHttpClient.cpp.orig 2015-12-21 16:28:37.000000000 +0100
+++ lib/SimpleHttpClient/SimpleHttpClient.cpp 2016-01-19 21:46:29.029592092 +0100
@@ -798,7 +798,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);
Index: lib/SimpleHttpClient/SslClientConnection.cpp
--- lib/SimpleHttpClient/SslClientConnection.cpp.orig 2015-12-21 16:28:37.000000000 +0100
+++ lib/SimpleHttpClient/SslClientConnection.cpp 2016-01-19 21:46:29.029592092 +0100
@@ -68,6 +68,15 @@
#include <sys/poll.h>
#endif
+#include <string>
+#include <sstream>
+
+template <typename T> std::string my_to_string(const T& n) {
+ std::ostringstream stm;
+ stm << n;
+ return stm.str();
+}
+
using namespace triagens::basics;
using namespace triagens::httpclient;
using namespace triagens::rest;
@@ -204,7 +213,7 @@
}
else if (errorDetail == SSL_ERROR_SYSCALL) {
char const* pErr = STR_ERROR();
- _errorDetails = std::string("SSL: during SSL_connect: ") + std::to_string(errno) + std::string(" - ") + pErr;
+ _errorDetails = std::string("SSL: during SSL_connect: ") + my_to_string(errno) + std::string(" - ") + pErr;
}
else {
errorDetail = ERR_get_error(); /* Gets the earliest error code from the
@@ -378,7 +387,7 @@
#endif
char const* pErr = STR_ERROR();
- _errorDetails = std::string("during prepare: ") + std::to_string(errno) + std::string(" - ") + pErr;
+ _errorDetails = std::string("during prepare: ") + my_to_string(errno) + std::string(" - ") + pErr;
TRI_set_errno(errno);
}
@@ -423,7 +432,7 @@
case SSL_ERROR_SYSCALL: {
char const* pErr = STR_ERROR();
_errorDetails = std::string("SSL: while writing: SYSCALL returned errno = ") +
- std::to_string(errno) + std::string(" - ") + pErr;
+ my_to_string(errno) + std::string(" - ") + pErr;
break;
}
@@ -439,7 +448,7 @@
default:
/* a true error */
- _errorDetails = std::string("SSL: while writing: error ") + std::to_string(err);
+ _errorDetails = std::string("SSL: while writing: error ") + my_to_string(err);
}
return false;
@@ -501,7 +510,7 @@
int errorDetail = ERR_get_error();
char errorBuffer[256];
ERR_error_string_n(errorDetail, errorBuffer, sizeof(errorBuffer));
- _errorDetails = std::string("SSL: while reading: error '") + std::to_string(errno) +
+ _errorDetails = std::string("SSL: while reading: error '") + my_to_string(errno) +
std::string("' - ") + errorBuffer + std::string("' - ") + pErr;
/* unexpected */
Index: lib/V8/v8-utils.cpp
--- lib/V8/v8-utils.cpp.orig 2015-12-21 16:28:37.000000000 +0100
+++ lib/V8/v8-utils.cpp 2016-01-19 21:46:29.029592092 +0100
@@ -64,6 +64,15 @@
#include "3rdParty/valgrind/valgrind.h"
+#include <string>
+#include <sstream>
+
+template <typename T> std::string my_to_string(const T& n) {
+ std::ostringstream stm;
+ stm << n;
+ return stm.str();
+}
+
using namespace std;
using namespace triagens::arango;
using namespace triagens::basics;
@@ -2154,7 +2163,7 @@
"] to [" +
destination +
" ] : " +
- std::to_string(errorNo) +
+ my_to_string(errorNo) +
": " +
systemErrorStr;
TRI_V8_THROW_EXCEPTION_MESSAGE(res, errMsg);
@@ -2212,7 +2221,7 @@
11 years ago
"] to [" +
destination +
" ] : " +
- std::to_string(errorNo) +
+ my_to_string(errorNo) +
" - Unable to create target directory: " +
systemErrorStr;
TRI_V8_THROW_EXCEPTION_MESSAGE(res, errMsg);
@@ -2224,7 +2233,7 @@
11 years ago
"] to [" +
destination +
" ] : " +
- std::to_string(errorNo) +
+ my_to_string(errorNo) +
": " +
systemErrorStr;
TRI_V8_THROW_EXCEPTION_MESSAGE(TRI_ERROR_BAD_PARAMETER, errMsg);