summaryrefslogtreecommitdiffstats
path: root/common/sysutils.h
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2021-01-11 14:19:06 +0100
committerWerner Koch <wk@gnupg.org>2021-01-11 14:19:06 +0100
commitb6967d31912912ad3c0a2ff6bf6eb9822a194562 (patch)
tree0058767932e827f539cdec89f55fd555359b0aa8 /common/sysutils.h
parentI meant "SHA-2 digests" in the previous commit. (diff)
downloadgnupg2-b6967d31912912ad3c0a2ff6bf6eb9822a194562.tar.xz
gnupg2-b6967d31912912ad3c0a2ff6bf6eb9822a194562.zip
gpg,w32: Fix gnupg_remove.
* common/sysutils.c (map_w32_to_errno): New. (gnupg_w32_set_errno): New. (gnupg_remove) [w32]: Set ERRNO -- To support Unicode gnupg_remove was changed to use DeleteFileW and not properly tested because the code was alreadt used in Windows CE. However, ERRNO was not set and thus Dirmngr failed due to if (!gnupg_remove (fname)) log_info (_("removed stale te[...] file '%s'\n"), fname); else if (errno != ENOENT) { err = gpg_error_from_syserror (); log_error (_("problem remov[...] file '%s': %s\n"), fname, gpg_strerror (err)); goto leave; } GnuPG-bug-id: 5230
Diffstat (limited to 'common/sysutils.h')
-rw-r--r--common/sysutils.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/common/sysutils.h b/common/sysutils.h
index 13e781587..9f2920bb3 100644
--- a/common/sysutils.h
+++ b/common/sysutils.h
@@ -109,6 +109,7 @@ int gnupg_inotify_has_name (int fd, const char *name);
#ifdef HAVE_W32_SYSTEM
+void gnupg_w32_set_errno (int ec);
void *w32_get_user_sid (void);
#include "../common/w32help.h"