diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2017-07-08 12:42:25 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2017-07-08 12:42:25 -0400 |
commit | ec4073f64130b40fabaa1b38ad402babda3a48eb (patch) | |
tree | 4c9b9e4671173c1602935e5d94f4b0de57133f45 | |
parent | 46e91519425c5e98380c672d1b5c3acf18c5e565 (diff) | |
download | postgresql-ec4073f64130b40fabaa1b38ad402babda3a48eb.tar.gz postgresql-ec4073f64130b40fabaa1b38ad402babda3a48eb.zip |
Avoid unreferenced-function warning on low-functionality platforms.
On platforms lacking both locale_t and ICU, collationcmds.c failed
to make any use of its static function is_all_ascii(), thus probably
drawing a compiler warning. Oversight in my commit ddb5fdc06.
Per buildfarm member gaur.
-rw-r--r-- | src/backend/commands/collationcmds.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/backend/commands/collationcmds.c b/src/backend/commands/collationcmds.c index 418f7342c77..b6c14c920df 100644 --- a/src/backend/commands/collationcmds.c +++ b/src/backend/commands/collationcmds.c @@ -357,6 +357,12 @@ pg_collation_actual_version(PG_FUNCTION_ARGS) } +/* will we use "locale -a" in pg_import_system_collations? */ +#if defined(HAVE_LOCALE_T) && !defined(WIN32) +#define READ_LOCALE_A_OUTPUT +#endif + +#if defined(READ_LOCALE_A_OUTPUT) || defined(USE_ICU) /* * Check a string to see if it is pure ASCII */ @@ -371,11 +377,7 @@ is_all_ascii(const char *str) } return true; } - -/* will we use "locale -a" in pg_import_system_collations? */ -#if defined(HAVE_LOCALE_T) && !defined(WIN32) -#define READ_LOCALE_A_OUTPUT -#endif +#endif /* READ_LOCALE_A_OUTPUT || USE_ICU */ #ifdef READ_LOCALE_A_OUTPUT /* |