[vlc-commits] Get rid of putenv()
Rémi Denis-Courmont
git at videolan.org
Sat Feb 12 21:35:32 CET 2011
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Feb 12 22:35:17 2011 +0200| [958441a878264c65273f6a49f576b375b0966ea1] | committer: Rémi Denis-Courmont
Get rid of putenv()
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=958441a878264c65273f6a49f576b375b0966ea1
---
src/libvlc.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/libvlc.c b/src/libvlc.c
index 53775ce..b82d720 100644
--- a/src/libvlc.c
+++ b/src/libvlc.c
@@ -1152,9 +1152,8 @@ 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. */
- static char psz_lcall[20];
- snprintf( psz_lcall, sizeof(psz_lcall), "LC_ALL=%s", psz_lang );
- putenv( psz_lcall );
+ setenv( "LC_ALL", psz_lang, 1 );
+
#endif
setlocale( LC_ALL, psz_lang );
More information about the vlc-commits
mailing list