aboutsummaryrefslogtreecommitdiffstats
path: root/common/sysutils.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/sysutils.c')
-rw-r--r--common/sysutils.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/common/sysutils.c b/common/sysutils.c
index 7fb8b20c9..5eab2b8ba 100644
--- a/common/sysutils.c
+++ b/common/sysutils.c
@@ -505,6 +505,30 @@ gnupg_allow_set_foregound_window (pid_t pid)
#endif
}
+int
+gnupg_remove (const char *fname)
+{
+#ifdef HAVE_W32CE_SYSTEM
+ int rc;
+ wchar_t *wfname;
+
+ wfname = utf8_to_wchar (fname);
+ if (!wfname)
+ rc = 0;
+ else
+ {
+ rc = DeleteFile (wfname);
+ xfree (wfname);
+ }
+ if (!rc)
+ gpg_err_set_errno (EIO);
+ return !rc;
+#else
+ return remove;
+#endif
+}
+
+
#ifdef HAVE_W32CE_SYSTEM