Fix C compatibility issue in the configure script (#2251945)

Related to:

  <https://fedoraproject.org/wiki/Changes/PortingToModernC>
  <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
This commit is contained in:
Florian Weimer 2023-11-28 15:53:11 +01:00
parent f0c75f945b
commit 0d7792d8a5
2 changed files with 30 additions and 1 deletions

24
xterm-configure-c99.patch Normal file
View File

@ -0,0 +1,24 @@
diff -ur xterm-388.orig/aclocal.m4 xterm-388/aclocal.m4
--- xterm-388.orig/aclocal.m4 2023-10-02 23:23:32.000000000 +0200
+++ xterm-388/aclocal.m4 2023-11-28 15:32:31.790171161 +0100
@@ -4759,7 +4759,7 @@
int x = (XkbBI_Info |XkbBI_MinorError |XkbBI_MajorError |XkbBI_TerminalBell |XkbBI_MarginBell);
Atom y = 0;
(void)x;
- XkbBell((Display *)0, (Widget)0, 0, y);
+ XkbBell((Display *)0, (Window)0, 0, y);
],[cf_cv_xkb_bell_ext=yes],[cf_cv_xkb_bell_ext=no])
])
test "$cf_cv_xkb_bell_ext" = yes && AC_DEFINE(HAVE_XKB_BELL_EXT,1,[Define 1 if we have XKB Bell extension])
diff -ur xterm-388.orig/configure xterm-388/configure
--- xterm-388.orig/configure 2023-10-08 23:26:36.000000000 +0200
+++ xterm-388/configure 2023-11-28 15:32:53.598984387 +0100
@@ -17023,7 +17023,7 @@
int x = (XkbBI_Info |XkbBI_MinorError |XkbBI_MajorError |XkbBI_TerminalBell |XkbBI_MarginBell);
Atom y = 0;
(void)x;
- XkbBell((Display *)0, (Widget)0, 0, y);
+ XkbBell((Display *)0, (Window)0, 0, y);
;
return 0;

View File

@ -4,7 +4,7 @@
Summary: Terminal emulator for the X Window System
Name: xterm
Version: 388
Release: 2%{?dist}
Release: 3%{?dist}
URL: https://invisible-island.net/xterm
License: MIT AND X11 AND HPND AND CC-BY-4.0
BuildRequires: make
@ -22,6 +22,7 @@ Source3: https://invisible-island.net/archives/xterm/16colors.txt
Patch1: xterm-defaults.patch
Patch2: xterm-desktop.patch
Patch3: xterm-man-paths.patch
Patch4: xterm-configure-c99.patch
%global x11_app_defaults_dir %(pkg-config --variable appdefaultdir xt)
@ -44,6 +45,7 @@ indicate the current size of the window from which the command is run.
%patch 1 -p1 -b .defaults
%patch 2 -p1 -b .desk
%patch 3 -p1 -b .man-paths
%patch 4 -p1 -b .c99
for f in THANKS; do
iconv -f iso8859-1 -t utf8 -o ${f}{_,} &&
@ -105,6 +107,9 @@ install -m644 -p xterm.appdata.xml $RPM_BUILD_ROOT%{_datadir}/appdata
%{_mandir}/man1/resize.1*
%changelog
* Tue Nov 28 2023 Florian Weimer <fweimer@redhat.com> - 388-3
- Fix C compatibility issue in the configure script (#2251945)
* Wed Nov 01 2023 Tomas Korbar <tkorbar@redhat.com> - 388-2
- Add licenses to fully conform to SPDX