mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* thread_win32.c (w32_error): get English message first, instead
of system default. see [ruby-core:32765]. [experimental] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8022385ba4
commit
c94c6a1a16
2 changed files with 20 additions and 7 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
Wed Oct 13 12:10:02 2010 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
|
* thread_win32.c (w32_error): get English message first, instead
|
||||||
|
of system default. see [ruby-core:32765].
|
||||||
|
[experimental]
|
||||||
|
|
||||||
Wed Oct 13 11:04:03 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Wed Oct 13 11:04:03 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* debug.c (ruby_set_debug_option): define always for binary
|
* debug.c (ruby_set_debug_option): define always for binary
|
||||||
|
|
|
@ -67,13 +67,20 @@ static void
|
||||||
w32_error(const char *func)
|
w32_error(const char *func)
|
||||||
{
|
{
|
||||||
LPVOID lpMsgBuf;
|
LPVOID lpMsgBuf;
|
||||||
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
|
if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
|
||||||
FORMAT_MESSAGE_FROM_SYSTEM |
|
FORMAT_MESSAGE_FROM_SYSTEM |
|
||||||
FORMAT_MESSAGE_IGNORE_INSERTS,
|
FORMAT_MESSAGE_IGNORE_INSERTS,
|
||||||
NULL,
|
NULL,
|
||||||
GetLastError(),
|
GetLastError(),
|
||||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
|
MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US),
|
||||||
(LPTSTR) & lpMsgBuf, 0, NULL);
|
(LPTSTR) & lpMsgBuf, 0, NULL) == 0)
|
||||||
|
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
|
||||||
|
FORMAT_MESSAGE_FROM_SYSTEM |
|
||||||
|
FORMAT_MESSAGE_IGNORE_INSERTS,
|
||||||
|
NULL,
|
||||||
|
GetLastError(),
|
||||||
|
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
|
||||||
|
(LPTSTR) & lpMsgBuf, 0, NULL);
|
||||||
rb_bug("%s: %s", func, (char*)lpMsgBuf);
|
rb_bug("%s: %s", func, (char*)lpMsgBuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue