Commit d632ffe1 authored by Rémi Duraffort's avatar Rémi Duraffort

Prefer setenv to putenv (evenmore with local variables).

parent 10fcb9f9
...@@ -1212,10 +1212,7 @@ static void SetLanguage ( const char *psz_lang ) ...@@ -1212,10 +1212,7 @@ static void SetLanguage ( const char *psz_lang )
* the language at runtime under eg. Windows. Beware that this * the language at runtime under eg. Windows. Beware that this
* makes the environment unconsistent when libvlc is unloaded and * makes the environment unconsistent when libvlc is unloaded and
* should probably be moved to a safer place like vlc.c. */ * should probably be moved to a safer place like vlc.c. */
static char psz_lcall[20]; setenv( "LC_ALL", psz_lang, 1 );
snprintf( psz_lcall, 19, "LC_ALL=%s", psz_lang );
psz_lcall[19] = '\0';
putenv( psz_lcall );
#endif #endif
setlocale( LC_ALL, psz_lang ); setlocale( LC_ALL, psz_lang );
......
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