diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2017-09-21 14:42:10 -0400 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2017-09-22 09:26:38 -0400 |
commit | e6023ee7fa73a2d9a2d7524f63584844b2291def (patch) | |
tree | 2497619855d8c8d83a5db6b82c6435ffab02f51a /src | |
parent | 885cab58115a5af9484926ddee8dca3dc0106c1e (diff) | |
download | postgresql-e6023ee7fa73a2d9a2d7524f63584844b2291def.tar.gz postgresql-e6023ee7fa73a2d9a2d7524f63584844b2291def.zip |
Fix build with !USE_WIDE_UPPER_LOWER
The placement of the ifdef blocks in formatting.c was pretty bogus, so
the code failed to compile if USE_WIDE_UPPER_LOWER was not defined.
Reported-by: Peter Geoghegan <pg@bowt.ie>
Reported-by: Noah Misch <noah@leadboat.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/utils/adt/formatting.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/backend/utils/adt/formatting.c b/src/backend/utils/adt/formatting.c index 46f45f66541..2bf484cda31 100644 --- a/src/backend/utils/adt/formatting.c +++ b/src/backend/utils/adt/formatting.c @@ -1528,7 +1528,6 @@ str_tolower(const char *buff, size_t nbytes, Oid collid) { result = asc_tolower(buff, nbytes); } -#ifdef USE_WIDE_UPPER_LOWER else { pg_locale_t mylocale = 0; @@ -1566,6 +1565,7 @@ str_tolower(const char *buff, size_t nbytes, Oid collid) else #endif { +#ifdef USE_WIDE_UPPER_LOWER if (pg_database_encoding_max_length() > 1) { wchar_t *workspace; @@ -1603,8 +1603,8 @@ str_tolower(const char *buff, size_t nbytes, Oid collid) wchar2char(result, workspace, result_size, mylocale); pfree(workspace); } -#endif /* USE_WIDE_UPPER_LOWER */ else +#endif /* USE_WIDE_UPPER_LOWER */ { char *p; @@ -1652,7 +1652,6 @@ str_toupper(const char *buff, size_t nbytes, Oid collid) { result = asc_toupper(buff, nbytes); } -#ifdef USE_WIDE_UPPER_LOWER else { pg_locale_t mylocale = 0; @@ -1690,6 +1689,7 @@ str_toupper(const char *buff, size_t nbytes, Oid collid) else #endif { +#ifdef USE_WIDE_UPPER_LOWER if (pg_database_encoding_max_length() > 1) { wchar_t *workspace; @@ -1727,8 +1727,8 @@ str_toupper(const char *buff, size_t nbytes, Oid collid) wchar2char(result, workspace, result_size, mylocale); pfree(workspace); } -#endif /* USE_WIDE_UPPER_LOWER */ else +#endif /* USE_WIDE_UPPER_LOWER */ { char *p; @@ -1777,7 +1777,6 @@ str_initcap(const char *buff, size_t nbytes, Oid collid) { result = asc_initcap(buff, nbytes); } -#ifdef USE_WIDE_UPPER_LOWER else { pg_locale_t mylocale = 0; @@ -1815,6 +1814,7 @@ str_initcap(const char *buff, size_t nbytes, Oid collid) else #endif { +#ifdef USE_WIDE_UPPER_LOWER if (pg_database_encoding_max_length() > 1) { wchar_t *workspace; @@ -1864,8 +1864,8 @@ str_initcap(const char *buff, size_t nbytes, Oid collid) wchar2char(result, workspace, result_size, mylocale); pfree(workspace); } -#endif /* USE_WIDE_UPPER_LOWER */ else +#endif /* USE_WIDE_UPPER_LOWER */ { char *p; |