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 | |
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 'cipher')
-rw-r--r-- | cipher/ChangeLog | 5 | ||||
-rw-r--r-- | cipher/idea-stub.c | 15 |
2 files changed, 11 insertions, 9 deletions
diff --git a/cipher/ChangeLog b/cipher/ChangeLog index ef01c1dd4..c4e57c3d6 100644 --- a/cipher/ChangeLog +++ b/cipher/ChangeLog @@ -1,3 +1,8 @@ +2004-11-03 Timo Schulz <[email protected]> + + * idea-stub.c (dlopen, dlsym): Use w32_strerror instead of + just showing the error number. + 2004-10-14 Werner Koch <[email protected]> * rndunix.c (start_gatherer) [ENABLE_SELINUX_HACKS]: Don't allow 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; |