=== Applying patches on top of PostgreSQL commit ID 1887d822f1428637c935b9f5e8be4a2a56fb77c7 === /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables is obsolete. Please consider migrating to /etc/jail.conf. Mon Mar 2 12:23:22 UTC 2026 On branch cf/6520 nothing to commit, working tree clean === using 'git am' to apply patch ./0001-Change-copyObject-to-use-typeof_unqual.patch === Applying: Change copyObject() to use typeof_unqual Using index info to reconstruct a base tree... M config/c-compiler.m4 M configure M configure.ac M meson.build M src/include/nodes/nodes.h M src/include/pg_config.h.in Falling back to patching base and 3-way merge... Auto-merging src/include/pg_config.h.in Auto-merging src/include/nodes/nodes.h Auto-merging meson.build CONFLICT (content): Merge conflict in meson.build Auto-merging configure.ac CONFLICT (content): Merge conflict in configure.ac Auto-merging configure CONFLICT (content): Merge conflict in configure Auto-merging config/c-compiler.m4 error: Failed to merge in the changes. hint: Use 'git am --show-current-patch=diff' to see the failed patch Patch failed at 0001 Change copyObject() to use typeof_unqual When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". Unstaged changes after reset: M config/c-compiler.m4 M configure M configure.ac M meson.build M src/include/nodes/nodes.h M src/include/pg_config.h.in === using patch(1) to apply patch ./0001-Change-copyObject-to-use-typeof_unqual.patch === patching file config/c-compiler.m4 Hunk #1 succeeded at 221 with fuzz 1 (offset 29 lines). patching file configure Hunk #1 succeeded at 15132 (offset 213 lines). patching file configure.ac Hunk #1 FAILED at 1677. 1 out of 1 hunk FAILED -- saving rejects to file configure.ac.rej patching file meson.build Hunk #1 succeeded at 2846 with fuzz 2 (offset -5 lines). patching file src/include/nodes/nodes.h patching file src/include/pg_config.h.in Hunk #1 succeeded at 461 (offset 7 lines). Hunk #2 succeeded at 811 (offset 1 line). Unstaged changes after reset: M config/c-compiler.m4 M configure M meson.build M src/include/nodes/nodes.h M src/include/pg_config.h.in Removing configure.ac.rej === using 'git apply' to apply patch ./0001-Change-copyObject-to-use-typeof_unqual.patch === Applied patch to 'config/c-compiler.m4' cleanly. Applied patch to 'configure' with conflicts. Applied patch to 'configure.ac' with conflicts. Applied patch to 'meson.build' with conflicts. Applied patch to 'src/include/nodes/nodes.h' cleanly. Applied patch to 'src/include/pg_config.h.in' cleanly. U configure U configure.ac U meson.build diff --cc configure index b30b98a586e,b72123635c5..00000000000 --- a/configure +++ b/configure @@@ -15078,19 -14919,13 +15078,29 @@@ _ACEO fi fi ++<<<<<<< ours +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ typeof" >&5 +$as_echo_n "checking for C++ typeof... " >&6; } +if ${pgac_cv_cxx_typeof+:} false; then : + $as_echo_n "(cached) " >&6 +else + pgac_cv_cxx_typeof=no +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +for pgac_kw in typeof __typeof__; do ++======= + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof_unqual" >&5 + $as_echo_n "checking for typeof_unqual... " >&6; } + if ${pgac_cv_c_typeof_unqual+:} false; then : + $as_echo_n "(cached) " >&6 + else + pgac_cv_c_typeof_unqual=no + for pgac_kw in typeof_unqual __typeof_unqual__; do ++>>>>>>> theirs cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@@ -15105,29 -14940,23 +15115,49 @@@ return y return 0; } _ACEOF ++<<<<<<< ours +if ac_fn_cxx_try_compile "$LINENO"; then : + pgac_cv_cxx_typeof=$pgac_kw +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$pgac_cv_cxx_typeof" != no && break +done +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_cxx_typeof" >&5 +$as_echo "$pgac_cv_cxx_typeof" >&6; } +if test "$pgac_cv_cxx_typeof" != no; then + +$as_echo "#define HAVE_CXX_TYPEOF 1" >>confdefs.h + + if test "$pgac_cv_cxx_typeof" != typeof; then + +cat >>confdefs.h <<_ACEOF +#define pg_cxx_typeof $pgac_cv_cxx_typeof ++======= + if ac_fn_c_try_compile "$LINENO"; then : + pgac_cv_c_typeof_unqual=$pgac_kw + fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$pgac_cv_c_typeof_unqual" != no && break + done + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof_unqual" >&5 + $as_echo "$pgac_cv_c_typeof_unqual" >&6; } + if test "$pgac_cv_c_typeof_unqual" != no; then + + $as_echo "#define HAVE_TYPEOF_UNQUAL 1" >>confdefs.h + + if test "$pgac_cv_c_typeof_unqual" != typeof_unqual; then + + cat >>confdefs.h <<_ACEOF + #define typeof_unqual $pgac_cv_c_typeof_unqual ++>>>>>>> theirs _ACEOF fi diff --cc configure.ac index f4e3bd307c8,42f48fc8d19..00000000000 --- a/configure.ac +++ b/configure.ac @@@ -1732,7 -1677,7 +1732,11 @@@ PGAC_PRINTF_ARCHETYP PGAC_CXX_PRINTF_ARCHETYPE PGAC_C_STATEMENT_EXPRESSIONS PGAC_C_TYPEOF ++<<<<<<< ours +PGAC_CXX_TYPEOF ++======= + PGAC_C_TYPEOF_UNQUAL ++>>>>>>> theirs PGAC_C_TYPES_COMPATIBLE PGAC_C_BUILTIN_CONSTANT_P PGAC_C_BUILTIN_OP_OVERFLOW diff --cc meson.build index ddf5172982f,9b916878207..00000000000 --- a/meson.build +++ b/meson.build @@@ -2953,10 -2851,10 +2953,17 @@@ int main(void endif endforeach ++<<<<<<< ours +# Check if the C++ compiler understands typeof or a variant. +if have_cxx + foreach kw : ['typeof', '__typeof__'] + if cxx.compiles(''' ++======= + # Check if the C compiler understands typeof_unqual or a variant. Define + # HAVE_TYPEOF_UNQUAL if so, and define 'typeof_unqual' to the actual key word. + foreach kw : ['typeof_unqual', '__typeof_unqual__'] + if cc.compiles(''' ++>>>>>>> theirs int main(void) { int x = 0; @@@ -2965,18 -2863,17 +2972,32 @@@ return y; } '''.format(kw), ++<<<<<<< ours + name: 'C++ ' + kw, + args: test_c_args, include_directories: postgres_inc) + + cdata.set('HAVE_CXX_TYPEOF', 1) + if kw != 'typeof' + cdata.set('pg_cxx_typeof', kw) + endif + + break + endif + endforeach +endif ++======= + name: kw, + args: test_c_args, include_directories: postgres_inc) + + cdata.set('HAVE_TYPEOF_UNQUAL', 1) + if kw != 'typeof_unqual' + cdata.set('typeof_unqual', kw) + endif + + break + endif + endforeach ++>>>>>>> theirs # MSVC doesn't cope well with defining restrict to __restrict, the