Hello community,

here is the log from the commit of package fmt for openSUSE:Leap:15.2 checked 
in at 2020-04-28 20:09:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/fmt (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.fmt.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "fmt"

Tue Apr 28 20:09:22 2020 rev:6 rq:795589 version:6.2.0

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/fmt/fmt.changes        2020-04-17 
13:36:44.140183423 +0200
+++ /work/SRC/openSUSE:Leap:15.2/.fmt.new.2738/fmt.changes      2020-04-28 
20:09:23.996315354 +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.km2CB8/_old  2020-04-28 20:09:24.500316400 +0200
+++ /var/tmp/diff_new_pack.km2CB8/_new  2020-04-28 20:09:24.500316400 +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;

Reply via email to