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
81a40b1a98
commit
6a4b46d7c9
35
raptor2-configure-c99.patch
Normal file
35
raptor2-configure-c99.patch
Normal file
@ -0,0 +1,35 @@
|
||||
Include <stdio.h> for printf in __FUNCTION__ check. Otherwise, the
|
||||
check will fail with compilers which do not implement implicit
|
||||
function declarations (a C feature that was removed in 1999 from the
|
||||
language), no matter if the compiler supports FUNCTION or not.
|
||||
|
||||
Submitted upstream: <https://github.com/dajobe/raptor/pull/56>
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index b0091892a210361d..08501ac8ed5e4fe1 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -13747,6 +13747,8 @@ esac
|
||||
$as_echo_n "checking whether __FUNCTION__ is available... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
+
|
||||
+#include <stdio.h>
|
||||
int main() { printf(__FUNCTION__); }
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 10ff870805b82e65..40a8548b6406866a 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -312,7 +312,9 @@ AC_C_BIGENDIAN
|
||||
AC_C_INLINE
|
||||
|
||||
AC_MSG_CHECKING(whether __FUNCTION__ is available)
|
||||
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main() { printf(__FUNCTION__); }])],
|
||||
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
|
||||
+#include <stdio.h>
|
||||
+int main() { printf(__FUNCTION__); }])],
|
||||
[AC_DEFINE([HAVE___FUNCTION__], [1], [Is __FUNCTION__ available])
|
||||
AC_MSG_RESULT(yes)],
|
||||
[AC_MSG_RESULT(no)])
|
||||
@ -2,7 +2,7 @@
|
||||
Summary: RDF Parser Toolkit for Redland
|
||||
Name: raptor2
|
||||
Version: 2.0.15
|
||||
Release: 34%{?dist}
|
||||
Release: 35%{?dist}
|
||||
|
||||
License: GPLv2+ or LGPLv2+ or ASL 2.0
|
||||
Source: http://download.librdf.org/source/raptor2-%{version}.tar.gz
|
||||
@ -15,6 +15,7 @@ Patch1: 0001-Calcualte-max-nspace-declarations-correctly-for-XML-.patch
|
||||
Patch2: 0001-CVE-2020-25713-raptor2-malformed-input-file-can-lead.patch
|
||||
|
||||
## upstreamable patches
|
||||
Patch3: raptor2-configure-c99.patch
|
||||
|
||||
BuildRequires: make
|
||||
BuildRequires: gcc-c++
|
||||
@ -101,6 +102,9 @@ make check
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Dec 8 2022 Florian Weimer <fweimer@redhat.com> - 2.0.15-35
|
||||
- Port configure script to C99
|
||||
|
||||
* Mon Aug 01 2022 Frantisek Zatloukal <fzatlouk@redhat.com> - 2.0.15-34
|
||||
- Rebuilt for ICU 71.1
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user