summaryrefslogtreecommitdiff
path: root/dln.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-12-14 09:00:08 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-12-14 09:00:08 +0000
commit17a5fa1b4344199cef86c2cea4f1ba35f021593d (patch)
treea85bb7fdd3bbae60a1a69b2efa898ce949f8e2ac /dln.c
parent11187ce939d94c3a2f6d9239114c2696a8271834 (diff)
1.1c final (hopefully)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dln.c')
-rw-r--r--dln.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/dln.c b/dln.c
index 9fe4208f4c..d9c129532e 100644
--- a/dln.c
+++ b/dln.c
@@ -1129,15 +1129,22 @@ dln_strerror()
#ifdef _WIN32
static char message[1024];
+ int error = GetLastError();
+ char *p = message;
+ p += sprintf(message, "%d: ", error);
FormatMessage(
FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
- GetLastError(),
- MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US),
- message,
- sizeof message,
+ error,
+ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+ p,
+ sizeof message - strlen(message),
NULL);
+ for (p = message; *p; p++) {
+ if (*p == '\n' || *p == '\r')
+ *p = ' ';
+ }
return message;
#endif
}
@@ -1213,7 +1220,7 @@ dln_load(file)
/* Load file */
if ((handle =
LoadLibraryExA(winfile, NULL, LOAD_WITH_ALTERED_SEARCH_PATH)) == NULL) {
- printf("LoadLibraryExA\n");
+ printf("LoadLibraryExA: %s\n", winfile);
goto failed;
}