]> git.sesse.net Git - vlc/commitdiff
Revert "Prefer setenv to putenv (evenmore with local variables)."
authorRémi Duraffort <ivoire@videolan.org>
Fri, 1 Aug 2008 10:17:46 +0000 (12:17 +0200)
committerRémi Duraffort <ivoire@videolan.org>
Fri, 1 Aug 2008 10:17:46 +0000 (12:17 +0200)
This commit build compilation on window.

This reverts commit d632ffe1a6f5e6cea5dd796105e1708cdb0b3631.

src/libvlc.c

index 842aa7270b95c376e8dec51088184c9f8476348d..407dabeeeb70c6b65a5cfe414f7359928a3f9406 100644 (file)
@@ -1206,7 +1206,10 @@ static void SetLanguage ( const char *psz_lang )
      * the language at runtime under eg. Windows. Beware that this
      * makes the environment unconsistent when libvlc is unloaded and
      * should probably be moved to a safer place like vlc.c. */
-    setenv( "LC_ALL", psz_lang, 1 );
+    static char psz_lcall[20];
+    snprintf( psz_lcall, 19, "LC_ALL=%s", psz_lang );
+    psz_lcall[19] = '\0';
+    putenv( psz_lcall );
 #endif
 
     setlocale( LC_ALL, psz_lang );