main: initialize locale (LC_CTYPE)
Initialize libc's locale functions. Currently, we are only interested in LC_CTYPE (character classification), because this is what is used by GLib's g_get_charset().
This commit is contained in:
parent
2a1a37107f
commit
b35ca9e5c4
|
@ -53,6 +53,10 @@
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_LOCALE
|
||||||
|
#include <locale.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#define SYSTEM_CONFIG_FILE_LOCATION "/etc/mpd.conf"
|
#define SYSTEM_CONFIG_FILE_LOCATION "/etc/mpd.conf"
|
||||||
#define USER_CONFIG_FILE_LOCATION "/.mpdconf"
|
#define USER_CONFIG_FILE_LOCATION "/.mpdconf"
|
||||||
|
|
||||||
|
@ -382,6 +386,11 @@ int main(int argc, char *argv[])
|
||||||
Options options;
|
Options options;
|
||||||
clock_t start;
|
clock_t start;
|
||||||
|
|
||||||
|
#ifdef HAVE_LOCALE
|
||||||
|
/* initialize locale */
|
||||||
|
setlocale(LC_CTYPE,"");
|
||||||
|
#endif
|
||||||
|
|
||||||
/* enable GLib's thread safety code */
|
/* enable GLib's thread safety code */
|
||||||
g_thread_init(NULL);
|
g_thread_init(NULL);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue