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:
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
** Copyright 2004, Axel Dörfler, [email protected]. All rights reserved.
|
* Copyright 2004-2006, Axel Dörfler, [email protected]. All rights reserved.
|
||||||
** Distributed under the terms of the Haiku License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
@@ -11,6 +11,9 @@
|
|||||||
char *
|
char *
|
||||||
setlocale(int category, const char *locale)
|
setlocale(int category, const char *locale)
|
||||||
{
|
{
|
||||||
|
if (locale == NULL)
|
||||||
|
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