@@ -185,7 +185,6 @@ static intlocale_date_order(const char *locale);
185
185
static bool check_locale_name (const char * locale );
186
186
static bool check_locale_encoding (const char * locale ,int encoding );
187
187
static void setlocales (void );
188
- static void strreplace (char * str ,char * needle ,char * replacement );
189
188
static char * localemap (char * locale );
190
189
static void usage (const char * progname );
191
190
@@ -2252,6 +2251,8 @@ check_locale_encoding(const char *locale, int user_enc)
2252
2251
return true;
2253
2252
}
2254
2253
2254
+ #ifdef WIN32
2255
+
2255
2256
/*
2256
2257
* Replace 'needle' with 'replacement' in 'str' . Note that the replacement
2257
2258
* is done in-place, so 'replacement' must be shorter than 'needle'.
@@ -2272,6 +2273,8 @@ strreplace(char *str, char *needle, char *replacement)
2272
2273
}
2273
2274
}
2274
2275
2276
+ #endif /* WIN32 */
2277
+
2275
2278
/*
2276
2279
* Windows has a problem with locale names that have a dot or apostrophe in
2277
2280
* the country name. For example:
@@ -2321,7 +2324,7 @@ localemap(char *locale)
2321
2324
strreplace (locale ,"Chinese_Macau S.A.R..950" ,"ZHM" );
2322
2325
strreplace (locale ,"Chinese (Traditional)_Macao S.A.R..950" ,"ZHM" );
2323
2326
strreplace (locale ,"Chinese_Macao S.A.R..950" ,"ZHM" );
2324
- #endif
2327
+ #endif /* WIN32 */
2325
2328
2326
2329
return locale ;
2327
2330
}