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.
1394 lines
53 KiB
1394 lines
53 KiB
Index: 3rdParty/V8-4.3.61/build/all.gyp |
|
--- 3rdParty/V8-4.3.61/build/all.gyp.orig 2016-01-29 20:24:26.000000000 +0100 |
|
+++ 3rdParty/V8-4.3.61/build/all.gyp 2016-02-05 20:40:46.003590130 +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-01-29 20:24:26.000000000 +0100 |
|
+++ 3rdParty/V8-4.3.61/src/base/platform/platform-freebsd.cc 2016-02-05 20:40:46.003590130 +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-01-29 20:24:26.000000000 +0100 |
|
+++ 3rdParty/V8-4.3.61/src/base/platform/platform-posix.cc 2016-02-05 20:40:46.003590130 +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-01-29 20:24:26.000000000 +0100 |
|
+++ 3rdParty/V8-4.3.61/tools/gyp/v8.gyp 2016-02-05 20:40:46.003590130 +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-01-29 20:24:26.000000000 +0100 |
|
+++ Installation/file-list-js.sh 2016-02-05 20:40:46.003590130 +0100 |
|
@@ -1,4 +1,4 @@ |
|
-#!/bin/bash |
|
+#!/usr/bin/env bash |
|
set -e |
|
|
|
SRCDIR=$1 |
|
Index: Makefile.in |
|
--- Makefile.in.orig 2016-01-29 20:24:26.000000000 +0100 |
|
+++ Makefile.in 2016-02-05 20:40:46.003590130 +0100 |
|
@@ -1000,7 +1000,8 @@ |
|
@MATH_LIBS@ \ |
|
@OPENSSL_LIBS@ \ |
|
@ICU_LIBS@ \ |
|
- @ZLIB_LIBS@ |
|
+ @ZLIB_LIBS@ \ |
|
+ @LIBS@ |
|
|
|
LN_S = @LN_S@ |
|
LTLIBOBJS = @LTLIBOBJS@ |
|
@@ -11374,7 +11375,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)" \ |
|
@@ -11387,7 +11388,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)" \ |
|
@@ -11403,7 +11404,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)" \ |
|
@@ -11416,7 +11417,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)" \ |
|
@@ -11432,7 +11433,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)" \ |
|
@@ -11449,7 +11450,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)" \ |
|
@@ -11465,7 +11466,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)" \ |
|
@@ -11477,7 +11478,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 2016-01-29 20:24:26.000000000 +0100 |
|
+++ arangod/Aql/AqlValue.cpp 2016-02-05 20:40:46.013543001 +0100 |
|
@@ -38,6 +38,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 |
|
//////////////////////////////////////////////////////////////////////////////// |
|
@@ -753,7 +762,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 2016-01-29 20:24:26.000000000 +0100 |
|
+++ arangod/Aql/AstNode.cpp 2016-02-05 20:40:46.013543001 +0100 |
|
@@ -1317,7 +1317,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 2016-01-29 20:24:26.000000000 +0100 |
|
+++ arangod/Aql/ClusterBlocks.cpp 2016-02-05 20:40:46.013543001 +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; |
|
@@ -1244,7 +1253,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); |
|
} |
|
|
|
// ----------------------------------------------------------------------------- |
|
@@ -1497,7 +1506,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 2016-01-29 20:24:26.000000000 +0100 |
|
+++ arangod/Aql/Collection.cpp 2016-02-05 20:40:46.013543001 +0100 |
|
@@ -43,6 +43,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; |
|
|
|
// ----------------------------------------------------------------------------- |
|
@@ -154,7 +163,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/Condition.cpp |
|
--- arangod/Aql/Condition.cpp.orig 2016-01-29 20:24:26.000000000 +0100 |
|
+++ arangod/Aql/Condition.cpp 2016-02-05 21:43:17.993903005 +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/ExecutionPlan.cpp |
|
--- arangod/Aql/ExecutionPlan.cpp.orig 2016-01-29 20:24:26.000000000 +0100 |
|
+++ arangod/Aql/ExecutionPlan.cpp 2016-02-05 20:40:46.013543001 +0100 |
|
@@ -50,6 +50,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 |
|
// ----------------------------------------------------------------------------- |
|
@@ -278,7 +287,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 2016-01-29 20:24:26.000000000 +0100 |
|
+++ arangod/Aql/Executor.cpp 2016-02-05 20:40:46.013543001 +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; |
|
|
|
// ----------------------------------------------------------------------------- |
|
@@ -535,7 +544,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 2016-01-29 20:24:26.000000000 +0100 |
|
+++ arangod/Aql/Expression.cpp 2016-02-05 21:54:38.813535179 +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 |
|
// ----------------------------------------------------------------------------- |
|
@@ -652,7 +661,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())); |
|
@@ -672,7 +681,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 2016-01-29 20:24:26.000000000 +0100 |
|
+++ arangod/Aql/Functions.cpp 2016-02-05 20:40:46.013543001 +0100 |
|
@@ -48,6 +48,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; |
|
@@ -247,10 +256,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; |
|
@@ -522,7 +531,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/ModificationBlocks.cpp |
|
--- arangod/Aql/ModificationBlocks.cpp.orig 2016-01-29 20:24:26.000000000 +0100 |
|
+++ arangod/Aql/ModificationBlocks.cpp 2016-02-05 21:59:03.184607899 +0100 |
|
@@ -34,6 +34,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; |
|
@@ -215,7 +224,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/SortNode.cpp |
|
--- arangod/Aql/SortNode.cpp.orig 2016-01-29 20:24:26.000000000 +0100 |
|
+++ arangod/Aql/SortNode.cpp 2016-02-05 22:03:32.263627230 +0100 |
|
@@ -31,6 +31,15 @@ |
|
#include "Aql/WalkerWorker.h" |
|
#include "Basics/StringBuffer.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::aql; |
|
@@ -190,7 +199,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/TraversalNode.cpp |
|
--- arangod/Aql/TraversalNode.cpp.orig 2016-01-29 20:24:26.000000000 +0100 |
|
+++ arangod/Aql/TraversalNode.cpp 2016-02-05 22:08:17.855545965 +0100 |
|
@@ -29,6 +29,15 @@ |
|
#include "Aql/Ast.h" |
|
#include "Aql/Index.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::aql; |
|
@@ -372,7 +381,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); |
|
|
|
@@ -478,7 +487,7 @@ |
|
} |
|
expressionArray(exp); |
|
} |
|
- expressionObject.set(std::to_string(map.first), expressionArray); |
|
+ expressionObject.set(my_to_string(map.first), expressionArray); |
|
} |
|
json("simpleExpressions", expressionObject); |
|
} |
|
Index: arangod/Aql/VariableGenerator.cpp |
|
--- arangod/Aql/VariableGenerator.cpp.orig 2016-01-29 20:24:26.000000000 +0100 |
|
+++ arangod/Aql/VariableGenerator.cpp 2016-02-05 20:40:46.013543001 +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 2016-01-29 20:24:26.000000000 +0100 |
|
+++ arangod/Dispatcher/DispatcherThread.cpp 2016-02-05 20:40:46.013543001 +0100 |
|
@@ -39,6 +39,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; |
|
@@ -71,7 +80,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 2016-01-29 20:24:26.000000000 +0100 |
|
+++ arangod/Indexes/Index.cpp 2016-02-05 22:13:11.623665307 +0100 |
|
@@ -41,6 +41,17 @@ |
|
#include "VocBase/VocShaper.h" |
|
#include <iostream> |
|
|
|
+#include <cmath> |
|
+ |
|
+#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; |
|
|
|
// ----------------------------------------------------------------------------- |
|
@@ -401,7 +412,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()) { |
|
@@ -515,7 +526,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-01-29 20:24:26.000000000 +0100 |
|
+++ arangod/Indexes/SkiplistIndex.cpp 2016-02-05 22:14:40.043789303 +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: arangod/Replication/ContinuousSyncer.cpp |
|
--- arangod/Replication/ContinuousSyncer.cpp.orig 2016-01-29 20:24:26.000000000 +0100 |
|
+++ arangod/Replication/ContinuousSyncer.cpp 2016-02-05 20:40:46.013543001 +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; |
|
} |
|
|
|
@@ -1317,7 +1326,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); |
|
} |
|
@@ -1352,7 +1361,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 2016-01-29 20:24:26.000000000 +0100 |
|
+++ arangod/Replication/InitialSyncer.cpp 2016-02-05 20:40:46.013543001 +0100 |
|
@@ -46,6 +46,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; |
|
@@ -829,7 +838,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); |
|
@@ -1034,7 +1043,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 |
|
@@ -1056,7 +1065,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); |
|
|
|
@@ -1144,7 +1153,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(); |
|
@@ -1192,7 +1201,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; |
|
} |
|
} |
|
@@ -1204,8 +1213,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, |
|
@@ -1314,7 +1323,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; |
|
@@ -1355,8 +1364,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()); |
|
@@ -1731,7 +1740,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); |
|
@@ -1917,7 +1926,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 2016-01-29 20:24:26.000000000 +0100 |
|
+++ arangod/RestHandler/RestImportHandler.cpp 2016-02-05 20:40:46.013543001 +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; |
|
@@ -1504,7 +1513,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 2016-01-29 20:24:26.000000000 +0100 |
|
+++ arangod/RestHandler/RestReplicationHandler.cpp 2016-02-05 20:40:46.013543001 +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); |
|
@@ -3189,7 +3198,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(); |
|
@@ -3289,7 +3298,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 2016-01-29 20:24:26.000000000 +0100 |
|
+++ arangod/RestServer/ArangoServer.cpp 2016-02-05 20:40:46.023628641 +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 2016-01-29 20:24:26.000000000 +0100 |
|
+++ arangod/Utils/CollectionKeys.cpp 2016-02-05 20:40:46.023628641 +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 2016-01-29 20:24:26.000000000 +0100 |
|
+++ arangod/Utils/Cursor.cpp 2016-02-05 20:40:46.023628641 +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/Utils/ShapedJsonTransformer.cpp |
|
--- arangod/Utils/ShapedJsonTransformer.cpp.orig 2016-01-29 20:24:26.000000000 +0100 |
|
+++ arangod/Utils/ShapedJsonTransformer.cpp 2016-02-05 22:20:44.315028455 +0100 |
|
@@ -31,6 +31,15 @@ |
|
#include "VocBase/document-collection.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 Json = triagens::basics::Json; |
|
using CollectionNameResolver = triagens::arango::CollectionNameResolver; |
|
|
|
@@ -55,7 +64,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/VocBase/DocumentAccessor.cpp |
|
--- arangod/VocBase/DocumentAccessor.cpp.orig 2016-01-29 20:24:26.000000000 +0100 |
|
+++ arangod/VocBase/DocumentAccessor.cpp 2016-02-05 22:25:37.799993025 +0100 |
|
@@ -33,6 +33,15 @@ |
|
#include "Utils/CollectionNameResolver.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(); |
|
+} |
|
+ |
|
// ----------------------------------------------------------------------------- |
|
// --SECTION-- DocumentAccessor |
|
// ----------------------------------------------------------------------------- |
|
@@ -194,7 +203,7 @@ |
|
id.push_back('/'); |
|
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(_mptr)))); |
|
+ json(TRI_VOC_ATTRIBUTE_REV, triagens::basics::Json(my_to_string(TRI_EXTRACT_MARKER_RID(_mptr)))); |
|
json(TRI_VOC_ATTRIBUTE_KEY, triagens::basics::Json(key)); |
|
|
|
if (TRI_IS_EDGE_MARKER(_mptr)) { |
|
Index: arangod/VocBase/datafile.cpp |
|
--- arangod/VocBase/datafile.cpp.orig 2016-01-29 20:24:26.000000000 +0100 |
|
+++ arangod/VocBase/datafile.cpp 2016-02-05 20:40:46.023628641 +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 |
|
|
|
using namespace std; |
|
@@ -643,13 +652,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 2016-01-29 20:24:26.000000000 +0100 |
|
+++ arangosh/V8Client/ImportHelper.cpp 2016-02-05 20:40:46.023628641 +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-01-29 20:24:26.000000000 +0100 |
|
+++ lib/Basics/JsonHelper.cpp 2016-02-05 20:40:46.023628641 +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/files.cpp |
|
--- lib/Basics/files.cpp.orig 2016-01-29 20:24:26.000000000 +0100 |
|
+++ lib/Basics/files.cpp 2016-02-05 20:40:46.023628641 +0100 |
|
@@ -56,6 +56,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 triagens::basics; |
|
|
|
// ----------------------------------------------------------------------------- |
|
@@ -492,7 +501,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 2016-01-29 20:24:26.000000000 +0100 |
|
+++ lib/Basics/json.cpp 2016-02-05 20:40:46.023628641 +0100 |
|
@@ -1168,7 +1168,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 (...) { |
|
@@ -1213,7 +1213,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-01-29 20:24:26.000000000 +0100 |
|
+++ lib/Basics/operating-system.h 2016-02-05 20:40:46.023628641 +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 2016-01-29 20:24:26.000000000 +0100 |
|
+++ lib/Basics/tri-zip.cpp 2016-02-05 20:40:46.023628641 +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; |
|
} |
|
|
|
@@ -125,7 +134,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; |
|
} |
|
|
|
@@ -240,7 +249,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; |
|
} |
|
|
|
@@ -257,7 +266,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 2016-01-29 20:24:26.000000000 +0100 |
|
+++ lib/JsonParser/json-parser.cpp 2016-02-05 20:40:46.023628641 +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-01-29 20:24:26.000000000 +0100 |
|
+++ lib/JsonParser/json-parser.ll 2016-02-05 20:40:46.023628641 +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-01-29 20:24:26.000000000 +0100 |
|
+++ lib/ProgramOptions/program-options.cpp 2016-02-05 20:40:46.023628641 +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-01-29 20:24:26.000000000 +0100 |
|
+++ lib/Rest/InitializeRest.cpp 2016-02-05 20:40:46.023628641 +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 2016-01-29 20:24:26.000000000 +0100 |
|
+++ lib/SimpleHttpClient/ClientConnection.cpp 2016-02-05 20:40:46.023628641 +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; |
|
@@ -323,7 +332,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 2016-01-29 20:24:26.000000000 +0100 |
|
+++ lib/SimpleHttpClient/SimpleHttpClient.cpp 2016-02-05 20:40:46.023628641 +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); |
|
Index: lib/SimpleHttpClient/SslClientConnection.cpp |
|
--- lib/SimpleHttpClient/SslClientConnection.cpp.orig 2016-01-29 20:24:26.000000000 +0100 |
|
+++ lib/SimpleHttpClient/SslClientConnection.cpp 2016-02-05 20:40:46.023628641 +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 |
|
@@ -379,7 +388,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); |
|
} |
|
@@ -424,7 +433,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; |
|
} |
|
|
|
@@ -440,7 +449,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; |
|
@@ -502,7 +511,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 2016-01-29 20:24:26.000000000 +0100 |
|
+++ lib/V8/v8-utils.cpp 2016-02-05 20:40:46.023628641 +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; |
|
@@ -2125,7 +2134,7 @@ |
|
"] to [" + |
|
destination + |
|
" ] : " + |
|
- std::to_string(errorNo) + |
|
+ my_to_string(errorNo) + |
|
": " + |
|
systemErrorStr; |
|
TRI_V8_THROW_EXCEPTION_MESSAGE(res, errMsg); |
|
@@ -2183,7 +2192,7 @@ |
|
"] to [" + |
|
destination + |
|
" ] : " + |
|
- std::to_string(errorNo) + |
|
+ my_to_string(errorNo) + |
|
" - Unable to create target directory: " + |
|
systemErrorStr; |
|
TRI_V8_THROW_EXCEPTION_MESSAGE(TRI_ERROR_SYS_ERROR, errMsg); |
|
@@ -2195,7 +2204,7 @@ |
|
"] to [" + |
|
destination + |
|
" ] : " + |
|
- std::to_string(errorNo) + |
|
+ my_to_string(errorNo) + |
|
": " + |
|
systemErrorStr; |
|
TRI_V8_THROW_EXCEPTION_MESSAGE(TRI_ERROR_BAD_PARAMETER, errMsg);
|
|
|