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.
1144 lines
44 KiB
1144 lines
44 KiB
Index: 3rdParty/V8-4.3.61/build/all.gyp |
|
--- 3rdParty/V8-4.3.61/build/all.gyp.orig 2015-10-09 15:17:08.000000000 +0200 |
|
+++ 3rdParty/V8-4.3.61/build/all.gyp 2015-10-31 13:14:15.048903550 +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-10-09 15:17:08.000000000 +0200 |
|
+++ 3rdParty/V8-4.3.61/src/base/platform/platform-freebsd.cc 2015-10-31 13:14:15.048903550 +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-10-09 15:17:08.000000000 +0200 |
|
+++ 3rdParty/V8-4.3.61/src/base/platform/platform-posix.cc 2015-10-31 13:14:15.048903550 +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-10-09 15:17:08.000000000 +0200 |
|
+++ 3rdParty/V8-4.3.61/tools/gyp/v8.gyp 2015-10-31 13:14:15.048903550 +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-10-09 15:17:08.000000000 +0200 |
|
+++ Installation/file-list-js.sh 2015-10-31 13:14:15.058874999 +0100 |
|
@@ -1,4 +1,4 @@ |
|
-#!/bin/bash |
|
+#!/usr/bin/env bash |
|
set -e |
|
|
|
SRCDIR=$1 |
|
Index: Makefile.in |
|
--- Makefile.in.orig 2015-10-09 15:17:08.000000000 +0200 |
|
+++ Makefile.in 2015-10-31 13:14:15.058874999 +0100 |
|
@@ -944,7 +944,7 @@ |
|
@OPENSSL_LIBS@ \ |
|
@ICU_LIBS@ \ |
|
@ZLIB_LIBS@ \ |
|
- @READLINE_LIBS@ |
|
+ @READLINE_LIBS@ @LIBS@ |
|
|
|
LN_S = @LN_S@ |
|
LTLIBOBJS = @LTLIBOBJS@ |
|
@@ -10558,7 +10558,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)" \ |
|
@@ -10571,7 +10571,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)" \ |
|
@@ -10587,7 +10587,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)" \ |
|
@@ -10600,7 +10600,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)" \ |
|
@@ -10616,7 +10616,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)" \ |
|
@@ -10633,7 +10633,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)" \ |
|
@@ -10649,7 +10649,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)" \ |
|
@@ -10661,7 +10661,7 @@ |
|
@ENABLE_ARMV6_FALSE@@ENABLE_ARMV7_FALSE@@ENABLE_DARWIN_FALSE@@ENABLE_V8_DEBUG_TRUE@ CXXFLAGS="-O0 -ggdb $(DEBUG_V8_FLAGS) $(GOLD_V8_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-10-09 15:17:08.000000000 +0200 |
|
+++ arangod/Aql/AqlValue.cpp 2015-10-31 13:14:15.058874999 +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-10-09 15:17:08.000000000 +0200 |
|
+++ arangod/Aql/AstNode.cpp 2015-10-31 13:14:15.058874999 +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-10-09 15:17:08.000000000 +0200 |
|
+++ arangod/Aql/ClusterBlocks.cpp 2015-10-31 14:20:40.578875306 +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; |
|
@@ -1276,7 +1285,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); |
|
} |
|
|
|
// ----------------------------------------------------------------------------- |
|
@@ -1517,7 +1526,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-10-09 15:17:08.000000000 +0200 |
|
+++ arangod/Aql/Collection.cpp 2015-10-31 13:14:15.058874999 +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-10-09 15:17:08.000000000 +0200 |
|
+++ arangod/Aql/ExecutionNode.cpp 2015-10-31 13:14:15.058874999 +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-10-09 15:17:08.000000000 +0200 |
|
+++ arangod/Aql/ExecutionPlan.cpp 2015-10-31 13:14:15.058874999 +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-10-09 15:17:08.000000000 +0200 |
|
+++ arangod/Aql/Executor.cpp 2015-10-31 13:14:15.068884721 +0100 |
|
@@ -39,6 +39,15 @@ |
|
#include "V8/v8-globals.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; |
|
|
|
// ----------------------------------------------------------------------------- |
|
@@ -332,7 +341,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-10-09 15:17:08.000000000 +0200 |
|
+++ arangod/Aql/Expression.cpp 2015-10-31 13:14:15.068884721 +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-10-09 15:17:08.000000000 +0200 |
|
+++ arangod/Aql/Functions.cpp 2015-10-31 14:30:48.198950623 +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; |
|
@@ -1696,7 +1705,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-10-09 15:17:08.000000000 +0200 |
|
+++ arangod/Aql/ModificationBlock.cpp 2015-10-31 14:32:16.178926220 +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-10-09 15:17:08.000000000 +0200 |
|
+++ arangod/Aql/VariableGenerator.cpp 2015-10-31 13:14:15.068884721 +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-10-09 15:17:08.000000000 +0200 |
|
+++ arangod/Dispatcher/DispatcherThread.cpp 2015-10-31 14:40:10.143657422 +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-10-09 15:17:08.000000000 +0200 |
|
+++ arangod/Indexes/Index.cpp 2015-10-31 13:14:15.068884721 +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/InitialSyncer.cpp |
|
--- arangod/Replication/InitialSyncer.cpp.orig 2015-10-09 15:17:08.000000000 +0200 |
|
+++ arangod/Replication/InitialSyncer.cpp 2015-10-31 14:48:57.718993533 +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; |
|
@@ -713,7 +722,7 @@ |
|
string& errorMsg) { |
|
|
|
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 from " + url; |
|
setProgress(progress); |
|
@@ -858,7 +867,7 @@ |
|
markers.emplace_back(df); |
|
} |
|
|
|
- string progress = "sorting " + std::to_string(markers.size()) + " local key(s)"; |
|
+ string progress = "sorting " + my_to_string(markers.size()) + " local key(s)"; |
|
setProgress(progress); |
|
|
|
// sort all our local keys |
|
@@ -874,7 +883,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 from " + url; |
|
setProgress(progress); |
|
|
|
@@ -1002,7 +1011,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; |
|
} |
|
} |
|
@@ -1014,7 +1023,7 @@ |
|
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); |
|
+ std::string url = baseUrl + "/" + keysId + "?type=keys&chunk=" + my_to_string(i) + "&chunkSize=" + my_to_string(chunkSize); |
|
progress = "fetching keys from " + url; |
|
setProgress(progress); |
|
|
|
@@ -1124,7 +1133,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; |
|
@@ -1165,7 +1174,7 @@ |
|
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); |
|
+ std::string url = baseUrl + "/" + keysId + "?type=docs&chunk=" + my_to_string(currentChunkId) + "&chunkSize=" + my_to_string(chunkSize); |
|
progress = "fetching documents from " + url; |
|
setProgress(progress); |
|
|
|
@@ -1731,7 +1740,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-10-09 15:17:08.000000000 +0200 |
|
+++ arangod/RestHandler/RestImportHandler.cpp 2015-10-31 14:51:39.608938135 +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-10-09 15:17:08.000000000 +0200 |
|
+++ arangod/RestHandler/RestReplicationHandler.cpp 2015-10-31 14:52:44.169001006 +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-10-09 15:17:08.000000000 +0200 |
|
+++ arangod/RestServer/ArangoServer.cpp 2015-10-31 13:14:15.068884721 +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-10-09 15:17:08.000000000 +0200 |
|
+++ arangod/Utils/CollectionKeys.cpp 2015-10-31 14:55:05.930173516 +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-10-09 15:17:08.000000000 +0200 |
|
+++ arangod/Utils/Cursor.cpp 2015-10-31 13:14:15.068884721 +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: arangosh/V8Client/ImportHelper.cpp |
|
--- arangosh/V8Client/ImportHelper.cpp.orig 2015-10-09 15:17:08.000000000 +0200 |
|
+++ arangosh/V8Client/ImportHelper.cpp 2015-10-31 13:14:15.068884721 +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-10-09 15:17:08.000000000 +0200 |
|
+++ lib/Basics/JsonHelper.cpp 2015-10-31 13:14:15.068884721 +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-10-09 15:17:08.000000000 +0200 |
|
+++ lib/Basics/files.cpp 2015-10-31 13:14:15.068884721 +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-10-09 15:17:08.000000000 +0200 |
|
+++ lib/Basics/json.cpp 2015-10-31 13:14:15.068884721 +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-10-09 15:17:08.000000000 +0200 |
|
+++ lib/Basics/operating-system.h 2015-10-31 13:14:15.068884721 +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-10-09 15:17:08.000000000 +0200 |
|
+++ lib/Basics/tri-zip.cpp 2015-10-31 13:14:15.068884721 +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-10-09 15:17:08.000000000 +0200 |
|
+++ lib/JsonParser/json-parser.cpp 2015-10-31 13:14:15.068884721 +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-10-09 15:17:08.000000000 +0200 |
|
+++ lib/JsonParser/json-parser.ll 2015-10-31 13:14:15.068884721 +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-10-09 15:17:08.000000000 +0200 |
|
+++ lib/ProgramOptions/program-options.cpp 2015-10-31 13:14:15.068884721 +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(option, item->_desc->_name), item->_desc->_name); |
|
+ distances.insert(std::make_pair(TRI_Levenshtein(option, item->_desc->_name), item->_desc->_name)); |
|
} |
|
|
|
if (! distances.empty()) { |
|
Index: lib/Rest/InitializeRest.cpp |
|
--- lib/Rest/InitializeRest.cpp.orig 2015-10-09 15:17:08.000000000 +0200 |
|
+++ lib/Rest/InitializeRest.cpp 2015-10-31 13:14:15.068884721 +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-10-09 15:17:08.000000000 +0200 |
|
+++ lib/SimpleHttpClient/ClientConnection.cpp 2015-10-31 13:14:15.068884721 +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-10-09 15:17:08.000000000 +0200 |
|
+++ lib/SimpleHttpClient/SimpleHttpClient.cpp 2015-10-31 13:14:15.079814462 +0100 |
|
@@ -734,7 +734,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-10-09 15:17:08.000000000 +0200 |
|
+++ lib/SimpleHttpClient/SslClientConnection.cpp 2015-10-31 13:14:15.079814462 +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-10-09 15:17:08.000000000 +0200 |
|
+++ lib/V8/v8-utils.cpp 2015-10-31 13:14:15.079814462 +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 @@ |
|
"] 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 @@ |
|
"] to [" + |
|
destination + |
|
" ] : " + |
|
- std::to_string(errorNo) + |
|
+ my_to_string(errorNo) + |
|
": " + |
|
systemErrorStr; |
|
TRI_V8_THROW_EXCEPTION_MESSAGE(TRI_ERROR_BAD_PARAMETER, errMsg);
|
|
|