Allow setting the local to "C" (i.e. not changing it at all). This makes
programs happy, that do that unconditionally (e.g. some Perl test). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24334 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -6,14 +6,16 @@
|
|||||||
|
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
|
||||||
char *
|
char *
|
||||||
setlocale(int category, const char *locale)
|
setlocale(int category, const char *locale)
|
||||||
{
|
{
|
||||||
if (locale == NULL || !locale[0])
|
if (locale == NULL || !locale[0] || strcmp(locale, "C") == 0)
|
||||||
return "C";
|
return "C";
|
||||||
|
|
||||||
// ToDo: this should check if liblocale.so is available and use its functions
|
// TODO: this should check if liblocale.so is available and use its
|
||||||
|
// functions.
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user