aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTimo Schulz <[email protected]>2004-11-03 20:03:46 +0000
committerTimo Schulz <[email protected]>2004-11-03 20:03:46 +0000
commit37ecd725e58c41820e01f15c1ef4fb2c07014aa9 (patch)
treed5b9174d9498fdb12e27b85d28bc31456fc56354 /include
parent* strgutil.c (load_libiconv): Use log_info to avoid failures when (diff)
downloadgnupg-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 'include')
-rw-r--r--include/ChangeLog5
-rw-r--r--include/dynload.h4
-rw-r--r--include/errors.h6
3 files changed, 11 insertions, 4 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index 3b693681f..09487d6eb 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,8 @@
+2004-11-03 Timo Schulz <[email protected]>
+
+ * errors.h: Add w32_strerror prototype.
+ * dynload.h: Use w32_strerror.
+
2004-10-27 Werner Koch <[email protected]>
* dynload.h: Always use it for _WIN32.
diff --git a/include/dynload.h b/include/dynload.h
index 21e30131e..dfae2f0cd 100644
--- a/include/dynload.h
+++ b/include/dynload.h
@@ -52,9 +52,7 @@ dlsym (void * hd, const char * sym)
static __inline__ const char *
dlerror (void)
{
- static char buf[32];
- sprintf (buf, "ec=%lu\n", GetLastError ());
- return buf;
+ return w32_strerror (0);
}
diff --git a/include/errors.h b/include/errors.h
index 38664e10c..c014c91a0 100644
--- a/include/errors.h
+++ b/include/errors.h
@@ -79,7 +79,11 @@
#define G10ERR_NO_CARD 57
#ifndef HAVE_STRERROR
-char *strerror( int n );
+char *strerror (int n);
+#endif
+
+#ifdef _WIN32
+const char * w32_strerror (int w32_errno);
#endif
#endif /*G10_ERRORS_H*/