From owner-svn-ports-all@freebsd.org Sun Apr 24 06:58:12 2016 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3656B1941F; Sun, 24 Apr 2016 06:58:12 +0000 (UTC) (envelope-from riggs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B02981262; Sun, 24 Apr 2016 06:58:12 +0000 (UTC) (envelope-from riggs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u3O6wBRE099031; Sun, 24 Apr 2016 06:58:11 GMT (envelope-from riggs@FreeBSD.org) Received: (from riggs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u3O6wBRo099030; Sun, 24 Apr 2016 06:58:11 GMT (envelope-from riggs@FreeBSD.org) Message-Id: <201604240658.u3O6wBRo099030@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: riggs set sender to riggs@FreeBSD.org using -f From: Thomas Zander Date: Sun, 24 Apr 2016 06:58:11 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r413921 - head/multimedia/mkvtoolnix/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2016 06:58:12 -0000 Author: riggs Date: Sun Apr 24 06:58:11 2016 New Revision: 413921 URL: https://svnweb.freebsd.org/changeset/ports/413921 Log: Fix build with gcc 4.8 Modified: head/multimedia/mkvtoolnix/files/patch-lib_nlohmann-json_src_json.hpp Modified: head/multimedia/mkvtoolnix/files/patch-lib_nlohmann-json_src_json.hpp ============================================================================== --- head/multimedia/mkvtoolnix/files/patch-lib_nlohmann-json_src_json.hpp Sun Apr 24 05:50:41 2016 (r413920) +++ head/multimedia/mkvtoolnix/files/patch-lib_nlohmann-json_src_json.hpp Sun Apr 24 06:58:11 2016 (r413921) @@ -1,17 +1,48 @@ --- lib/nlohmann-json/src/json.hpp.orig 2016-04-23 13:52:02 UTC +++ lib/nlohmann-json/src/json.hpp -@@ -6224,7 +6224,9 @@ class basic_json +@@ -87,6 +87,14 @@ struct has_mapped_type + static constexpr bool value = sizeof(test(0)) == 1; + }; + ++template ++std::string ToString(T val) ++{ ++ std::ostringstream TempStream; ++ TempStream << val; ++ return TempStream.str(); ++} ++ + } + + /*! +@@ -3029,7 +3037,7 @@ class basic_json + catch (std::out_of_range&) + { + // create better exception explanation +- throw std::out_of_range("array index " + std::to_string(idx) + " is out of range"); ++ throw std::out_of_range("array index " + ToString(idx) + " is out of range"); + } + } + else +@@ -3073,7 +3081,7 @@ class basic_json + catch (std::out_of_range&) + { + // create better exception explanation +- throw std::out_of_range("array index " + std::to_string(idx) + " is out of range"); ++ throw std::out_of_range("array index " + ToString(idx) + " is out of range"); + } + } + else +@@ -6224,7 +6232,7 @@ class basic_json // use integer array index as key case value_t::array: { - return std::to_string(array_index); -+ std::ostringstream TempStream; -+ TempStream << array_index; -+ return TempStream.str(); ++ return ToString(array_index); } // use key from the object -@@ -8204,7 +8206,7 @@ basic_json_parser_63: +@@ -8204,7 +8212,7 @@ basic_json_parser_63: */ long double str_to_float_t(long double* /* type */, char** endptr) const { @@ -20,3 +51,31 @@ } /*! +@@ -8244,7 +8252,8 @@ basic_json_parser_63: + */ + float str_to_float_t(float* /* type */, char** endptr) const + { +- return std::strtof(reinterpret_cast(m_start), endptr); ++ auto v = std::strtod(reinterpret_cast(m_start), endptr); ++ return (float)v; + } + + /*! +@@ -8316,7 +8325,7 @@ basic_json_parser_63: + { + // positive, parse with strtoull and attempt cast to + // number_unsigned_t +- if (attempt_cast(std::strtoull(reinterpret_cast(m_start), &endptr, ++ if (attempt_cast(strtoull(reinterpret_cast(m_start), &endptr, + 10), result.m_value.number_unsigned)) + { + result.m_type = value_t::number_unsigned; +@@ -8331,7 +8340,7 @@ basic_json_parser_63: + { + // Negative, parse with strtoll and attempt cast to + // number_integer_t +- if (attempt_cast(std::strtoll(reinterpret_cast(m_start), &endptr, ++ if (attempt_cast(strtoll(reinterpret_cast(m_start), &endptr, + 10), result.m_value.number_integer)) + { + result.m_type = value_t::number_integer;