mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
2004-11-03 Timo Schulz <twoaday@g10code.com>
* 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.
This commit is contained in:
parent
b467558d9e
commit
37ecd725e5
14 changed files with 155 additions and 104 deletions
|
@ -1,3 +1,8 @@
|
|||
2004-11-03 Timo Schulz <twoaday@g10code.com>
|
||||
|
||||
* idea-stub.c (dlopen, dlsym): Use w32_strerror instead of
|
||||
just showing the error number.
|
||||
|
||||
2004-10-14 Werner Koch <wk@g10code.com>
|
||||
|
||||
* rndunix.c (start_gatherer) [ENABLE_SELINUX_HACKS]: Don't allow
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue