* 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/trunk@1709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4ffb361630
commit
3a42901a80
@ -1,3 +1,10 @@
|
||||
Fri Aug 24 14:38:17 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 21:59:38 2001 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
|
||||
|
||||
* enum.c (sort_by_i): fix typo.
|
||||
|
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),
|
||||
|
@ -1832,7 +1832,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…
x
Reference in New Issue
Block a user