Commit f7705ea7 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

setlocale() (very) early, so we may have a chance to use nl_langinfo

before initializing LibVLC (refs #838)
parent 0699b600
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <vlc/vlc.h> #include <vlc/vlc.h>
#include <stdio.h> /* fprintf() */ #include <stdio.h> /* fprintf() */
#include <stdlib.h> /* putenv(), strtol(), */ #include <stdlib.h> /* putenv(), strtol(), */
#include <locale.h>
/***************************************************************************** /*****************************************************************************
...@@ -57,6 +58,8 @@ int main( int i_argc, char *ppsz_argv[] ) ...@@ -57,6 +58,8 @@ int main( int i_argc, char *ppsz_argv[] )
{ {
int i_ret; int i_ret;
setlocale (LC_ALL, "");
#ifndef __APPLE__ #ifndef __APPLE__
/* This clutters OSX GUI error logs */ /* This clutters OSX GUI error logs */
fprintf( stderr, "VLC media player %s\n", VLC_Version() ); fprintf( stderr, "VLC media player %s\n", VLC_Version() );
...@@ -145,7 +148,7 @@ int main( int i_argc, char *ppsz_argv[] ) ...@@ -145,7 +148,7 @@ int main( int i_argc, char *ppsz_argv[] )
} }
else else
{ {
ppsz_argv[i] = ""; ppsz_argv[i] = strdup ("");
} }
} }
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment