0002-Remove-useless-configure-check.patch

text/plain

Filename: 0002-Remove-useless-configure-check.patch
Type: text/plain
Part: 1
Message: meson: Fix missing name arguments of cc.compiles() calls

Patch

Format: format-patch
Series: patch 0002
Subject: Remove useless configure check
File+
config/c-compiler.m4 1 1
configure 1 1
meson.build 1 1
From a1eb3feba6ebb687cf19a14156f5debf536fbccb Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Sun, 29 Dec 2024 14:40:04 +0100
Subject: [PATCH 2/2] Remove useless configure check

The test for "decltype" as variant of "typeof" apparently never worked
(see commit 3582b223d49), so remove it.
---
 config/c-compiler.m4 | 2 +-
 configure            | 2 +-
 meson.build          | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/config/c-compiler.m4 b/config/c-compiler.m4
index e112fd45d48..8534cc54c13 100644
--- a/config/c-compiler.m4
+++ b/config/c-compiler.m4
@@ -142,7 +142,7 @@ fi])# PGAC_C_STATIC_ASSERT
 AC_DEFUN([PGAC_C_TYPEOF],
 [AC_CACHE_CHECK(for typeof, pgac_cv_c_typeof,
 [pgac_cv_c_typeof=no
-for pgac_kw in typeof __typeof__ decltype; do
+for pgac_kw in typeof __typeof__; do
   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
 [int x = 0;
 $pgac_kw(x) y;
diff --git a/configure b/configure
index 518c33b73a9..cfe62e80ba8 100755
--- a/configure
+++ b/configure
@@ -14344,7 +14344,7 @@ if ${pgac_cv_c_typeof+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   pgac_cv_c_typeof=no
-for pgac_kw in typeof __typeof__ decltype; do
+for pgac_kw in typeof __typeof__; do
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
diff --git a/meson.build b/meson.build
index cb642b1f2fb..045ce800667 100644
--- a/meson.build
+++ b/meson.build
@@ -2540,7 +2540,7 @@ endif
 
 # Check if the C compiler understands typeof or a variant.  Define
 # HAVE_TYPEOF if so, and define 'typeof' to the actual key word.
-foreach kw : ['typeof', '__typeof__', 'decltype']
+foreach kw : ['typeof', '__typeof__']
   if cc.compiles('''
 int main(void)
 {
-- 
2.47.1