Skip to content

Commit ec4073f

Browse files
committed
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 ddb5fdc. Per buildfarm member gaur.
1 parent 46e9151 commit ec4073f

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/backend/commands/collationcmds.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,12 @@ pg_collation_actual_version(PG_FUNCTION_ARGS)
357357
}
358358

359359

360+
/* will we use "locale -a" in pg_import_system_collations? */
361+
#if defined(HAVE_LOCALE_T) && !defined(WIN32)
362+
#define READ_LOCALE_A_OUTPUT
363+
#endif
364+
365+
#if defined(READ_LOCALE_A_OUTPUT) || defined(USE_ICU)
360366
/*
361367
* Check a string to see if it is pure ASCII
362368
*/
@@ -371,11 +377,7 @@ is_all_ascii(const char *str)
371377
}
372378
return true;
373379
}
374-
375-
/* will we use "locale -a" in pg_import_system_collations? */
376-
#if defined(HAVE_LOCALE_T) && !defined(WIN32)
377-
#define READ_LOCALE_A_OUTPUT
378-
#endif
380+
#endif /* READ_LOCALE_A_OUTPUT || USE_ICU */
379381

380382
#ifdef READ_LOCALE_A_OUTPUT
381383
/*

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy