Hello community, here is the log from the commit of package jsoncpp for openSUSE:Factory checked in at 2016-10-14 03:37:45 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/jsoncpp (Old) and /work/SRC/openSUSE:Factory/.jsoncpp.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "jsoncpp" Changes: -------- --- /work/SRC/openSUSE:Factory/jsoncpp/jsoncpp.changes 2016-08-03 11:38:02.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.jsoncpp.new/jsoncpp.changes 2016-10-14 03:37:46.000000000 +0200 @@ -1,0 +2,20 @@ +Fri Oct 7 09:12:22 UTC 2016 - [email protected] + +- Update to vesrion 1.7.7: + * At the suggestion of Peter Spiess-Knafl, we will bump the + SOVERSION independent of the MAJOR.MINOR.MICRO version, + in case we break binary compatibility. +- Changes for version 1.7.6: + * Prevent possible SEGV. (Thanks to @ngg.) + * Add RPATH for OSX libs. (Please let us know if this causes + a problem.) +- Changes for version 1.7.5: + * Fix locale for decimal points + + Plus a fix for Android + * int64_t for 64-bit integers + * Optionally suppress space after comma + * Avoid null for empty stringValue + * Fix null ctor/dtor, using a "Meyers Singleton" + + Thanks to @marklakata and @BillyDonahue in #488 in #490. + +------------------------------------------------------------------- Old: ---- jsoncpp-1.7.4.tar.gz New: ---- jsoncpp-1.7.7.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ jsoncpp.spec ++++++ --- /var/tmp/diff_new_pack.B9PAVu/_old 2016-10-14 03:37:47.000000000 +0200 +++ /var/tmp/diff_new_pack.B9PAVu/_new 2016-10-14 03:37:47.000000000 +0200 @@ -16,9 +16,9 @@ # -%define sover 1 +%define sover 11 Name: jsoncpp -Version: 1.7.4 +Version: 1.7.7 Release: 0 Summary: C++ library that allows manipulating with JSON License: MIT @@ -74,7 +74,7 @@ -DJSONCPP_WITH_CMAKE_PACKAGE=ON # path needs to be exported otherwise unit tests will fail export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{_builddir}/%{name}-%{version}/build/src/lib_json -make %{?_smp_mflags} +%make_jobs %install %cmake_install @@ -87,6 +87,7 @@ %defattr(-,root,root) %doc LICENSE %{_libdir}/lib%{name}.so.%{sover}* +%{_libdir}/lib%{name}.so.%{version} %files devel %defattr(-,root,root) ++++++ jsoncpp-1.7.4.tar.gz -> jsoncpp-1.7.7.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsoncpp-1.7.4/CMakeLists.txt new/jsoncpp-1.7.7/CMakeLists.txt --- old/jsoncpp-1.7.4/CMakeLists.txt 2016-07-09 20:27:28.000000000 +0200 +++ new/jsoncpp-1.7.7/CMakeLists.txt 2016-10-02 18:32:21.000000000 +0200 @@ -22,6 +22,11 @@ ENDIF() ENDIF() +# Enable runtime search path support for dynamic libraries on OSX +IF(APPLE) + SET(CMAKE_MACOSX_RPATH 1) +ENDIF() + SET(DEBUG_LIBNAME_SUFFIX "" CACHE STRING "Optional suffix to append to the library name for a debug build") SET(LIB_SUFFIX "" CACHE STRING "Optional arch-dependent suffix for the library installation directory") @@ -64,11 +69,12 @@ #SET( JSONCPP_VERSION_MAJOR X ) #SET( JSONCPP_VERSION_MINOR Y ) #SET( JSONCPP_VERSION_PATCH Z ) -SET( JSONCPP_VERSION 1.7.4 ) +SET( JSONCPP_VERSION 1.7.7 ) jsoncpp_parse_version( ${JSONCPP_VERSION} JSONCPP_VERSION ) #IF(NOT JSONCPP_VERSION_FOUND) # MESSAGE(FATAL_ERROR "Failed to parse version string properly. Expect X.Y.Z") #ENDIF(NOT JSONCPP_VERSION_FOUND) +SET( JSONCPP_SOVERSION 11 ) SET( JSONCPP_USE_SECURE_MEMORY "0" CACHE STRING "-D...=1 to use memory-wiping allocator for STL" ) MESSAGE(STATUS "JsonCpp Version: ${JSONCPP_VERSION_MAJOR}.${JSONCPP_VERSION_MINOR}.${JSONCPP_VERSION_PATCH}") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsoncpp-1.7.4/include/json/config.h new/jsoncpp-1.7.7/include/json/config.h --- old/jsoncpp-1.7.4/include/json/config.h 2016-07-09 20:27:28.000000000 +0200 +++ new/jsoncpp-1.7.7/include/json/config.h 2016-10-02 18:32:21.000000000 +0200 @@ -6,7 +6,8 @@ #ifndef JSON_CONFIG_H_INCLUDED #define JSON_CONFIG_H_INCLUDED #include <stddef.h> -#include <string> //typdef String +#include <string> //typedef String +#include <stdint.h> //typedef int64_t, uint64_t /// If defined, indicates that json library is embedded in CppTL library. //# define JSON_IN_CPPTL 1 @@ -152,8 +153,8 @@ typedef __int64 Int64; typedef unsigned __int64 UInt64; #else // if defined(_MSC_VER) // Other platforms, use long long -typedef long long int Int64; -typedef unsigned long long int UInt64; +typedef int64_t Int64; +typedef uint64_t UInt64; #endif // if defined(_MSC_VER) typedef Int64 LargestInt; typedef UInt64 LargestUInt; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsoncpp-1.7.4/include/json/version.h new/jsoncpp-1.7.7/include/json/version.h --- old/jsoncpp-1.7.4/include/json/version.h 2016-07-09 20:27:28.000000000 +0200 +++ new/jsoncpp-1.7.7/include/json/version.h 2016-10-02 18:32:21.000000000 +0200 @@ -3,10 +3,10 @@ #ifndef JSON_VERSION_H_INCLUDED # define JSON_VERSION_H_INCLUDED -# define JSONCPP_VERSION_STRING "1.7.4" +# define JSONCPP_VERSION_STRING "1.7.7" # define JSONCPP_VERSION_MAJOR 1 # define JSONCPP_VERSION_MINOR 7 -# define JSONCPP_VERSION_PATCH 4 +# define JSONCPP_VERSION_PATCH 7 # define JSONCPP_VERSION_QUALIFIER # define JSONCPP_VERSION_HEXA ((JSONCPP_VERSION_MAJOR << 24) | (JSONCPP_VERSION_MINOR << 16) | (JSONCPP_VERSION_PATCH << 8)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsoncpp-1.7.4/src/lib_json/CMakeLists.txt new/jsoncpp-1.7.7/src/lib_json/CMakeLists.txt --- old/jsoncpp-1.7.4/src/lib_json/CMakeLists.txt 2016-07-09 20:27:28.000000000 +0200 +++ new/jsoncpp-1.7.7/src/lib_json/CMakeLists.txt 2016-10-02 18:32:21.000000000 +0200 @@ -42,10 +42,15 @@ IF(BUILD_SHARED_LIBS) ADD_DEFINITIONS( -DJSON_DLL_BUILD ) ADD_LIBRARY(jsoncpp_lib SHARED ${PUBLIC_HEADERS} ${jsoncpp_sources}) - SET_TARGET_PROPERTIES( jsoncpp_lib PROPERTIES VERSION ${JSONCPP_VERSION} SOVERSION ${JSONCPP_VERSION_MAJOR}) + SET_TARGET_PROPERTIES( jsoncpp_lib PROPERTIES VERSION ${JSONCPP_VERSION} SOVERSION ${JSONCPP_SOVERSION}) SET_TARGET_PROPERTIES( jsoncpp_lib PROPERTIES OUTPUT_NAME jsoncpp DEBUG_OUTPUT_NAME jsoncpp${DEBUG_LIBNAME_SUFFIX} ) + # Set library's runtime search path on OSX + IF(APPLE) + SET_TARGET_PROPERTIES( jsoncpp_lib PROPERTIES INSTALL_RPATH "@loader_path/." ) + ENDIF() + INSTALL( TARGETS jsoncpp_lib ${INSTALL_EXPORT} RUNTIME DESTINATION ${RUNTIME_INSTALL_DIR} LIBRARY DESTINATION ${LIBRARY_INSTALL_DIR} @@ -61,7 +66,7 @@ IF(BUILD_STATIC_LIBS) ADD_LIBRARY(jsoncpp_lib_static STATIC ${PUBLIC_HEADERS} ${jsoncpp_sources}) - SET_TARGET_PROPERTIES( jsoncpp_lib_static PROPERTIES VERSION ${JSONCPP_VERSION} SOVERSION ${JSONCPP_VERSION_MAJOR}) + SET_TARGET_PROPERTIES( jsoncpp_lib_static PROPERTIES VERSION ${JSONCPP_VERSION} SOVERSION ${JSONCPP_SOVERSION}) SET_TARGET_PROPERTIES( jsoncpp_lib_static PROPERTIES OUTPUT_NAME jsoncpp DEBUG_OUTPUT_NAME jsoncpp${DEBUG_LIBNAME_SUFFIX} ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsoncpp-1.7.4/src/lib_json/json_reader.cpp new/jsoncpp-1.7.7/src/lib_json/json_reader.cpp --- old/jsoncpp-1.7.4/src/lib_json/json_reader.cpp 2016-07-09 20:27:28.000000000 +0200 +++ new/jsoncpp-1.7.7/src/lib_json/json_reader.cpp 2016-10-02 18:32:21.000000000 +0200 @@ -401,7 +401,7 @@ } bool Reader::readCStyleComment() { - while (current_ != end_) { + while ((current_ + 1) < end_) { Char c = getNextChar(); if (c == '*' && *current_ == '/') break; @@ -520,7 +520,7 @@ currentValue().swapPayload(init); currentValue().setOffsetStart(tokenStart.start_ - begin_); skipSpaces(); - if (*current_ == ']') // empty array + if (current_ != end_ && *current_ == ']') // empty array { Token endArray; readToken(endArray); @@ -1068,7 +1068,7 @@ Token token; skipCommentTokens(token); if (features_.failIfExtra_) { - if (token.type_ != tokenError && token.type_ != tokenEndOfStream) { + if ((features_.strictRoot_ || token.type_ != tokenError) && token.type_ != tokenEndOfStream) { addError("Extra non-whitespace after JSON value.", token); return false; } @@ -1361,7 +1361,7 @@ } bool OurReader::readCStyleComment() { - while (current_ != end_) { + while ((current_ + 1) < end_) { Char c = getNextChar(); if (c == '*' && *current_ == '/') break; @@ -1503,7 +1503,7 @@ currentValue().swapPayload(init); currentValue().setOffsetStart(tokenStart.start_ - begin_); skipSpaces(); - if (*current_ == ']') // empty array + if (current_ != end_ && *current_ == ']') // empty array { Token endArray; readToken(endArray); @@ -1619,6 +1619,7 @@ Char buffer[bufferSize + 1]; memcpy(buffer, token.start_, ulength); buffer[length] = 0; + fixNumericLocaleInput(buffer, buffer + length); count = sscanf(buffer, format, &value); } else { JSONCPP_STRING buffer(token.start_, token.end_); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsoncpp-1.7.4/src/lib_json/json_tool.h new/jsoncpp-1.7.7/src/lib_json/json_tool.h --- old/jsoncpp-1.7.4/src/lib_json/json_tool.h 2016-07-09 20:27:28.000000000 +0200 +++ new/jsoncpp-1.7.7/src/lib_json/json_tool.h 2016-10-02 18:32:21.000000000 +0200 @@ -6,6 +6,10 @@ #ifndef LIB_JSONCPP_JSON_TOOL_H_INCLUDED #define LIB_JSONCPP_JSON_TOOL_H_INCLUDED +#ifndef NO_LOCALE_SUPPORT +#include <clocale> +#endif + /* This header provides common string manipulation support, such as UTF-8, * portable conversion from/to string... * @@ -13,6 +17,14 @@ */ namespace Json { +static char getDecimalPoint() { +#ifdef NO_LOCALE_SUPPORT + return '\0'; +#else + struct lconv* lc = localeconv(); + return lc ? *(lc->decimal_point) : '\0'; +#endif +} /// Converts a unicode code-point to UTF-8. static inline JSONCPP_STRING codePointToUTF8(unsigned int cp) { @@ -82,6 +94,18 @@ } } +static inline void fixNumericLocaleInput(char* begin, char* end) { + char decimalPoint = getDecimalPoint(); + if (decimalPoint != '\0' && decimalPoint != '.') { + while (begin < end) { + if (*begin == '.') { + *begin = decimalPoint; + } + ++begin; + } + } +} + } // namespace Json { #endif // LIB_JSONCPP_JSON_TOOL_H_INCLUDED diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsoncpp-1.7.4/src/lib_json/json_value.cpp new/jsoncpp-1.7.7/src/lib_json/json_value.cpp --- old/jsoncpp-1.7.4/src/lib_json/json_value.cpp 2016-07-09 20:27:28.000000000 +0200 +++ new/jsoncpp-1.7.7/src/lib_json/json_value.cpp 2016-10-02 18:32:21.000000000 +0200 @@ -39,8 +39,8 @@ // static Value const& Value::nullSingleton() { - static Value const* nullStatic = new Value; - return *nullStatic; + static Value const nullStatic; + return nullStatic; } // for backwards compatibility, we'll leave these global references around, but DO NOT @@ -343,6 +343,7 @@ * This optimization is used in ValueInternalMap fast allocator. */ Value::Value(ValueType vtype) { + static char const empty[] = ""; initBasic(vtype); switch (vtype) { case nullValue: @@ -355,7 +356,8 @@ value_.real_ = 0.0; break; case stringValue: - value_.string_ = 0; + // allocated_ == false, so this is safe. + value_.string_ = const_cast<char*>(static_cast<char const*>(empty)); break; case arrayValue: case objectValue: @@ -500,8 +502,7 @@ JSON_ASSERT_UNREACHABLE; } - if (comments_) - delete[] comments_; + delete[] comments_; value_.uint_ = 0; } @@ -1503,12 +1504,12 @@ index = index * 10 + ArrayIndex(*current - '0'); args_.push_back(index); } - if (current == end || *current++ != ']') + if (current == end || *++current != ']') invalidPath(path, int(current - path.c_str())); } else if (*current == '%') { addPathInArg(path, in, itInArg, PathArgument::kindKey); ++current; - } else if (*current == '.') { + } else if (*current == '.' || *current == ']') { ++current; } else { const char* beginName = current; @@ -1528,7 +1529,7 @@ } else if ((*itInArg)->kind_ != kind) { // Error: bad argument type } else { - args_.push_back(**itInArg); + args_.push_back(**itInArg++); } } @@ -1543,16 +1544,19 @@ if (arg.kind_ == PathArgument::kindIndex) { if (!node->isArray() || !node->isValidIndex(arg.index_)) { // Error: unable to resolve path (array value expected at position... + return Value::null; } node = &((*node)[arg.index_]); } else if (arg.kind_ == PathArgument::kindKey) { if (!node->isObject()) { // Error: unable to resolve path (object value expected at position...) + return Value::null; } node = &((*node)[arg.key_]); if (node == &Value::nullSingleton()) { // Error: unable to resolve path (object has no member named '' at // position...) + return Value::null; } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsoncpp-1.7.4/src/lib_json/json_writer.cpp new/jsoncpp-1.7.7/src/lib_json/json_writer.cpp --- old/jsoncpp-1.7.4/src/lib_json/json_writer.cpp 2016-07-09 20:27:28.000000000 +0200 +++ new/jsoncpp-1.7.7/src/lib_json/json_writer.cpp 2016-10-02 18:32:21.000000000 +0200 @@ -353,7 +353,7 @@ break; case stringValue: { - // Is NULL possible for value.string_? + // Is NULL possible for value.string_? No. char const* str; char const* end; bool ok = value.getString(&str, &end); @@ -423,7 +423,7 @@ break; case stringValue: { - // Is NULL possible for value.string_? + // Is NULL possible for value.string_? No. char const* str; char const* end; bool ok = value.getString(&str, &end); @@ -640,7 +640,7 @@ break; case stringValue: { - // Is NULL possible for value.string_? + // Is NULL possible for value.string_? No. char const* str; char const* end; bool ok = value.getString(&str, &end); @@ -921,7 +921,7 @@ break; case stringValue: { - // Is NULL is possible for value.string_? + // Is NULL is possible for value.string_? No. char const* str; char const* end; bool ok = value.getString(&str, &end); @@ -1002,7 +1002,7 @@ if (!indentation_.empty()) *sout_ << " "; for (unsigned index = 0; index < size; ++index) { if (index > 0) - *sout_ << ", "; + *sout_ << ((!indentation_.empty()) ? ", " : ","); *sout_ << childValues_[index]; } if (!indentation_.empty()) *sout_ << " "; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsoncpp-1.7.4/version new/jsoncpp-1.7.7/version --- old/jsoncpp-1.7.4/version 2016-07-09 20:27:28.000000000 +0200 +++ new/jsoncpp-1.7.7/version 2016-10-02 18:32:21.000000000 +0200 @@ -1 +1 @@ -1.7.4 +1.7.7
