setlocale(, "") now no longer returns an error, but returns "C" now; we don't

(yet) support any locale anyway, so evaluating LC_ALL and friends doesn't make
much sense at this point.
This fixes bug #1499.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22297 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2007-09-24 22:26:03 +00:00
parent 64fd7c1a00
commit 22c5a76dee

View File

@ -1,5 +1,5 @@
/*
* Copyright 2004-2006, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
* Copyright 2004-2007, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
* Distributed under the terms of the MIT License.
*/
@ -11,7 +11,7 @@
char *
setlocale(int category, const char *locale)
{
if (locale == NULL)
if (locale == NULL || !locale[0])
return "C";
// ToDo: this should check if liblocale.so is available and use its functions