Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 7167e05

Browse files
committed
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
1 parent 32a7deb commit 7167e05

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

src/backend/utils/adt/pg_locale_icu.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,18 @@
1414
#ifdef USE_ICU
1515
#include <unicode/ucnv.h>
1616
#include <unicode/ustring.h>
17+
18+
/*
19+
* ucol_strcollUTF8() was introduced in ICU 50, but it is buggy before ICU 53.
20+
* (see
21+
* <https://www.postgresql.org/message-id/flat/f1438ec6-22aa-4029-9a3b-26f79d330e72%40manitou-mail.org>)
22+
*/
23+
#if U_ICU_VERSION_MAJOR_NUM >= 53
24+
#define HAVE_UCOL_STRCOLLUTF8 1
25+
#else
26+
#undef HAVE_UCOL_STRCOLLUTF8
27+
#endif
28+
1729
#endif
1830

1931
#include "access/htup_details.h"

src/include/utils/pg_locale.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,6 @@
1616
#include <unicode/ucol.h>
1717
#endif
1818

19-
#ifdef USE_ICU
20-
/*
21-
* ucol_strcollUTF8() was introduced in ICU 50, but it is buggy before ICU 53.
22-
* (see
23-
* <https://www.postgresql.org/message-id/flat/f1438ec6-22aa-4029-9a3b-26f79d330e72%40manitou-mail.org>)
24-
*/
25-
#if U_ICU_VERSION_MAJOR_NUM >= 53
26-
#define HAVE_UCOL_STRCOLLUTF8 1
27-
#else
28-
#undef HAVE_UCOL_STRCOLLUTF8
29-
#endif
30-
#endif
31-
3219
/* use for libc locale names */
3320
#define LOCALE_NAME_BUFLEN 128
3421

0 commit comments

Comments
 (0)