public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/tin] epel10.2: Port configure script to C99 (#2155159)
@ 2026-08-23 23:20 Florian Weimer
0 siblings, 0 replies; only message in thread
From: Florian Weimer @ 2026-08-23 23:20 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/tin
Branch : epel10.2
Commit : bbfb5a569a97cde8d4ca95f44979070ad2f57bd0
Author : Florian Weimer <fweimer@redhat.com>
Date : 2022-12-20T10:02:23+01:00
Stats : +112/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/tin/c/bbfb5a569a97cde8d4ca95f44979070ad2f57bd0?branch=epel10.2
Log:
Port configure script to C99 (#2155159)
Related to:
<https://fedoraproject.org/wiki/Changes/PortingToModernC>
<https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
---
diff --git a/tin-configure-c99.patch b/tin-configure-c99.patch
new file mode 100644
index 0000000..7732ef7
--- /dev/null
+++ b/tin-configure-c99.patch
@@ -0,0 +1,110 @@
+Add missing #include directives to pick up additional prototypes.
+Improves C99 compatibility.
+
+diff --git a/aclocal.m4 b/aclocal.m4
+index 009f04313c9c95ab..938adcfdf101e995 100644
+--- a/aclocal.m4
++++ b/aclocal.m4
+@@ -2165,8 +2165,17 @@ AC_MSG_CHECKING([if application can dump core])
+ AC_CACHE_VAL(cf_cv_corefile,[
+ AC_TRY_RUN([
+ #include <signal.h>
++#ifdef HAVE_STDLIB_H
++#include <stdlib.h>
++#endif
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#ifdef HAVE_SYS_WAIT_H
++#include <sys/wait.h>
++#endif
++#ifdef HAVE_UNISTD_H
++#include <unistd.h>
++#endif
+ int found()
+ {
+ struct stat sb;
+@@ -3319,6 +3328,9 @@ AC_DEFUN([CF_FUNC_FORK],
+ [AC_MSG_CHECKING([for fork])
+ AC_CACHE_VAL(cf_cv_func_fork,[
+ AC_TRY_RUN([
++#ifdef HAVE_UNISTD_H
++#include <unistd.h>
++#endif
+ int main()
+ {
+ if (fork() < 0)
+@@ -3465,6 +3477,9 @@ AC_MSG_CHECKING(if the system function returns usable child-status)
+ AC_CACHE_VAL(cf_cv_system_status,[
+ AC_TRY_RUN([
+ #include <stdio.h>
++#ifdef HAVE_STDLIB_H
++#include <stdlib.h>
++#endif
+ #include <signal.h>
+ #if HAVE_SYS_WAIT_H
+ #include <sys/wait.h>
+@@ -3495,7 +3510,11 @@ int main()
+ ],
+ [cf_cv_system_status=no],
+ [AC_TRY_RUN(
+- [int main() { ${cf_cv_main_return:-return}(system("exit 23") != (23 << 8)); }],
++ [
++#ifdef HAVE_STDLIB_H
++#include <stdlib.h>
++#endif
++int main() { ${cf_cv_main_return:-return}(system("exit 23") != (23 << 8)); }],
+ [cf_cv_system_status=yes],
+ [cf_cv_system_status=unknown],
+ [cf_cv_system_status=unknown])],
+diff --git a/configure b/configure
+index 7c988bb7eda53289..777362456568bb1f 100755
+--- a/configure
++++ b/configure
+@@ -26361,6 +26361,9 @@ else
+ #line 26361 "configure"
+ #include "confdefs.h"
+
++#ifdef HAVE_UNISTD_H
++#include <unistd.h>
++#endif
+ int main()
+ {
+ if (fork() < 0)
+@@ -27366,6 +27369,9 @@ else
+ #include "confdefs.h"
+
+ #include <stdio.h>
++#ifdef HAVE_STDLIB_H
++#include <stdlib.h>
++#endif
+ #include <signal.h>
+ #if HAVE_SYS_WAIT_H
+ #include <sys/wait.h>
+@@ -27417,6 +27423,9 @@ else
+ cat >"conftest.$ac_ext" <<_ACEOF
+ #line 27418 "configure"
+ #include "confdefs.h"
++#ifdef HAVE_STDLIB_H
++#include <stdlib.h>
++#endif
+ int main() { ${cf_cv_main_return:-return}(system("exit 23") != (23 << 8)); }
+ _ACEOF
+ rm -f "conftest$ac_exeext"
+@@ -27764,8 +27773,17 @@ else
+ #include "confdefs.h"
+
+ #include <signal.h>
++#ifdef HAVE_STDLIB_H
++#include <stdlib.h>
++#endif
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#ifdef HAVE_SYS_WAIT_H
++#include <sys/wait.h>
++#endif
++#ifdef HAVE_UNISTD_H
++#include <unistd.h>
++#endif
+ int found()
+ {
+ struct stat sb;
diff --git a/tin.spec b/tin.spec
index 5972d02..6d46d70 100644
--- a/tin.spec
+++ b/tin.spec
@@ -7,6 +7,7 @@ URL: http://www.tin.org/
Source0: ftp://ftp.tin.org/pub/news/clients/tin/stable/tin-%{version}.tar.xz
Source1: ftp://ftp.tin.org/pub/news/clients/tin/stable/tin-%{version}.tar.xz.sign
Source2: tin-pgp-key-0x5A49550EB490B4D1.txt
+Patch0: tin-configure-c99.patch
BuildRequires: make
BuildRequires: %{_bindir}/ispell
BuildRequires: gcc-c++
@@ -31,7 +32,7 @@ workring=${workdir}/keyring.gpg
gpg1 --homedir=${workdir} --pgp2 --yes --output="${workring}" --dearmor %{S:2}
gpg1 --homedir=${workdir} --pgp2 --verify --keyring="${workring}" %{S:1} %{S:0}
rm -r ${workdir}
-%setup -q
+%autosetup -p1
%build
%configure \
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-23 23:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-23 23:20 [rpms/tin] epel10.2: Port configure script to C99 (#2155159) Florian Weimer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox