@@ -1554,7 +1554,9 @@ str_tolower(const char *buff, size_t nbytes, Oid collid)
1554
1554
#endif /* USE_WIDE_UPPER_LOWER */
1555
1555
else
1556
1556
{
1557
+ #ifdef HAVE_LOCALE_T
1557
1558
pg_locale_t mylocale = 0 ;
1559
+ #endif
1558
1560
char * p ;
1559
1561
1560
1562
if (collid != DEFAULT_COLLATION_OID )
@@ -1570,7 +1572,9 @@ str_tolower(const char *buff, size_t nbytes, Oid collid)
1570
1572
errmsg ("could not determine which collation to use for lower() function" ),
1571
1573
errhint ("Use the COLLATE clause to set the collation explicitly." )));
1572
1574
}
1575
+ #ifdef HAVE_LOCALE_T
1573
1576
mylocale = pg_newlocale_from_collation (collid );
1577
+ #endif
1574
1578
}
1575
1579
1576
1580
result = pnstrdup (buff , nbytes );
@@ -1675,7 +1679,9 @@ str_toupper(const char *buff, size_t nbytes, Oid collid)
1675
1679
#endif /* USE_WIDE_UPPER_LOWER */
1676
1680
else
1677
1681
{
1682
+ #ifdef HAVE_LOCALE_T
1678
1683
pg_locale_t mylocale = 0 ;
1684
+ #endif
1679
1685
char * p ;
1680
1686
1681
1687
if (collid != DEFAULT_COLLATION_OID )
@@ -1691,7 +1697,9 @@ str_toupper(const char *buff, size_t nbytes, Oid collid)
1691
1697
errmsg ("could not determine which collation to use for upper() function" ),
1692
1698
errhint ("Use the COLLATE clause to set the collation explicitly." )));
1693
1699
}
1700
+ #ifdef HAVE_LOCALE_T
1694
1701
mylocale = pg_newlocale_from_collation (collid );
1702
+ #endif
1695
1703
}
1696
1704
1697
1705
result = pnstrdup (buff , nbytes );
@@ -1820,7 +1828,9 @@ str_initcap(const char *buff, size_t nbytes, Oid collid)
1820
1828
#endif /* USE_WIDE_UPPER_LOWER */
1821
1829
else
1822
1830
{
1831
+ #ifdef HAVE_LOCALE_T
1823
1832
pg_locale_t mylocale = 0 ;
1833
+ #endif
1824
1834
char * p ;
1825
1835
1826
1836
if (collid != DEFAULT_COLLATION_OID )
@@ -1836,7 +1846,9 @@ str_initcap(const char *buff, size_t nbytes, Oid collid)
1836
1846
errmsg ("could not determine which collation to use for initcap() function" ),
1837
1847
errhint ("Use the COLLATE clause to set the collation explicitly." )));
1838
1848
}
1849
+ #ifdef HAVE_LOCALE_T
1839
1850
mylocale = pg_newlocale_from_collation (collid );
1851
+ #endif
1840
1852
}
1841
1853
1842
1854
result = pnstrdup (buff , nbytes );
0 commit comments