C99 compatibility fixes for the configure script
Related to: <https://fedoraproject.org/wiki/Changes/PortingToModernC> <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
This commit is contained in:
parent
2f6338330a
commit
c079ae3eb0
51
emacs-configure-c99-1.patch
Normal file
51
emacs-configure-c99-1.patch
Normal file
@ -0,0 +1,51 @@
|
||||
Remove obsolete a.out linker test. It contains an implicit
|
||||
function declaration, leading to false positives.
|
||||
|
||||
Submitted upstream:
|
||||
|
||||
<https://lists.gnu.org/archive/html/emacs-devel/2022-12/msg01019.html>
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 660784347bbc0dcd..cc390d40b33a1d8f 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -2493,39 +2493,6 @@ if test "${HAVE_X11}" = "yes"; then
|
||||
export LD_RUN_PATH
|
||||
fi
|
||||
|
||||
- if test "${opsys}" = "gnu-linux"; then
|
||||
- AC_CACHE_CHECK([whether X on GNU/Linux needs -b to link], [emacs_cv_b_link],
|
||||
- [AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],
|
||||
- [[XOpenDisplay ("foo");]])],
|
||||
- [xgnu_linux_first_failure=no],
|
||||
- [xgnu_linux_first_failure=yes])
|
||||
- if test "${xgnu_linux_first_failure}" = "yes"; then
|
||||
- OLD_CPPFLAGS="$CPPFLAGS"
|
||||
- OLD_LIBS="$LIBS"
|
||||
- CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
|
||||
- LIBS="$LIBS -b i486-linuxaout"
|
||||
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],
|
||||
- [[XOpenDisplay ("foo");]])],
|
||||
- [xgnu_linux_second_failure=no],
|
||||
- [xgnu_linux_second_failure=yes])
|
||||
- if test "${xgnu_linux_second_failure}" = "yes"; then
|
||||
- # If we get the same failure with -b, there is no use adding -b.
|
||||
- # So leave it out. This plays safe.
|
||||
- emacs_cv_b_link=no
|
||||
- else
|
||||
- emacs_cv_b_link=yes
|
||||
- fi
|
||||
- CPPFLAGS=$OLD_CPPFLAGS
|
||||
- LIBS=$OLD_LIBS
|
||||
- else
|
||||
- emacs_cv_b_link=no
|
||||
- fi])
|
||||
- if test "x$emacs_cv_b_link" = xyes ; then
|
||||
- LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
|
||||
- C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
|
||||
- fi
|
||||
- fi
|
||||
-
|
||||
# Reportedly, some broken Solaris systems have XKBlib.h but are missing
|
||||
# header files included from there.
|
||||
AC_CACHE_CHECK([for Xkb], [emacs_cv_xkb],
|
19
emacs-configure-c99-2.patch
Normal file
19
emacs-configure-c99-2.patch
Normal file
@ -0,0 +1,19 @@
|
||||
Avoid an implicit declaration of the malloc function. Improves C99
|
||||
compatibility.
|
||||
|
||||
Submitted upstream:
|
||||
|
||||
<https://lists.gnu.org/archive/html/emacs-devel/2022-12/msg01020.html>
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index cc390d40b33a1d8f..7be08de740cfc486 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -4590,6 +4590,7 @@ AC_CACHE_CHECK([whether signals can be handled on alternate stack],
|
||||
[emacs_cv_alternate_stack],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[#include <signal.h>
|
||||
+ #include <stdlib.h>
|
||||
]],
|
||||
[[stack_t ss;
|
||||
struct sigaction sa;
|
@ -5,7 +5,7 @@ Summary: GNU Emacs text editor
|
||||
Name: emacs
|
||||
Epoch: 1
|
||||
Version: 28.1
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
License: GPLv3+ and CC0
|
||||
URL: http://www.gnu.org/software/emacs/
|
||||
Source0: https://ftp.gnu.org/gnu/emacs/emacs-%{version}.tar.xz
|
||||
@ -25,6 +25,8 @@ Patch1: emacs-spellchecker.patch
|
||||
Patch2: emacs-system-crypto-policies.patch
|
||||
Patch3: emacs-libdir-vs-systemd.patch
|
||||
Patch4: emacs-pdmp-fingerprint.patch
|
||||
Patch5: emacs-configure-c99-1.patch
|
||||
Patch6: emacs-configure-c99-2.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: atk-devel
|
||||
@ -205,6 +207,8 @@ cp -p %{SOURCE3} lib/
|
||||
%patch2 -p1 -b .system-crypto-policies
|
||||
%patch3 -p1 -b .libdir-vs-systemd
|
||||
%patch4 -p1 -b .pdmp-fingerprint
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
autoconf
|
||||
|
||||
grep -v "tetris.elc" lisp/Makefile.in > lisp/Makefile.in.new \
|
||||
@ -512,6 +516,9 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/*.desktop
|
||||
%{_includedir}/emacs-module.h
|
||||
|
||||
%changelog
|
||||
* Fri Dec 23 2022 Florian Weimer <fweimer@redhat.com> - 1:28.1-4
|
||||
- C99 compatibility fixes for the configure script
|
||||
|
||||
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:28.1-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user