Fix configure check and 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
4ecbcaf3f3
commit
76a914813d
|
@ -0,0 +1,34 @@
|
|||
commit 5d33446145e7602c8348972dea1bb4e88d84d27f
|
||||
Author: Arjun Shankar <arjun@redhat.com>
|
||||
Date: Tue May 2 13:58:18 2023 +0200
|
||||
|
||||
configure: Fix __builtin_mul_overflow() compiler support check
|
||||
|
||||
`UINT64_C(UINT64_MAX)' is redundant and leads to a compilation error
|
||||
since UINT64_C involves token concatenation, causing the check to fail.
|
||||
|
||||
This change fixes that by using UINT64_MAX directly, and including the
|
||||
appropriate header.
|
||||
|
||||
Signed-off-by: Arjun Shankar <arjun@redhat.com>
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index e7f59f8e6d..7b6446a1ab 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1247,8 +1247,10 @@ AC_LINK_IFELSE(
|
||||
AC_MSG_CHECKING([compiler support for __builtin_mul_overflow()])
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
- [[#include <limits.h>]],
|
||||
- [[return (__builtin_mul_overflow(UINT64_C(UINT64_MAX), UINT64_C(UINT64_MAX), &(uint64_t){ 0 }));]]
|
||||
+ [[#include <limits.h>
|
||||
+ #include <stdint.h>
|
||||
+ ]],
|
||||
+ [[return (__builtin_mul_overflow(UINT64_MAX, UINT64_MAX, &(uint64_t){ 0 }));]]
|
||||
)],
|
||||
[AC_MSG_RESULT([yes])
|
||||
AC_DEFINE([HAVE_BUILTIN_MUL_OVERFLOW], [1], [define if the compiler supports __builtin_mul_overflow().])
|
||||
--
|
||||
2.40.1
|
||||
|
|
@ -94,6 +94,8 @@ Source49: named-chroot.files
|
|||
# Red Hat specific documentation is not relevant to upstream
|
||||
Patch1: bind-9.16-redhat_doc.patch
|
||||
|
||||
Patch2: bind-9.19-configure-c99.patch
|
||||
|
||||
%{?systemd_ordering}
|
||||
Requires: coreutils
|
||||
Requires(pre): shadow-utils
|
||||
|
|
Loading…
Reference in New Issue