bracket the BeOS hack with #ifdef
This commit is contained in:
parent
aa29275a0b
commit
835289ac82
1 changed files with 2 additions and 4 deletions
|
@ -104,16 +104,14 @@ std::vector<language_def> get_languages()
|
|||
return res;
|
||||
}
|
||||
|
||||
// This solely exist to work around problems in the BeOS port.
|
||||
// I don't put an #ifdef yet to see first whether it fixes other
|
||||
// problems, like the MacOS-X ones.
|
||||
char* wesnoth_setlocale(int category, const char *locale)
|
||||
{
|
||||
#ifdef __BEOS__
|
||||
if(setenv ("LANG", locale, 1) == -1)
|
||||
std::cerr << "setenv LANG failed: " << strerror(errno);
|
||||
if(setenv ("LC_ALL", locale, 1) == -1)
|
||||
std::cerr << "setenv LC_ALL failed: " << strerror(errno);
|
||||
|
||||
#endif
|
||||
#ifdef __APPLE__
|
||||
if(setenv ("LANGUAGE", locale, 1) == -1)
|
||||
std::cerr << "setenv LANGUAGE failed: " << strerror(errno);
|
||||
|
|
Loading…
Add table
Reference in a new issue