From f525ee434e95ddffca6622bd00174c8dbc34f440 Mon Sep 17 00:00:00 2001 From: Peter Fordham Date: Tue, 6 Dec 2022 22:59:03 +0000 Subject: [PATCH] Port configure script to C99. https://fedoraproject.org/wiki/Toolchain/PortingToModernC Rebuilding configure with new autotools would also solve the problem. --- antlr-2.7.7-configure-c99.patch | 13 +++++++++++++ antlr.spec | 7 ++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 antlr-2.7.7-configure-c99.patch diff --git a/antlr-2.7.7-configure-c99.patch b/antlr-2.7.7-configure-c99.patch new file mode 100644 index 0000000..38b83bc --- /dev/null +++ b/antlr-2.7.7-configure-c99.patch @@ -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 diff --git a/antlr.spec b/antlr.spec index 8a5cf5f..c9f7f94 100644 --- a/antlr.spec +++ b/antlr.spec @@ -4,7 +4,7 @@ Summary: ANother Tool for Language Recognition Name: antlr Version: 2.7.7 -Release: 70%{?dist} +Release: 71%{?dist} License: ANTLR-PD URL: http://www.antlr2.org/ 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 Source4: generate-tarball.sh Patch1: %{name}-%{version}-newgcc.patch +Patch2: %{name}-%{version}-configure-c99.patch BuildRequires: gcc-c++ BuildRequires: make @@ -73,6 +74,7 @@ This package provides a static C++ library for parsers generated by ANTLR2. find . -name "*.jar" -exec rm -f {} \; cp -p %{SOURCE1} build.xml %patch1 +%patch2 # CRLF->LF sed -i 's/\r//' LICENSE.txt @@ -129,6 +131,9 @@ install -p -m 755 scripts/antlr-config $RPM_BUILD_ROOT%{_bindir} %license LICENSE.txt %changelog +* Tue Dec 06 2022 Peter Fordham - 2.7.7-71 +- Port configure script to C99. + * Wed Jul 20 2022 Fedora Release Engineering - 2.7.7-70 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild