=== Applying patches on top of PostgreSQL commit ID f8f4afe751fc75e1d3093fa634934018f440c29c === /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables is obsolete. Please consider migrating to /etc/jail.conf. Fri Oct 3 20:25:25 UTC 2025 On branch cf/5301 nothing to commit, working tree clean === using 'git am' to apply patch ./v16-0001-Control-ctype-behavior-internally-with-a-method-.patch === Applying: Control ctype behavior internally with a method table. Using index info to reconstruct a base tree... M src/backend/regex/regc_pg_locale.c M src/backend/utils/adt/like.c M src/backend/utils/adt/like_support.c M src/backend/utils/adt/pg_locale.c M src/backend/utils/adt/pg_locale_builtin.c M src/backend/utils/adt/pg_locale_icu.c M src/backend/utils/adt/pg_locale_libc.c M src/include/utils/pg_locale.h M src/tools/pgindent/typedefs.list Falling back to patching base and 3-way merge... Auto-merging src/tools/pgindent/typedefs.list Auto-merging src/include/utils/pg_locale.h Auto-merging src/backend/utils/adt/pg_locale_libc.c CONFLICT (content): Merge conflict in src/backend/utils/adt/pg_locale_libc.c Auto-merging src/backend/utils/adt/pg_locale_icu.c Auto-merging src/backend/utils/adt/pg_locale_builtin.c CONFLICT (content): Merge conflict in src/backend/utils/adt/pg_locale_builtin.c Auto-merging src/backend/utils/adt/pg_locale.c error: Failed to merge in the changes. hint: Use 'git am --show-current-patch=diff' to see the failed patch Patch failed at 0001 Control ctype behavior internally with a method table. 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 src/backend/utils/adt/pg_locale_builtin.c M src/backend/utils/adt/pg_locale_libc.c === using patch(1) to apply patch ./v16-0001-Control-ctype-behavior-internally-with-a-method-.patch === patching file src/backend/regex/regc_pg_locale.c Hunk #1 FAILED at 20. Hunk #2 FAILED at 228. Hunk #3 FAILED at 249. Hunk #4 FAILED at 267. Hunk #5 FAILED at 388. Hunk #6 FAILED at 738. 6 out of 6 hunks FAILED -- saving rejects to file src/backend/regex/regc_pg_locale.c.rej patching file src/backend/utils/adt/like.c Hunk #1 FAILED at 98. Hunk #2 FAILED at 209. Hunk #3 FAILED at 224. 3 out of 3 hunks FAILED -- saving rejects to file src/backend/utils/adt/like.c.rej patching file src/backend/utils/adt/like_support.c Hunk #1 FAILED at 1495. 1 out of 1 hunk FAILED -- saving rejects to file src/backend/utils/adt/like_support.c.rej patching file src/backend/utils/adt/pg_locale.c Hunk #1 FAILED at 80. Hunk #2 succeeded at 1070 with fuzz 2 (offset -23 lines). Hunk #3 FAILED at 1260. Hunk #4 succeeded at 1433 with fuzz 1 (offset -34 lines). 2 out of 4 hunks FAILED -- saving rejects to file src/backend/utils/adt/pg_locale.c.rej patching file src/backend/utils/adt/pg_locale_builtin.c Hunk #1 FAILED at 25. Hunk #2 FAILED at 77. Hunk #3 FAILED at 85. Hunk #4 FAILED at 103. Hunk #5 FAILED at 111. Hunk #6 succeeded at 201 with fuzz 2 (offset 82 lines). Hunk #7 FAILED at 254. 6 out of 7 hunks FAILED -- saving rejects to file src/backend/utils/adt/pg_locale_builtin.c.rej patching file src/backend/utils/adt/pg_locale_icu.c Hunk #1 FAILED at 48. Hunk #2 succeeded at 140 with fuzz 2 (offset 22 lines). Hunk #3 FAILED at 155. Hunk #4 FAILED at 225. Hunk #5 FAILED at 398. Hunk #6 FAILED at 418. Hunk #7 FAILED at 438. Hunk #8 FAILED at 458. 7 out of 8 hunks FAILED -- saving rejects to file src/backend/utils/adt/pg_locale_icu.c.rej patching file src/backend/utils/adt/pg_locale_libc.c Hunk #1 succeeded at 33 with fuzz 2. Hunk #2 FAILED at 83. Hunk #3 succeeded at 403 with fuzz 2 (offset 278 lines). Hunk #4 FAILED at 404. Hunk #5 succeeded at 1022 with fuzz 2 (offset 256 lines). 2 out of 5 hunks FAILED -- saving rejects to file src/backend/utils/adt/pg_locale_libc.c.rej patching file src/include/utils/pg_locale.h Hunk #1 succeeded at 14 with fuzz 2 (offset 2 lines). Hunk #2 succeeded at 132 with fuzz 1 (offset 53 lines). Hunk #3 FAILED at 150. Hunk #4 FAILED at 173. 2 out of 4 hunks FAILED -- saving rejects to file src/include/utils/pg_locale.h.rej patching file src/tools/pgindent/typedefs.list Hunk #1 FAILED at 1872. 1 out of 1 hunk FAILED -- saving rejects to file src/tools/pgindent/typedefs.list.rej Unstaged changes after reset: M src/backend/utils/adt/pg_locale.c M src/backend/utils/adt/pg_locale_builtin.c M src/backend/utils/adt/pg_locale_icu.c M src/backend/utils/adt/pg_locale_libc.c M src/include/utils/pg_locale.h Removing src/backend/regex/regc_pg_locale.c.rej Removing src/backend/utils/adt/like.c.rej Removing src/backend/utils/adt/like_support.c.rej Removing src/backend/utils/adt/pg_locale.c.rej Removing src/backend/utils/adt/pg_locale_builtin.c.rej Removing src/backend/utils/adt/pg_locale_icu.c.rej Removing src/backend/utils/adt/pg_locale_libc.c.rej Removing src/include/utils/pg_locale.h.rej Removing src/tools/pgindent/typedefs.list.rej === using 'git apply' to apply patch ./v16-0001-Control-ctype-behavior-internally-with-a-method-.patch === Applied patch to 'src/backend/regex/regc_pg_locale.c' cleanly. Applied patch to 'src/backend/utils/adt/like.c' cleanly. Applied patch to 'src/backend/utils/adt/like_support.c' cleanly. Applied patch to 'src/backend/utils/adt/pg_locale.c' cleanly. Applied patch to 'src/backend/utils/adt/pg_locale_builtin.c' with conflicts. Applied patch to 'src/backend/utils/adt/pg_locale_icu.c' cleanly. Applied patch to 'src/backend/utils/adt/pg_locale_libc.c' with conflicts. Applied patch to 'src/include/utils/pg_locale.h' cleanly. Applied patch to 'src/tools/pgindent/typedefs.list' cleanly. U src/backend/utils/adt/pg_locale_builtin.c U src/backend/utils/adt/pg_locale_libc.c diff --cc src/backend/utils/adt/pg_locale_builtin.c index 526ab3c6711,6fe090708ff..00000000000 --- a/src/backend/utils/adt/pg_locale_builtin.c +++ b/src/backend/utils/adt/pg_locale_builtin.c @@@ -111,20 -112,20 +111,38 @@@ strfold_builtin(char *dest, size_t dest static bool wc_isdigit_builtin(pg_wchar wc, pg_locale_t locale) +{ + return pg_u_isdigit(wc, !locale->builtin.casemap_full); +} + +static bool +wc_isalpha_builtin(pg_wchar wc, pg_locale_t locale) +{ + return pg_u_isalpha(wc); +} + +static bool ++<<<<<<< ours +wc_isalnum_builtin(pg_wchar wc, pg_locale_t locale) +{ + return pg_u_isalnum(wc, !locale->builtin.casemap_full); ++======= ++wc_isdigit_builtin(pg_wchar wc, pg_locale_t locale) + { + return pg_u_isdigit(wc, !locale->info.builtin.casemap_full); + } + + static bool + wc_isalpha_builtin(pg_wchar wc, pg_locale_t locale) + { + return pg_u_isalpha(wc); + } + + static bool + wc_isalnum_builtin(pg_wchar wc, pg_locale_t locale) + { + return pg_u_isalnum(wc, !locale->info.builtin.casemap_full); ++>>>>>>> theirs } static bool @@@ -154,7 -155,7 +172,11 @@@ wc_isprint_builtin(pg_wchar wc, pg_loca static bool wc_ispunct_builtin(pg_wchar wc, pg_locale_t locale) { ++<<<<<<< ours + return pg_u_ispunct(wc, !locale->builtin.casemap_full); ++======= + return pg_u_ispunct(wc, !locale->info.builtin.casemap_full); ++>>>>>>> theirs } static bool diff --cc src/backend/utils/adt/pg_locale_libc.c index f56b5dbdd37,be714db5283..00000000000 --- a/src/backend/utils/adt/pg_locale_libc.c +++ b/src/backend/utils/adt/pg_locale_libc.c @@@ -121,116 -121,116 +121,192 @@@ static size_t strupper_libc_mb(char *de static bool wc_isdigit_libc_sb(pg_wchar wc, pg_locale_t locale) { ++<<<<<<< ours + return isdigit_l((unsigned char) wc, locale->lt); ++======= + return isdigit_l((unsigned char) wc, locale->info.lt); ++>>>>>>> theirs } static bool wc_isalpha_libc_sb(pg_wchar wc, pg_locale_t locale) { ++<<<<<<< ours + return isalpha_l((unsigned char) wc, locale->lt); ++======= + return isalpha_l((unsigned char) wc, locale->info.lt); ++>>>>>>> theirs } static bool wc_isalnum_libc_sb(pg_wchar wc, pg_locale_t locale) { ++<<<<<<< ours + return isalnum_l((unsigned char) wc, locale->lt); ++======= + return isalnum_l((unsigned char) wc, locale->info.lt); ++>>>>>>> theirs } static bool wc_isupper_libc_sb(pg_wchar wc, pg_locale_t locale) { ++<<<<<<< ours + return isupper_l((unsigned char) wc, locale->lt); ++======= + return isupper_l((unsigned char) wc, locale->info.lt); ++>>>>>>> theirs } static bool wc_islower_libc_sb(pg_wchar wc, pg_locale_t locale) { ++<<<<<<< ours + return islower_l((unsigned char) wc, locale->lt); ++======= + return islower_l((unsigned char) wc, locale->info.lt); ++>>>>>>> theirs } static bool wc_isgraph_libc_sb(pg_wchar wc, pg_locale_t locale) { ++<<<<<<< ours + return isgraph_l((unsigned char) wc, locale->lt); ++======= + return isgraph_l((unsigned char) wc, locale->info.lt); ++>>>>>>> theirs } static bool wc_isprint_libc_sb(pg_wchar wc, pg_locale_t locale) { ++<<<<<<< ours + return isprint_l((unsigned char) wc, locale->lt); ++======= + return isprint_l((unsigned char) wc, locale->info.lt); ++>>>>>>> theirs } static bool wc_ispunct_libc_sb(pg_wchar wc, pg_locale_t locale) { ++<<<<<<< ours + return ispunct_l((unsigned char) wc, locale->lt); ++======= + return ispunct_l((unsigned char) wc, locale->info.lt); ++>>>>>>> theirs } static bool wc_isspace_libc_sb(pg_wchar wc, pg_locale_t locale) { ++<<<<<<< ours + return isspace_l((unsigned char) wc, locale->lt); ++======= + return isspace_l((unsigned char) wc, locale->info.lt); ++>>>>>>> theirs } static bool wc_isdigit_libc_mb(pg_wchar wc, pg_locale_t locale) { ++<<<<<<< ours + return iswdigit_l((wint_t) wc, locale->lt); ++======= + return iswdigit_l((wint_t) wc, locale->info.lt); ++>>>>>>> theirs } static bool wc_isalpha_libc_mb(pg_wchar wc, pg_locale_t locale) { ++<<<<<<< ours + return iswalpha_l((wint_t) wc, locale->lt); ++======= + return iswalpha_l((wint_t) wc, locale->info.lt); ++>>>>>>> theirs } static bool wc_isalnum_libc_mb(pg_wchar wc, pg_locale_t locale) { ++<<<<<<< ours + return iswalnum_l((wint_t) wc, locale->lt); ++======= + return iswalnum_l((wint_t) wc, locale->info.lt); ++>>>>>>> theirs } static bool wc_isupper_libc_mb(pg_wchar wc, pg_locale_t locale) { ++<<<<<<< ours + return iswupper_l((wint_t) wc, locale->lt); ++======= + return iswupper_l((wint_t) wc, locale->info.lt); ++>>>>>>> theirs } static bool wc_islower_libc_mb(pg_wchar wc, pg_locale_t locale) { ++<<<<<<< ours + return iswlower_l((wint_t) wc, locale->lt); ++======= + return iswlower_l((wint_t) wc, locale->info.lt); ++>>>>>>> theirs } static bool wc_isgraph_libc_mb(pg_wchar wc, pg_locale_t locale) { ++<<<<<<< ours + return iswgraph_l((wint_t) wc, locale->lt); ++======= + return iswgraph_l((wint_t) wc, locale->info.lt); ++>>>>>>> theirs } static bool wc_isprint_libc_mb(pg_wchar wc, pg_locale_t locale) { ++<<<<<<< ours + return iswprint_l((wint_t) wc, locale->lt); ++======= + return iswprint_l((wint_t) wc, locale->info.lt); ++>>>>>>> theirs } static bool wc_ispunct_libc_mb(pg_wchar wc, pg_locale_t locale) { ++<<<<<<< ours + return iswpunct_l((wint_t) wc, locale->lt); ++======= + return iswpunct_l((wint_t) wc, locale->info.lt); ++>>>>>>> theirs } static bool wc_isspace_libc_mb(pg_wchar wc, pg_locale_t locale) { ++<<<<<<< ours + return iswspace_l((wint_t) wc, locale->lt); ++======= + return iswspace_l((wint_t) wc, locale->info.lt); ++>>>>>>> theirs } static char char_tolower_libc(unsigned char ch, pg_locale_t locale) { Assert(pg_database_encoding_max_length() == 1); ++<<<<<<< ours + return tolower_l(ch, locale->lt); ++======= + return tolower_l(ch, locale->info.lt); ++>>>>>>> theirs } static bool @@@ -241,7 -241,7 +317,11 @@@ char_is_cased_libc(char ch, pg_locale_ if (is_multibyte && IS_HIGHBIT_SET(ch)) return true; else ++<<<<<<< ours + return isalpha_l((unsigned char) ch, locale->lt); ++======= + return isalpha_l((unsigned char) ch, locale->info.lt); ++>>>>>>> theirs } static pg_wchar @@@ -253,7 -253,7 +333,11 @@@ toupper_libc_sb(pg_wchar wc, pg_locale_ if (locale->is_default && wc <= (pg_wchar) 127) return pg_ascii_toupper((unsigned char) wc); if (wc <= (pg_wchar) UCHAR_MAX) ++<<<<<<< ours + return toupper_l((unsigned char) wc, locale->lt); ++======= + return toupper_l((unsigned char) wc, locale->info.lt); ++>>>>>>> theirs else return wc; } @@@ -267,7 -267,7 +351,11 @@@ toupper_libc_mb(pg_wchar wc, pg_locale_ if (locale->is_default && wc <= (pg_wchar) 127) return pg_ascii_toupper((unsigned char) wc); if (sizeof(wchar_t) >= 4 || wc <= (pg_wchar) 0xFFFF) ++<<<<<<< ours + return towupper_l((wint_t) wc, locale->lt); ++======= + return towupper_l((wint_t) wc, locale->info.lt); ++>>>>>>> theirs else return wc; } @@@ -281,7 -281,7 +369,11 @@@ tolower_libc_sb(pg_wchar wc, pg_locale_ if (locale->is_default && wc <= (pg_wchar) 127) return pg_ascii_tolower((unsigned char) wc); if (wc <= (pg_wchar) UCHAR_MAX) ++<<<<<<< ours + return tolower_l((unsigned char) wc, locale->lt); ++======= + return tolower_l((unsigned char) wc, locale->info.lt); ++>>>>>>> theirs else return wc; } @@@ -295,7 -295,7 +387,11 @@@ tolower_libc_mb(pg_wchar wc, pg_locale_ if (locale->is_default && wc <= (pg_wchar) 127) return pg_ascii_tolower((unsigned char) wc); if (sizeof(wchar_t) >= 4 || wc <= (pg_wchar) 0xFFFF) ++<<<<<<< ours + return towlower_l((wint_t) wc, locale->lt); ++======= + return towlower_l((wint_t) wc, locale->info.lt); ++>>>>>>> theirs else return wc; }