Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(655)

Unified Diff: ports/jsoncpp/nacl.patch

Issue 1057623004: Update upstream version of jsoncpp and run tests (Closed) Base URL: https://chromium.googlesource.com/external/naclports.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ports/jsoncpp/nacl.patch
diff --git a/ports/jsoncpp/nacl.patch b/ports/jsoncpp/nacl.patch
new file mode 100644
index 0000000000000000000000000000000000000000..bf3a3941a0291f43786fb6f96bd8c9cdde1d1abd
--- /dev/null
+++ b/ports/jsoncpp/nacl.patch
@@ -0,0 +1,44 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 462f278..c1a6712 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -94,10 +94,10 @@ endif( MSVC )
+
+ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ # using regular Clang or AppleClang
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall")
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11 -Wall")
binji 2015/04/02 07:39:07 TODO here? We could remove this when we kill the G
Sam Clegg 2015/04/02 17:58:48 Done.
+ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+ # using GCC
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -Wall -Wextra -pedantic")
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x -Wall -Wextra -pedantic")
+ endif()
+
+ IF(JSONCPP_WITH_WARNING_AS_ERROR)
+diff --git a/src/lib_json/json_writer.cpp b/src/lib_json/json_writer.cpp
+index ef976bf..f7ad1e2 100644
+--- a/src/lib_json/json_writer.cpp
++++ b/src/lib_json/json_writer.cpp
+@@ -29,8 +29,6 @@
+
+ #if defined(_MSC_VER) && _MSC_VER < 1500 // VC++ 8.0 and below
+ #define snprintf _snprintf
+-#elif __cplusplus >= 201103L
+-#define snprintf std::snprintf
+ #endif
+
+ #if defined(_MSC_VER) && _MSC_VER >= 1400 // VC++ 8.0
+diff --git a/src/test_lib_json/main.cpp b/src/test_lib_json/main.cpp
+index 71e9491..6bd1778 100644
+--- a/src/test_lib_json/main.cpp
++++ b/src/test_lib_json/main.cpp
+@@ -679,7 +679,9 @@ JSONTEST_FIXTURE(ValueTest, integers) {
+ JSONTEST_ASSERT_EQUAL(kint32max, val.asUInt());
+ JSONTEST_ASSERT_EQUAL(kint32max, val.asLargestUInt());
+ JSONTEST_ASSERT_EQUAL(kint32max, val.asDouble());
++#if !(defined(__native_client__) && defined(__i386__))
binji 2015/04/02 07:39:07 Add TODO explaining this test failure?
Sam Clegg 2015/04/02 17:58:48 Done.
+ JSONTEST_ASSERT_EQUAL(kfint32max, val.asFloat());
++#endif
+ JSONTEST_ASSERT_EQUAL(true, val.asBool());
+ JSONTEST_ASSERT_STRING_EQUAL("2147483647", val.asString());
+

Powered by Google App Engine
This is Rietveld 408576698