summaryrefslogtreecommitdiff
path: root/src/backend/tsearch/ts_locale.c
diff options
context:
space:
mode:
authorTom Lane2017-09-22 15:00:58 +0000
committerTom Lane2017-09-22 15:00:58 +0000
commit85feb77aa09cda9ff3e12cf95c757c499dc25343 (patch)
tree313b8bb0eb9cf4cff63a92dd5345d9d5c51b3b3a /src/backend/tsearch/ts_locale.c
parente6023ee7fa73a2d9a2d7524f63584844b2291def (diff)
Assume wcstombs(), towlower(), and sibling functions are always present.
These functions are required by SUS v2, which is our minimum baseline for Unix platforms, and are present on all interesting Windows versions as well. Even our oldest buildfarm members have them. Thus, we were not testing the "!USE_WIDE_UPPER_LOWER" code paths, which explains why the bug fixed in commit e6023ee7f escaped detection. Per discussion, there seems to be no more real-world value in maintaining this option. Hence, remove the configure-time tests for wcstombs() and towlower(), remove the USE_WIDE_UPPER_LOWER symbol, and remove all the !USE_WIDE_UPPER_LOWER code. There's not actually all that much of the latter, but simplifying the #if nests is a win in itself. Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/backend/tsearch/ts_locale.c')
-rw-r--r--src/backend/tsearch/ts_locale.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/backend/tsearch/ts_locale.c b/src/backend/tsearch/ts_locale.c
index 1aa3e237338..7a6f0bc7221 100644
--- a/src/backend/tsearch/ts_locale.c
+++ b/src/backend/tsearch/ts_locale.c
@@ -21,8 +21,6 @@
static void tsearch_readline_callback(void *arg);
-#ifdef USE_WIDE_UPPER_LOWER
-
int
t_isdigit(const char *ptr)
{
@@ -86,7 +84,6 @@ t_isprint(const char *ptr)
return iswprint((wint_t) character[0]);
}
-#endif /* USE_WIDE_UPPER_LOWER */
/*
@@ -244,17 +241,12 @@ char *
lowerstr_with_len(const char *str, int len)
{
char *out;
-
-#ifdef USE_WIDE_UPPER_LOWER
Oid collation = DEFAULT_COLLATION_OID; /* TODO */
pg_locale_t mylocale = 0; /* TODO */
-#endif
if (len == 0)
return pstrdup("");
-#ifdef USE_WIDE_UPPER_LOWER
-
/*
* Use wide char code only when max encoding length > 1 and ctype != C.
* Some operating systems fail with multi-byte encodings and a C locale.
@@ -300,7 +292,6 @@ lowerstr_with_len(const char *str, int len)
Assert(wlen < len);
}
else
-#endif /* USE_WIDE_UPPER_LOWER */
{
const char *ptr = str;
char *outptr;