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

Commit 6f0a664

Browse files
author
Marina Polyakova
committed
ICU: do not include ICU headers for definitions only
1 parent a56df4b commit 6f0a664

File tree

4 files changed

+16
-3
lines changed

4 files changed

+16
-3
lines changed

src/backend/access/transam/xlog.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
#include <sys/time.h>
2323
#include <unistd.h>
2424

25+
#ifdef USE_ICU
26+
#include <unicode/uversion.h>
27+
#endif
28+
2529
#include "access/clog.h"
2630
#include "access/commit_ts.h"
2731
#include "access/multixact.h"

src/bin/initdb/initdb.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@
5555
#include <signal.h>
5656
#include <time.h>
5757

58+
#ifdef USE_ICU
59+
#include <unicode/uloc.h>
60+
#endif
61+
5862
#ifdef HAVE_SHM_OPEN
5963
#include "sys/mman.h"
6064
#endif

src/include/port.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -485,11 +485,12 @@ extern char *get_collation_actual_version(char collprovider,
485485
#endif
486486

487487
#ifdef USE_ICU
488-
#include <unicode/ucol.h>
489-
490488
#define ICU_ROOT_LOCALE "root"
491489

492-
extern UCollator *open_collator(const char *collate);
490+
/* Users of this must import unicode/ucol.h too. */
491+
struct UCollator;
492+
extern struct UCollator *open_collator(const char *collate);
493+
493494
extern char * get_icu_language_tag(const char *localename);
494495
extern const char *get_icu_collate(const char *locale, const char *langtag);
495496
#ifdef WIN32

src/port/chklocale.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727
#include "common/pg_collation_fn_common.h"
2828
#include "mb/pg_wchar.h"
2929

30+
#ifdef USE_ICU
31+
#include <unicode/ucol.h>
32+
#endif
33+
3034
/*
3135
* In backend, we will use palloc/pfree. In frontend, use malloc/free.
3236
*/

0 commit comments

Comments
 (0)