Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite6023ee

Browse files
committed
Fix build with !USE_WIDE_UPPER_LOWER
The placement of the ifdef blocks in formatting.c was pretty bogus, sothe 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>
1 parent885cab5 commite6023ee

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

‎src/backend/utils/adt/formatting.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1528,7 +1528,6 @@ str_tolower(const char *buff, size_t nbytes, Oid collid)
15281528
{
15291529
result=asc_tolower(buff,nbytes);
15301530
}
1531-
#ifdefUSE_WIDE_UPPER_LOWER
15321531
else
15331532
{
15341533
pg_locale_tmylocale=0;
@@ -1566,6 +1565,7 @@ str_tolower(const char *buff, size_t nbytes, Oid collid)
15661565
else
15671566
#endif
15681567
{
1568+
#ifdefUSE_WIDE_UPPER_LOWER
15691569
if (pg_database_encoding_max_length()>1)
15701570
{
15711571
wchar_t*workspace;
@@ -1603,8 +1603,8 @@ str_tolower(const char *buff, size_t nbytes, Oid collid)
16031603
wchar2char(result,workspace,result_size,mylocale);
16041604
pfree(workspace);
16051605
}
1606-
#endif/* USE_WIDE_UPPER_LOWER */
16071606
else
1607+
#endif/* USE_WIDE_UPPER_LOWER */
16081608
{
16091609
char*p;
16101610

@@ -1652,7 +1652,6 @@ str_toupper(const char *buff, size_t nbytes, Oid collid)
16521652
{
16531653
result=asc_toupper(buff,nbytes);
16541654
}
1655-
#ifdefUSE_WIDE_UPPER_LOWER
16561655
else
16571656
{
16581657
pg_locale_tmylocale=0;
@@ -1690,6 +1689,7 @@ str_toupper(const char *buff, size_t nbytes, Oid collid)
16901689
else
16911690
#endif
16921691
{
1692+
#ifdefUSE_WIDE_UPPER_LOWER
16931693
if (pg_database_encoding_max_length()>1)
16941694
{
16951695
wchar_t*workspace;
@@ -1727,8 +1727,8 @@ str_toupper(const char *buff, size_t nbytes, Oid collid)
17271727
wchar2char(result,workspace,result_size,mylocale);
17281728
pfree(workspace);
17291729
}
1730-
#endif/* USE_WIDE_UPPER_LOWER */
17311730
else
1731+
#endif/* USE_WIDE_UPPER_LOWER */
17321732
{
17331733
char*p;
17341734

@@ -1777,7 +1777,6 @@ str_initcap(const char *buff, size_t nbytes, Oid collid)
17771777
{
17781778
result=asc_initcap(buff,nbytes);
17791779
}
1780-
#ifdefUSE_WIDE_UPPER_LOWER
17811780
else
17821781
{
17831782
pg_locale_tmylocale=0;
@@ -1815,6 +1814,7 @@ str_initcap(const char *buff, size_t nbytes, Oid collid)
18151814
else
18161815
#endif
18171816
{
1817+
#ifdefUSE_WIDE_UPPER_LOWER
18181818
if (pg_database_encoding_max_length()>1)
18191819
{
18201820
wchar_t*workspace;
@@ -1864,8 +1864,8 @@ str_initcap(const char *buff, size_t nbytes, Oid collid)
18641864
wchar2char(result,workspace,result_size,mylocale);
18651865
pfree(workspace);
18661866
}
1867-
#endif/* USE_WIDE_UPPER_LOWER */
18681867
else
1868+
#endif/* USE_WIDE_UPPER_LOWER */
18691869
{
18701870
char*p;
18711871

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp