From 2a10f4a3b8bb647636b559e7628e4447966f107b Mon Sep 17 00:00:00 2001 From: Christopher Dunn Date: Tue, 28 Apr 2015 04:55:12 +0100 Subject: [PATCH 1/2] move ctors for BORLAND --- include/json/value.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/include/json/value.h b/include/json/value.h index 426b0f7..2ac94fa 100644 --- a/include/json/value.h +++ b/include/json/value.h @@ -653,9 +653,6 @@ public: typedef int difference_type; typedef ValueIteratorBase SelfType; - ValueIteratorBase(); - explicit ValueIteratorBase(const Value::ObjectValues::iterator& current); - bool operator==(const SelfType& other) const { return isEqual(other); } bool operator!=(const SelfType& other) const { return !isEqual(other); } @@ -703,6 +700,12 @@ private: Value::ObjectValues::iterator current_; // Indicates that iterator is for a null value. bool isNull_; + +public: + // For some reason, BORLAND needs these at the end, rather + // than earlier. No idea why. + ValueIteratorBase(); + explicit ValueIteratorBase(const Value::ObjectValues::iterator& current); }; /** \brief const iterator for object and array value. From 6649009ffa0724f949c684f1f1d7954d42e7372b Mon Sep 17 00:00:00 2001 From: Christopher Dunn Date: Tue, 28 Apr 2015 04:57:49 +0100 Subject: [PATCH 2/2] another fix for BORLANDC --- src/lib_json/json_writer.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib_json/json_writer.cpp b/src/lib_json/json_writer.cpp index 66ca217..ba07b07 100644 --- a/src/lib_json/json_writer.cpp +++ b/src/lib_json/json_writer.cpp @@ -33,6 +33,12 @@ #define snprintf std::snprintf #endif +#if defined(__BORLANDC__) +#include +#define isfinite _finite +#define snprintf _snprintf +#endif + #if defined(_MSC_VER) && _MSC_VER >= 1400 // VC++ 8.0 // Disable warning about strdup being deprecated. #pragma warning(disable : 4996)