ruby-changes:21573
From: usa <ko1@a...>
Date: Fri, 4 Nov 2011 00:19:36 +0900 (JST)
Subject: [ruby-changes:21573] usa:r33622 (trunk): * encoding.c (rb_locale_charmap): ignore calling nl_langinfo_codeset()
usa 2011-11-04 00:19:24 +0900 (Fri, 04 Nov 2011) New Revision: 33622 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=33622 Log: * encoding.c (rb_locale_charmap): ignore calling nl_langinfo_codeset() on Windows except cygwin. [experimental] Modified files: trunk/ChangeLog trunk/encoding.c Index: encoding.c =================================================================== --- encoding.c (revision 33621) +++ encoding.c (revision 33622) @@ -1446,9 +1446,12 @@ #if defined NO_LOCALE_CHARMAP return rb_usascii_str_new2("ASCII-8BIT"); #elif defined _WIN32 || defined __CYGWIN__ + const char *codeset = 0; + char cp[sizeof(int) * 3 + 4]; +# ifdef __CYGWIN__ const char *nl_langinfo_codeset(void); - const char *codeset = nl_langinfo_codeset(); - char cp[sizeof(int) * 3 + 4]; + codeset = nl_langinfo_codeset(); +# endif if (!codeset) { UINT codepage = GetConsoleCP(); if(!codepage) codepage = GetACP(); Index: ChangeLog =================================================================== --- ChangeLog (revision 33621) +++ ChangeLog (revision 33622) @@ -1,3 +1,8 @@ +Thu Nov 3 23:53:04 2011 NAKAMURA Usaku <usa@r...> + + * encoding.c (rb_locale_charmap): ignore calling nl_langinfo_codeset() + on Windows except cygwin. [experimental] + Thu Nov 3 22:45:09 2011 Tanaka Akira <akr@f...> * ext/socket/socket.c (rsock_socketpair0): extracted from -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/