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.
615 lines
22 KiB
615 lines
22 KiB
Index: 3rdParty/V8-3.31.74.1/build/all.gyp |
|
--- 3rdParty/V8-3.31.74.1/build/all.gyp.orig 2015-04-30 15:18:21.000000000 +0200 |
|
+++ 3rdParty/V8-3.31.74.1/build/all.gyp 2015-05-12 07:32:03.559538600 +0200 |
|
@@ -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-3.31.74.1/src/base/platform/platform-freebsd.cc |
|
--- 3rdParty/V8-3.31.74.1/src/base/platform/platform-freebsd.cc.orig 2015-04-30 15:18:21.000000000 +0200 |
|
+++ 3rdParty/V8-3.31.74.1/src/base/platform/platform-freebsd.cc 2015-05-12 07:32:03.559538600 +0200 |
|
@@ -8,6 +8,7 @@ |
|
#include <pthread.h> |
|
#include <semaphore.h> |
|
#include <signal.h> |
|
+#include <stdio.h> |
|
#include <stdlib.h> |
|
#include <sys/resource.h> |
|
#include <sys/time.h> |
|
@@ -141,7 +142,7 @@ |
|
if (bytes_read < 8) break; |
|
unsigned end = StringToLong(addr_buffer); |
|
char buffer[MAP_LENGTH]; |
|
- int bytes_read = -1; |
|
+ bytes_read = -1; |
|
do { |
|
bytes_read++; |
|
if (bytes_read >= MAP_LENGTH - 1) |
|
Index: 3rdParty/V8-3.31.74.1/src/base/platform/platform-posix.cc |
|
--- 3rdParty/V8-3.31.74.1/src/base/platform/platform-posix.cc.orig 2015-04-30 15:18:21.000000000 +0200 |
|
+++ 3rdParty/V8-3.31.74.1/src/base/platform/platform-posix.cc 2015-05-12 07:32:03.559538600 +0200 |
|
@@ -26,6 +26,9 @@ |
|
defined(__NetBSD__) || defined(__OpenBSD__) |
|
#include <sys/sysctl.h> // NOLINT, for sysctl |
|
#endif |
|
+#if defined(__FreeBSD__) |
|
+#include <sys/thr.h> |
|
+#endif |
|
|
|
#undef MAP_TYPE |
|
|
|
@@ -36,6 +39,7 @@ |
|
|
|
#include <cmath> |
|
#include <cstdlib> |
|
+#include <cstdio> |
|
|
|
#include "src/base/lazy-instance.h" |
|
#include "src/base/macros.h" |
|
@@ -261,7 +265,7 @@ |
|
#elif V8_OS_ANDROID |
|
return static_cast<int>(gettid()); |
|
#else |
|
- return static_cast<int>(pthread_self()); |
|
+ return static_cast<int>((int)(long)pthread_self()); |
|
#endif |
|
} |
|
|
|
Index: 3rdParty/V8-3.31.74.1/tools/gyp/v8.gyp |
|
--- 3rdParty/V8-3.31.74.1/tools/gyp/v8.gyp.orig 2015-04-30 15:18:24.000000000 +0200 |
|
+++ 3rdParty/V8-3.31.74.1/tools/gyp/v8.gyp 2015-05-12 07:32:03.559538600 +0200 |
|
@@ -341,6 +341,9 @@ |
|
'../..', |
|
], |
|
'sources': [ ### gcmole(all) ### |
|
+ '<(SHARED_INTERMEDIATE_DIR)/libraries.cc', |
|
+ '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc', |
|
+ '../../src/snapshot-empty.cc', |
|
'../../src/accessors.cc', |
|
'../../src/accessors.h', |
|
'../../src/allocation.cc', |
|
Index: Makefile.in |
|
--- Makefile.in.orig 2015-04-30 15:18:24.000000000 +0200 |
|
+++ Makefile.in 2015-05-12 07:32:03.569505440 +0200 |
|
@@ -1006,7 +1006,7 @@ |
|
### @brief libraries |
|
################################################################################ |
|
LIBS = @RT_LIBS@ @LIBEV_LIBS@ @MATH_LIBS@ @OPENSSL_LIBS@ @ICU_LIBS@ \ |
|
- @ZLIB_LIBS@ @READLINE_LIBS@ $(am__append_2) |
|
+ @ZLIB_LIBS@ @READLINE_LIBS@ $(am__append_2) @LIBS@ |
|
LN_S = @LN_S@ |
|
LTLIBOBJS = @LTLIBOBJS@ |
|
MAINT = @MAINT@ |
|
Index: arangod/Aql/AqlValue.cpp |
|
--- arangod/Aql/AqlValue.cpp.orig 2015-04-30 15:18:24.000000000 +0200 |
|
+++ arangod/Aql/AqlValue.cpp 2015-05-12 07:32:03.569505440 +0200 |
|
@@ -36,6 +36,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 |
|
//////////////////////////////////////////////////////////////////////////////// |
|
@@ -633,7 +642,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-04-30 15:18:24.000000000 +0200 |
|
+++ arangod/Aql/AstNode.cpp 2015-05-12 07:32:03.569505440 +0200 |
|
@@ -914,7 +914,7 @@ |
|
case VALUE_TYPE_STRING: |
|
try { |
|
// try converting string to number |
|
- double v = std::stod(value.value._string); |
|
+ double v = std::strtod(value.value._string, NULL); |
|
return ast->createNodeValueDouble(v); |
|
} |
|
catch (...) { |
|
Index: arangod/Aql/ExecutionBlock.cpp |
|
--- arangod/Aql/ExecutionBlock.cpp.orig 2015-04-30 15:18:24.000000000 +0200 |
|
+++ arangod/Aql/ExecutionBlock.cpp 2015-05-12 07:32:03.579600787 +0200 |
|
@@ -49,6 +49,15 @@ |
|
using JsonHelper = triagens::basics::JsonHelper; |
|
using StringBuffer = triagens::basics::StringBuffer; |
|
|
|
+#include <string> |
|
+#include <sstream> |
|
+ |
|
+template <typename T> std::string my_to_string(const T& n) { |
|
+ std::ostringstream stm; |
|
+ stm << n; |
|
+ return stm.str(); |
|
+} |
|
+ |
|
// uncomment the following to get some debugging information |
|
#if 0 |
|
#define ENTER_BLOCK try { (void) 0; |
|
@@ -5727,7 +5736,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); |
|
} |
|
|
|
// ----------------------------------------------------------------------------- |
|
@@ -5960,7 +5969,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/ExecutionNode.cpp |
|
--- arangod/Aql/ExecutionNode.cpp.orig 2015-04-30 15:18:24.000000000 +0200 |
|
+++ arangod/Aql/ExecutionNode.cpp 2015-05-12 07:32:03.579600787 +0200 |
|
@@ -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 |
|
// ----------------------------------------------------------------------------- |
|
@@ -2179,7 +2188,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-04-30 15:18:24.000000000 +0200 |
|
+++ arangod/Aql/ExecutionPlan.cpp 2015-05-12 07:32:03.579600787 +0200 |
|
@@ -44,6 +44,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 |
|
// ----------------------------------------------------------------------------- |
|
@@ -213,7 +222,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/Expression.cpp |
|
--- arangod/Aql/Expression.cpp.orig 2015-04-30 15:18:24.000000000 +0200 |
|
+++ arangod/Aql/Expression.cpp 2015-05-12 07:32:03.579600787 +0200 |
|
@@ -44,6 +44,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 |
|
// ----------------------------------------------------------------------------- |
|
@@ -441,7 +450,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())); |
|
@@ -457,7 +466,7 @@ |
|
AqlValue indexResult = executeSimpleExpression(index, &myCollection2, trx, docColls, argv, startPos, vars, regs); |
|
|
|
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); |
|
indexResult.destroy(); |
|
result.destroy(); |
|
Index: arangod/Aql/Functions.cpp |
|
--- arangod/Aql/Functions.cpp.orig 2015-04-30 15:18:24.000000000 +0200 |
|
+++ arangod/Aql/Functions.cpp 2015-05-12 07:32:03.579600787 +0200 |
|
@@ -33,6 +33,15 @@ |
|
#include "Basics/JsonHelper.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 triagens::aql; |
|
using Json = triagens::basics::Json; |
|
|
|
Index: arangod/Aql/VariableGenerator.cpp |
|
--- arangod/Aql/VariableGenerator.cpp.orig 2015-04-30 15:18:24.000000000 +0200 |
|
+++ arangod/Aql/VariableGenerator.cpp 2015-05-12 07:32:03.579600787 +0200 |
|
@@ -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 |
|
// ----------------------------------------------------------------------------- |
|
@@ -202,7 +211,7 @@ |
|
std::string VariableGenerator::nextName () const { |
|
// note: if the naming scheme is adjusted, it may be necessary to adjust |
|
// Variable::isUserDefined, too! |
|
- return std::to_string(_id); // to_string: c++11 |
|
+ return my_to_string(_id); // to_string: c++11 |
|
} |
|
|
|
//////////////////////////////////////////////////////////////////////////////// |
|
Index: arangosh/V8Client/ImportHelper.cpp |
|
--- arangosh/V8Client/ImportHelper.cpp.orig 2015-04-30 15:18:24.000000000 +0200 |
|
+++ arangosh/V8Client/ImportHelper.cpp 2015-05-12 07:32:03.579600787 +0200 |
|
@@ -533,7 +533,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-04-30 15:18:24.000000000 +0200 |
|
+++ lib/Basics/JsonHelper.cpp 2015-05-12 07:32:03.590028509 +0200 |
|
@@ -128,7 +128,7 @@ |
|
if (isString(k) && isString(v)) { |
|
std::string const key = std::string(k->_value._string.data, k->_value._string.length - 1); |
|
std::string const value = std::string(v->_value._string.data, v->_value._string.length - 1); |
|
- result.emplace(std::make_pair(key, value)); |
|
+ result.insert(std::make_pair(key, value)); |
|
} |
|
} |
|
} |
|
Index: lib/Basics/json.cpp |
|
--- lib/Basics/json.cpp.orig 2015-04-30 15:18:24.000000000 +0200 |
|
+++ lib/Basics/json.cpp 2015-05-12 07:32:03.590028509 +0200 |
|
@@ -1144,7 +1144,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 (...) { |
|
@@ -1187,7 +1187,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-04-30 15:18:24.000000000 +0200 |
|
+++ lib/Basics/operating-system.h 2015-05-12 07:32:03.590028509 +0200 |
|
@@ -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-04-30 15:18:24.000000000 +0200 |
|
+++ lib/Basics/tri-zip.cpp 2015-05-12 07:32:03.590028509 +0200 |
|
@@ -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-04-30 15:18:25.000000000 +0200 |
|
+++ lib/JsonParser/json-parser.cpp 2015-05-12 07:32:03.590028509 +0200 |
|
@@ -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-04-30 15:18:25.000000000 +0200 |
|
+++ lib/JsonParser/json-parser.ll 2015-05-12 07:32:03.599517494 +0200 |
|
@@ -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-04-30 15:18:25.000000000 +0200 |
|
+++ lib/ProgramOptions/program-options.cpp 2015-05-12 07:32:03.599517494 +0200 |
|
@@ -199,7 +199,7 @@ |
|
for (size_t i = 0; i < options->_items._length; ++i) { |
|
TRI_PO_item_t const* 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/InitialiseRest.cpp |
|
--- lib/Rest/InitialiseRest.cpp.orig 2015-04-30 15:18:25.000000000 +0200 |
|
+++ lib/Rest/InitialiseRest.cpp 2015-05-12 07:32:03.599517494 +0200 |
|
@@ -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/logging.h" |
|
Index: lib/SimpleHttpClient/ClientConnection.cpp |
|
--- lib/SimpleHttpClient/ClientConnection.cpp.orig 2015-04-30 15:18:25.000000000 +0200 |
|
+++ lib/SimpleHttpClient/ClientConnection.cpp 2015-05-12 07:32:03.599517494 +0200 |
|
@@ -58,6 +58,15 @@ |
|
#define STR_ERROR() strerror(errno) |
|
#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; |
|
@@ -216,7 +225,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-04-30 15:18:25.000000000 +0200 |
|
+++ lib/SimpleHttpClient/SimpleHttpClient.cpp 2015-05-12 07:32:03.599517494 +0200 |
|
@@ -698,7 +698,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-04-30 15:18:25.000000000 +0200 |
|
+++ lib/SimpleHttpClient/SslClientConnection.cpp 2015-05-12 07:32:03.599517494 +0200 |
|
@@ -65,6 +65,14 @@ |
|
#define STR_ERROR() strerror(errno) |
|
#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; |
|
@@ -199,7 +207,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 |
|
@@ -330,7 +338,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; |
|
} |
|
|
|
@@ -346,7 +354,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; |
|
@@ -406,7 +414,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/Statistics/statistics.cpp |
|
--- lib/Statistics/statistics.cpp.orig 2015-04-30 15:18:25.000000000 +0200 |
|
+++ lib/Statistics/statistics.cpp 2015-05-12 07:32:03.599517494 +0200 |
|
@@ -391,7 +391,7 @@ |
|
|
|
#else |
|
|
|
-static uint64_t TRI_GetPhysicalMemory () { |
|
+static uint64_t GetPhysicalMemory () { |
|
PROCESS_MEMORY_COUNTERS pmc; |
|
memset(&result, 0, sizeof(result)); |
|
pmc.cb = sizeof(PROCESS_MEMORY_COUNTERS); |
|
Index: lib/V8/v8-utils.cpp |
|
--- lib/V8/v8-utils.cpp.orig 2015-04-30 15:18:25.000000000 +0200 |
|
+++ lib/V8/v8-utils.cpp 2015-05-12 20:33:43.959484541 +0200 |
|
@@ -63,6 +63,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; |
|
@@ -1989,7 +1998,7 @@ |
|
"] to [" + |
|
destination + |
|
" ] : " + |
|
- std::to_string(errorNo) + |
|
+ my_to_string(errorNo) + |
|
": " + |
|
systemErrorStr; |
|
TRI_V8_THROW_EXCEPTION_MESSAGE(res, errMsg); |
|
@@ -2045,7 +2054,7 @@ |
|
"] to [" + |
|
destination + |
|
" ] : " + |
|
- std::to_string(errorNo) + |
|
+ my_to_string(errorNo) + |
|
" - Unable to create target directory: " + |
|
systemErrorStr; |
|
TRI_V8_THROW_EXCEPTION_MESSAGE(res, errMsg); |
|
@@ -2057,7 +2066,7 @@ |
|
"] to [" + |
|
destination + |
|
" ] : " + |
|
- std::to_string(errorNo) + |
|
+ my_to_string(errorNo) + |
|
": " + |
|
systemErrorStr; |
|
TRI_V8_THROW_EXCEPTION_MESSAGE(TRI_ERROR_BAD_PARAMETER, errMsg);
|
|
|