From d94a5a026b4c671f0a9c53d7d20dfdfa9fc9be53 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Duraffort?= Date: Fri, 1 Aug 2008 12:17:46 +0200 Subject: [PATCH] Revert "Prefer setenv to putenv (evenmore with local variables)." This commit build compilation on window. This reverts commit d632ffe1a6f5e6cea5dd796105e1708cdb0b3631. --- src/libvlc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libvlc.c b/src/libvlc.c index 842aa7270b..407dabeeeb 100644 --- a/src/libvlc.c +++ b/src/libvlc.c @@ -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 ); -- 2.39.2