mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* dln.c (dln_strerror): fix a bug that sometimes made null message on
win32 (Tietew <tietew@tietew.net>'s patch). * win32/win32.c (mystrerror): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
91866217e7
commit
460c894727
3 changed files with 10 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
|||
Fri Aug 24 14:45:26 2001 Usaku Nakamura <usa@ruby-lang.org>
|
||||
|
||||
* dln.c (dln_strerror): fix a bug that sometimes made null message on
|
||||
win32 (Tietew <tietew@tietew.net>'s patch).
|
||||
|
||||
* win32/win32.c (mystrerror): ditto.
|
||||
|
||||
Thu Aug 23 10:10:59 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* eval.c (is_defined): should not dump core for "defined?(())".
|
||||
|
|
2
dln.c
2
dln.c
|
@ -1153,7 +1153,7 @@ dln_strerror()
|
|||
char *p = message;
|
||||
p += sprintf(message, "%d: ", error);
|
||||
FormatMessage(
|
||||
FORMAT_MESSAGE_FROM_SYSTEM,
|
||||
FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
|
||||
NULL,
|
||||
error,
|
||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
|
||||
|
|
|
@ -1794,7 +1794,8 @@ mystrerror(int e)
|
|||
if (e < 0 || e > sys_nerr) {
|
||||
if (e < 0)
|
||||
e = GetLastError();
|
||||
if (FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, &source, e, 0,
|
||||
if (FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM |
|
||||
FORMAT_MESSAGE_IGNORE_INSERTS, &source, e, 0,
|
||||
buffer, 512, NULL) == 0) {
|
||||
strcpy(buffer, "Unknown Error");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue