Florian Weimer 2023-04-27 12:51:09 +02:00
parent 11a869d90d
commit 1e805ec618
2 changed files with 43 additions and 1 deletions

38
pinfo-configure-c99.patch Normal file
View File

@ -0,0 +1,38 @@
Defining _XOPEN_SOURCE on its own hides definitions in other headers
(which is already mentioned in upstream commit f49941a). One way to
deal with this is to define _DEFAULT_SOURCE in addition to
_XOPEN_SOURCE, which is what this commit implements.
This is one way to avoid an implicit function declaration in the
built-in mmap test that autoconf provides. It includes <unistd.h> and
expects that to provide a declaration of getpagesize because the
earlier check for HAVE_GETPAGESIZE succeeded. Without addressing the
implicit function declaration, the outcome of this check will change
with future compilers which no longer support them by default.
Submitted upstream: <https://github.com/baszoetekouw/pinfo/pull/35>
diff --git a/macros/wchar.m4 b/macros/wchar.m4
index 2dc3d3a940f6c6fd..a7d6e967024df594 100644
--- a/macros/wchar.m4
+++ b/macros/wchar.m4
@@ -78,7 +78,8 @@ AC_DEFUN([AC_CHECK_WCHAR],[
then
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM(
- [[
+ [[
+ #define _DEFAULT_SOURCE
#define _XOPEN_SOURCE 600
#include <wchar.h>
]],
@@ -87,7 +88,7 @@ AC_DEFUN([AC_CHECK_WCHAR],[
[
dnl if found, set variables and print result
have_wcwidth=true
- wchar_flags="$wchar_flags -D_XOPEN_SOURCE=600"
+ wchar_flags="$wchar_flags -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600"
AC_MSG_RESULT([with -D_XOPEN_SOURCE=600])
],
[ ]

View File

@ -1,6 +1,6 @@
Name: pinfo
Version: 0.6.13
Release: 2%{?dist}
Release: 3%{?dist}
Summary: An info file viewer
License: GPL-2.0-only
@ -14,6 +14,7 @@ Patch4: pinfo-0.6.13-fnocommon.patch
Patch5: pinfo-0.6.13-gccwarn.patch
Patch6: pinfo-0.6.13-nogroup.patch
Patch7: pinfo-0.6.13-stringop-overflow.patch
Patch8: pinfo-configure-c99.patch
BuildRequires: automake
BuildRequires: gcc
@ -55,6 +56,9 @@ rm -f $RPM_BUILD_ROOT%{_infodir}/dir
%{_mandir}/man1/pinfo.1*
%changelog
* Thu Apr 27 2023 Florian Weimer <fweimer@redhat.com> - 0.6.13-3
- Port configure script to C99
* Tue Mar 14 2023 Lukáš Zaoral <lzaoral@redhat.com> - 0.6.13-2
- migrated to SPDX license
- cleaned-up the specfile