summaryrefslogtreecommitdiffstats
path: root/utf8.c
diff options
context:
space:
mode:
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/utf8.c b/utf8.c
index 39d8a7f8..03aefa2e 100644
--- a/utf8.c
+++ b/utf8.c
@@ -387,6 +387,14 @@ FILE *w_freopen(const wchar_t *wname, const wchar_t *wmode, FILE *fold)
return f;
}
+FILE *w_fdopen(int fd, const wchar_t *wmode)
+{
+ char *mode = utf8_dup_to(wmode);
+ FILE *f = fdopen(fd, mode);
+ free(mode);
+ return f;
+}
+
int w_remove(const wchar_t *wpath)
{
char *path = utf8_dup_to(wpath);