[前][次][番号順一覧][スレッド一覧]

ruby-changes:17445

From: usa <ko1@a...>
Date: Tue, 12 Oct 2010 16:06:03 +0900 (JST)
Subject: [ruby-changes:17445] Ruby:r29450 (trunk): * win32/win32.c (rb_w32_strerror): get English message first, instead

usa	2010-10-12 16:05:56 +0900 (Tue, 12 Oct 2010)

  New Revision: 29450

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=29450

  Log:
    * win32/win32.c (rb_w32_strerror): get English message first, instead
      of system default. see [ruby-dev:42358].
      [experimental]

  Modified files:
    trunk/ChangeLog
    trunk/win32/win32.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 29449)
+++ ChangeLog	(revision 29450)
@@ -1,3 +1,9 @@
+Tue Oct 12 16:04:37 2010  NAKAMURA Usaku  <usa@r...>
+
+	* win32/win32.c (rb_w32_strerror): get English message first, instead
+	  of system default. see [ruby-dev:42358].
+	  [experimental]
+
 Tue Oct 12 15:52:35 2010  NAKAMURA Usaku  <usa@r...>
 
 	* win32/win32.c (rb_w32_strerror): unmap some range of errno for
Index: win32/win32.c
===================================================================
--- win32/win32.c	(revision 29449)
+++ win32/win32.c	(revision 29450)
@@ -2214,6 +2214,10 @@
 	}
 #endif
 	if (FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM |
+			  FORMAT_MESSAGE_IGNORE_INSERTS, &source, e,
+			  MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US),
+			  buffer, sizeof(buffer), NULL) == 0 &&
+	    FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM |
 			  FORMAT_MESSAGE_IGNORE_INSERTS, &source, e, 0,
 			  buffer, sizeof(buffer), NULL) == 0)
 	    strlcpy(buffer, "Unknown Error", sizeof(buffer));

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]