Port configure script to C99.

https://fedoraproject.org/wiki/Toolchain/PortingToModernC
Rebuilding configure with new autotools would also solve the problem.
This commit is contained in:
Peter Fordham 2022-12-06 22:59:03 +00:00 committed by Florian Weimer
parent 27b41ff38f
commit f525ee434e
2 changed files with 19 additions and 1 deletions

View File

@ -0,0 +1,13 @@
--- configure
+++ configure
@@ -4697,8 +4697,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

View File

@ -4,7 +4,7 @@
Summary: ANother Tool for Language Recognition Summary: ANother Tool for Language Recognition
Name: antlr Name: antlr
Version: 2.7.7 Version: 2.7.7
Release: 70%{?dist} Release: 71%{?dist}
License: ANTLR-PD License: ANTLR-PD
URL: http://www.antlr2.org/ URL: http://www.antlr2.org/
ExclusiveArch: %{java_arches} ExclusiveArch: %{java_arches}
@ -17,6 +17,7 @@ Source3: http://repo2.maven.org/maven2/antlr/antlr/%{version}/%{name}-%{ve
# Repack the tarball without prebuilt binaries of unknown origin # Repack the tarball without prebuilt binaries of unknown origin
Source4: generate-tarball.sh Source4: generate-tarball.sh
Patch1: %{name}-%{version}-newgcc.patch Patch1: %{name}-%{version}-newgcc.patch
Patch2: %{name}-%{version}-configure-c99.patch
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: make BuildRequires: make
@ -73,6 +74,7 @@ This package provides a static C++ library for parsers generated by ANTLR2.
find . -name "*.jar" -exec rm -f {} \; find . -name "*.jar" -exec rm -f {} \;
cp -p %{SOURCE1} build.xml cp -p %{SOURCE1} build.xml
%patch1 %patch1
%patch2
# CRLF->LF # CRLF->LF
sed -i 's/\r//' LICENSE.txt sed -i 's/\r//' LICENSE.txt
@ -129,6 +131,9 @@ install -p -m 755 scripts/antlr-config $RPM_BUILD_ROOT%{_bindir}
%license LICENSE.txt %license LICENSE.txt
%changelog %changelog
* Tue Dec 06 2022 Peter Fordham <peter.fordham@gmail.com> - 2.7.7-71
- Port configure script to C99.
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.7-70 * Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.7-70
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild