From: Jeff Davis Date: Tue, 3 Dec 2024 19:32:14 +0000 (-0800) Subject: Move check for ucol_strcollUTF8 to pg_locale_icu.c X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=7167e05fc7d191bfd59f16d0852705d8f4a3fa08;p=users%2Fc2main%2Fpostgres.git Move check for ucol_strcollUTF8 to pg_locale_icu.c The result of the check is only used by pg_locale_icu.c. Author: Andreas Karlsson Discussion: https://postgr.es/m/4548a168-62cd-457b-8d06-9ba7b985c477@proxel.se --- diff --git a/src/backend/utils/adt/pg_locale_icu.c b/src/backend/utils/adt/pg_locale_icu.c index 73eb430d75..2c6b950ec1 100644 --- a/src/backend/utils/adt/pg_locale_icu.c +++ b/src/backend/utils/adt/pg_locale_icu.c @@ -14,6 +14,18 @@ #ifdef USE_ICU #include #include + +/* + * ucol_strcollUTF8() was introduced in ICU 50, but it is buggy before ICU 53. + * (see + * ) + */ +#if U_ICU_VERSION_MAJOR_NUM >= 53 +#define HAVE_UCOL_STRCOLLUTF8 1 +#else +#undef HAVE_UCOL_STRCOLLUTF8 +#endif + #endif #include "access/htup_details.h" diff --git a/src/include/utils/pg_locale.h b/src/include/utils/pg_locale.h index 4d2262b39a..776f8f6f2f 100644 --- a/src/include/utils/pg_locale.h +++ b/src/include/utils/pg_locale.h @@ -16,19 +16,6 @@ #include #endif -#ifdef USE_ICU -/* - * ucol_strcollUTF8() was introduced in ICU 50, but it is buggy before ICU 53. - * (see - * ) - */ -#if U_ICU_VERSION_MAJOR_NUM >= 53 -#define HAVE_UCOL_STRCOLLUTF8 1 -#else -#undef HAVE_UCOL_STRCOLLUTF8 -#endif -#endif - /* use for libc locale names */ #define LOCALE_NAME_BUFLEN 128