C compatibility fix for the configure script (#2252276)
Related to: <https://fedoraproject.org/wiki/Changes/PortingToModernC> <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
This commit is contained in:
parent
188062b89f
commit
ed0fb27512
26
units-configure-c99.patch
Normal file
26
units-configure-c99.patch
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
diff --git a/configure b/configure
|
||||||
|
index 22c75a6222b06f68..43461d54e59f1568 100755
|
||||||
|
--- a/configure
|
||||||
|
+++ b/configure
|
||||||
|
@@ -3881,7 +3881,7 @@ else
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
-wchar_t *out;char *in;char *res;
|
||||||
|
+wchar_t *out;char *in;const char *res;
|
||||||
|
res=setlocale(LC_CTYPE,"");res=in;
|
||||||
|
mbsrtowcs(out, &res, 2, NULL);
|
||||||
|
wcswidth(out,2);
|
||||||
|
diff --git a/configure.ac b/configure.ac
|
||||||
|
index c728d5c15d16ab2e..cd39f96e39f7d587 100644
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -121,7 +121,7 @@ AC_CACHE_CHECK([for locale and UTF-8 support], am_cv_utf8,
|
||||||
|
#include <wchar.h>
|
||||||
|
#include <locale.h>
|
||||||
|
#include <langinfo.h>
|
||||||
|
-], [wchar_t *out;char *in;char *res;
|
||||||
|
+], [wchar_t *out;char *in;const char *res;
|
||||||
|
res=setlocale(LC_CTYPE,"");res=in;
|
||||||
|
mbsrtowcs(out, &res, 2, NULL);
|
||||||
|
wcswidth(out,2);],
|
@ -1,7 +1,7 @@
|
|||||||
Summary: A utility for converting amounts from one unit to another
|
Summary: A utility for converting amounts from one unit to another
|
||||||
Name: units
|
Name: units
|
||||||
Version: 2.22
|
Version: 2.22
|
||||||
Release: 6%{?dist}
|
Release: 7%{?dist}
|
||||||
Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz
|
Source: https://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz
|
||||||
URL: https://www.gnu.org/software/units/units.html
|
URL: https://www.gnu.org/software/units/units.html
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
@ -14,6 +14,7 @@ BuildRequires: readline-devel
|
|||||||
|
|
||||||
# do not update currency.units from network during build
|
# do not update currency.units from network during build
|
||||||
Patch1: 0001-units-2.22-no-network.patch
|
Patch1: 0001-units-2.22-no-network.patch
|
||||||
|
Patch2: units-configure-c99.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Units converts an amount from one unit to another, or tells you what
|
Units converts an amount from one unit to another, or tells you what
|
||||||
@ -52,6 +53,9 @@ make check
|
|||||||
%{_mandir}/man1/*
|
%{_mandir}/man1/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Nov 30 2023 Florian Weimer <fweimer@redhat.com> - 2.22-7
|
||||||
|
- C compatibility fix for the configure script (#2252276)
|
||||||
|
|
||||||
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.22-6
|
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.22-6
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user