setlocale() now returns "C" in case the locale is set to NULL.

This allows current VLC to run without the need of exporting one of the
LC_ALL/LC_CTYPE/LANG environment variables (it used to crash without this).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16571 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2006-03-02 18:34:13 +00:00
parent 22b4c9cace
commit 5370f52b15

View File

@ -1,7 +1,7 @@
/*
** Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
** Distributed under the terms of the Haiku License.
*/
* Copyright 2004-2006, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#include <locale.h>
@ -11,6 +11,9 @@
char *
setlocale(int category, const char *locale)
{
if (locale == NULL)
return "C";
// ToDo: this should check if liblocale.so is available and use its functions
return NULL;
}