]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Hardcode typeof_unqual to __typeof_unqual__ for clang
authorPeter Eisentraut <peter@eisentraut.org>
Tue, 17 Mar 2026 15:44:43 +0000 (16:44 +0100)
committerPeter Eisentraut <peter@eisentraut.org>
Tue, 17 Mar 2026 15:44:43 +0000 (16:44 +0100)
A new attempt was made in 63275ce84d2 to make typeof_unqual work on all
configurations of CC and CLANG. This re-introduced an old problem
though, where CLANG would only support __typeof_unqual__ but the
configure check for CC detected support for typeof_unqual.

This fixes that by always defining typeof_unqual as __typeof_unqual__
under clang.

Author: Jelte Fennema-Nio <postgres@jeltef.nl>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://www.postgresql.org/message-id/flat/92f9750f-c7f6-42d8-9a4a-85a3cbe808f3%40eisentraut.org

src/include/c.h

index 8987a121d6a8b90d564bd1db0a1a9d1bad763a77..fd6b093bb3a7a75f51c28d22be8b7c345faf225d 100644 (file)
@@ -444,6 +444,9 @@ extern "C++"
 #if defined(__clang__)
 #if __clang_major__ < 19
 #undef HAVE_TYPEOF_UNQUAL
+#else
+#undef typeof_unqual
+#define typeof_unqual __typeof_unqual__
 #endif
 #endif                                                 /* __clang__ */