Port configure script to C99
Related to: <https://fedoraproject.org/wiki/Changes/PortingToModernC> <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
This commit is contained in:
parent
a8d44efc10
commit
334f632b16
62
spamassassin-configure-c99.patch
Normal file
62
spamassassin-configure-c99.patch
Normal file
@ -0,0 +1,62 @@
|
||||
Avoid implicit function declarations in the configure script.
|
||||
The undeclared exit function comes from autoconf-generated code.
|
||||
The SHUT_RD and h_errno checks are specific to the spamassassin
|
||||
package.
|
||||
|
||||
Submitted upstream: <https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8076>
|
||||
|
||||
diff --git a/spamc/configure b/spamc/configure
|
||||
index d8e5dcf8a21d6a3d..5472d2b009fb9083 100755
|
||||
--- a/spamc/configure
|
||||
+++ b/spamc/configure
|
||||
@@ -2624,8 +2624,8 @@ main ()
|
||||
for (i = 0; i < 256; i++)
|
||||
if (XOR (islower (i), ISLOWER (i))
|
||||
|| toupper (i) != TOUPPER (i))
|
||||
- exit(2);
|
||||
- exit (0);
|
||||
+ return 2;
|
||||
+ return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest$ac_exeext
|
||||
@@ -3553,6 +3553,7 @@ _ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
+#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
int
|
||||
@@ -4252,6 +4253,7 @@ _ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
+#include <stdio.h>
|
||||
#include <netdb.h>
|
||||
int
|
||||
main ()
|
||||
diff --git a/spamc/configure.in b/spamc/configure.in
|
||||
index 42cc998412075086..96769105ef640bc8 100644
|
||||
--- a/spamc/configure.in
|
||||
+++ b/spamc/configure.in
|
||||
@@ -47,7 +47,8 @@ dnl ----------------------------------------------------------------------
|
||||
|
||||
AC_CACHE_CHECK([for SHUT_RD],
|
||||
shutrd, [
|
||||
- AC_TRY_COMPILE([#include <sys/types.h>
|
||||
+ AC_TRY_COMPILE([#include <stdio.h>
|
||||
+#include <sys/types.h>
|
||||
#include <sys/socket.h>],
|
||||
[printf ("%d", SHUT_RD); return 0;],
|
||||
[shutrd=yes],
|
||||
@@ -89,7 +90,8 @@ dnl ----------------------------------------------------------------------
|
||||
|
||||
AC_CACHE_CHECK([for h_errno],
|
||||
herrno, [
|
||||
- AC_TRY_COMPILE([#include <netdb.h>],
|
||||
+ AC_TRY_COMPILE([#include <stdio.h>
|
||||
+#include <netdb.h>],
|
||||
[printf ("%d", h_errno); return 0;],
|
||||
[herrno=yes],
|
||||
[herrno=no]),
|
@ -60,7 +60,7 @@ Summary: Spam filter for email which can be invoked from mail delivery agents
|
||||
Name: spamassassin
|
||||
Version: 3.4.6
|
||||
#Release: 0.8.%%{prerev}%%{?dist}
|
||||
Release: 7%{?dist}
|
||||
Release: 8%{?dist}
|
||||
License: ASL 2.0
|
||||
URL: https://spamassassin.apache.org/
|
||||
Source0: https://www.apache.org/dist/%{name}/source/%{real_name}-%{version}.tar.bz2
|
||||
@ -90,6 +90,7 @@ Source17: sa-update.timer
|
||||
# Switch to using gnupg2 instead of gnupg1
|
||||
Patch0: spamassassin-3.3.2-gnupg2.patch
|
||||
Patch1: spamassassin-3.4.1-add-logfile-homedir-options.patch
|
||||
Patch2: spamassassin-configure-c99.patch
|
||||
# end of patches
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
||||
%if %{use_systemd} == 0
|
||||
@ -209,6 +210,7 @@ To filter spam for all users, add that line to /etc/procmailrc
|
||||
# Patches 0-99 are RH specific
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
# end of patches
|
||||
|
||||
echo "RHEL=%{?rhel} FEDORA=%{?fedora}"
|
||||
@ -388,6 +390,9 @@ exit 0
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Sun Nov 27 2022 Florian Weimer <fweimer@redhat.com> - 3.4.6-8
|
||||
- Port configure script to C99
|
||||
|
||||
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.6-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user