Hello community, here is the log from the commit of package fmt for openSUSE:Factory checked in at 2020-04-19 21:35:15 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/fmt (Old) and /work/SRC/openSUSE:Factory/.fmt.new.2738 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "fmt" Sun Apr 19 21:35:15 2020 rev:7 rq:793945 version:6.2.0 Changes: -------- --- /work/SRC/openSUSE:Factory/fmt/fmt.changes 2020-04-09 23:14:21.754206617 +0200 +++ /work/SRC/openSUSE:Factory/.fmt.new.2738/fmt.changes 2020-04-19 21:35:20.722377279 +0200 @@ -1,0 +2,7 @@ +Tue Apr 14 13:04:56 UTC 2020 - Hans-Peter Jansen <h...@urpla.net> + +- Apply 7d01859ef16e6b65bc023ad8bebfedecb088bf81.patch + to fix kodi compilation and probably others: + https://github.com/fmtlib/fmt/issues/1620 + +------------------------------------------------------------------- New: ---- 7d01859ef16e6b65bc023ad8bebfedecb088bf81.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ fmt.spec ++++++ --- /var/tmp/diff_new_pack.3iFZhD/_old 2020-04-19 21:35:21.238378343 +0200 +++ /var/tmp/diff_new_pack.3iFZhD/_new 2020-04-19 21:35:21.242378352 +0200 @@ -25,6 +25,7 @@ URL: http://fmtlib.net/ Source0: https://github.com/fmtlib/fmt/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: baselibs.conf +Patch0: 7d01859ef16e6b65bc023ad8bebfedecb088bf81.patch BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: pkgconfig ++++++ 7d01859ef16e6b65bc023ad8bebfedecb088bf81.patch ++++++ >From 7d01859ef16e6b65bc023ad8bebfedecb088bf81 Mon Sep 17 00:00:00 2001 From: Victor Zverovich <v...@fb.com> Date: Wed, 8 Apr 2020 12:32:34 -0700 Subject: [PATCH] Fix handling of unsigned char strings in printf --- include/fmt/core.h | 8 ++++++++ test/printf-test.cc | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/include/fmt/core.h b/include/fmt/core.h index 6df2875ac..dc10722bf 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -972,6 +972,14 @@ template <typename Context> struct arg_mapper { static_assert(std::is_same<char_type, char>::value, "invalid string type"); return reinterpret_cast<const char*>(val); } + FMT_CONSTEXPR const char* map(signed char* val) { + const auto* const_val = val; + return map(const_val); + } + FMT_CONSTEXPR const char* map(unsigned char* val) { + const auto* const_val = val; + return map(const_val); + } FMT_CONSTEXPR const void* map(void* val) { return val; } FMT_CONSTEXPR const void* map(const void* val) { return val; } diff --git a/test/printf-test.cc b/test/printf-test.cc index 5aaa27b13..545e02aab 100644 --- a/test/printf-test.cc +++ b/test/printf-test.cc @@ -447,6 +447,12 @@ TEST(PrintfTest, String) { EXPECT_PRINTF(L" (null)", L"%10s", null_wstr); } +TEST(PrintfTest, UCharString) { + unsigned char str[] = "test"; + unsigned char* pstr = str; + EXPECT_EQ("test", fmt::sprintf("%s", pstr)); +} + TEST(PrintfTest, Pointer) { int n; void* p = &n;