forked from pool/kseexpr
Accepting request 896821 from KDE:Extra
- Add GCC 11 build fix (kde#437890): * 0001-Fix-charconv-support-with-MSVC-GCC11.patch OBS-URL: https://build.opensuse.org/request/show/896821 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kseexpr?expand=0&rev=2
This commit is contained in:
commit
4ff7e8285e
43
0001-Fix-charconv-support-with-MSVC-GCC11.patch
Normal file
43
0001-Fix-charconv-support-with-MSVC-GCC11.patch
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
From 1e8e6c8da1e22c4d32e50d8999705fd370824736 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "L. E. Segovia" <amy@amyspark.me>
|
||||||
|
Date: Tue, 1 Jun 2021 23:35:40 +0000
|
||||||
|
Subject: [PATCH] Fix charconv support with MSVC/GCC11
|
||||||
|
|
||||||
|
BUG: 437890
|
||||||
|
---
|
||||||
|
src/KSeExpr/Utils.cpp | 5 +++--
|
||||||
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/KSeExpr/Utils.cpp b/src/KSeExpr/Utils.cpp
|
||||||
|
index 22e6cd8..e48cfe9 100644
|
||||||
|
--- a/src/KSeExpr/Utils.cpp
|
||||||
|
+++ b/src/KSeExpr/Utils.cpp
|
||||||
|
@@ -6,6 +6,7 @@
|
||||||
|
|
||||||
|
#if defined(KSeExpr_HAVE_CHARCONV_WITH_DOUBLES)
|
||||||
|
#include <charconv>
|
||||||
|
+#include <cstring>
|
||||||
|
|
||||||
|
double_t KSeExpr::Utils::atof(const char *num)
|
||||||
|
{
|
||||||
|
@@ -21,7 +22,7 @@ double_t KSeExpr::Utils::atof(const char *num)
|
||||||
|
double_t KSeExpr::Utils::atof(const std::string &num)
|
||||||
|
{
|
||||||
|
double_t v;
|
||||||
|
- auto [p, ec] = std::from_chars(val.data(), val.data() + val.size(), v);
|
||||||
|
+ auto [p, ec] = std::from_chars(num.data(), num.data() + num.size(), v);
|
||||||
|
if (ec == std::errc()) {
|
||||||
|
return v;
|
||||||
|
} else {
|
||||||
|
@@ -32,7 +33,7 @@ double_t KSeExpr::Utils::atof(const std::string &num)
|
||||||
|
int32_t KSeExpr::Utils::strtol(const std::string &num)
|
||||||
|
{
|
||||||
|
int32_t v;
|
||||||
|
- auto [p, ec] = std::from_chars(val.data(), val.data() + val.size(), v);
|
||||||
|
+ auto [p, ec] = std::from_chars(num.data(), num.data() + num.size(), v);
|
||||||
|
if (ec == std::errc()) {
|
||||||
|
return v;
|
||||||
|
} else if (ec == std::errc::result_out_of_range) {
|
||||||
|
--
|
||||||
|
2.31.1
|
||||||
|
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jun 2 06:04:23 UTC 2021 - Christophe Giboudeaux <christophe@krop.fr>
|
||||||
|
|
||||||
|
- Add GCC 11 build fix (kde#437890):
|
||||||
|
* 0001-Fix-charconv-support-with-MSVC-GCC11.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Jan 13 12:42:40 UTC 2021 - Wolfgang Bauer <wbauer@tmo.at>
|
Wed Jan 13 12:42:40 UTC 2021 - Wolfgang Bauer <wbauer@tmo.at>
|
||||||
|
|
||||||
|
@ -34,6 +34,8 @@ Source0: https://download.kde.org/stable/%{name}/4.0.1/%{name}-%{version}
|
|||||||
Patch0: Fix-translation-lookup-in-stock-Linux-deployments.patch
|
Patch0: Fix-translation-lookup-in-stock-Linux-deployments.patch
|
||||||
# PATCH-FIX-OPENSUSE
|
# PATCH-FIX-OPENSUSE
|
||||||
Patch1: Fix-possible-compiler-error.patch
|
Patch1: Fix-possible-compiler-error.patch
|
||||||
|
# PATCH-FIX-UPSTREAM
|
||||||
|
Patch2: 0001-Fix-charconv-support-with-MSVC-GCC11.patch
|
||||||
BuildRequires: extra-cmake-modules
|
BuildRequires: extra-cmake-modules
|
||||||
BuildRequires: cmake(Qt5Core)
|
BuildRequires: cmake(Qt5Core)
|
||||||
BuildRequires: cmake(Qt5Gui)
|
BuildRequires: cmake(Qt5Gui)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user