diff options
author | Timo Schulz <[email protected]> | 2004-11-03 20:03:46 +0000 |
---|---|---|
committer | Timo Schulz <[email protected]> | 2004-11-03 20:03:46 +0000 |
commit | 37ecd725e58c41820e01f15c1ef4fb2c07014aa9 (patch) | |
tree | d5b9174d9498fdb12e27b85d28bc31456fc56354 /cipher/idea-stub.c | |
parent | * strgutil.c (load_libiconv): Use log_info to avoid failures when (diff) | |
download | gnupg-37ecd725e58c41820e01f15c1ef4fb2c07014aa9.tar.gz gnupg-37ecd725e58c41820e01f15c1ef4fb2c07014aa9.zip |
2004-11-03 Timo Schulz <[email protected]>
* strgutil.c (w32_strerror): New.
* ttyio.c (init_ttyfp, tty_printf, do_get): Use it here.
* iobuf.c (fd_cache_open, file_filter): Likewise.
(iobuf_seek, translate_file_handle): Likewise.
Diffstat (limited to '')
-rw-r--r-- | cipher/idea-stub.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/cipher/idea-stub.c b/cipher/idea-stub.c index efc5268d7..caff9f034 100644 --- a/cipher/idea-stub.c +++ b/cipher/idea-stub.c @@ -63,7 +63,7 @@ dlopen (const char *pathname, int mode) void *h = LoadLibrary (pathname); if (!h) { - log_error ("LoadLibrary failed ec=%d\n", (int)GetLastError()); + log_error ("LoadLibrary failed: %s\n", w32_strerror (errno)); last_error = 1; return NULL; } @@ -77,25 +77,22 @@ dlclose ( void *handle ) return FreeLibrary (handle); } -char* + +const char* dlerror (void) { - static char dlerrstr[10]; if (last_error) - { - sprintf(dlerrstr, "%d", (int)GetLastError() ); - return dlerrstr; - } + return w32_strerror (0); return NULL; } void* -dlsym ( void *handle, const char *name ) +dlsym (void *handle, const char *name) { void *h = GetProcAddress (handle, name); if (!h) { - log_error ("GetProcAddress failed ec=%d\n", (int)GetLastError()); + log_error ("GetProcAddress failed: %s\n", w32_strerror (errno)); last_error = 1; } return h; |