summaryrefslogtreecommitdiffstats
path: root/windows.c
diff options
context:
space:
mode:
Diffstat (limited to 'windows.c')
-rw-r--r--windows.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/windows.c b/windows.c
index 386b52eb1..02b396f76 100644
--- a/windows.c
+++ b/windows.c
@@ -1,5 +1,6 @@
/* windows.c */
/* implements Windows specific functions */
+#include <io.h>
#include "dive.h"
#include "display.h"
#undef _WIN32_WINNT
@@ -235,6 +236,18 @@ void *subsurface_opendir(const char *path)
return (void *)ret;
}
+int subsurface_access(const char *path, int mode)
+{
+ int ret = -1;
+ if (!path)
+ return ret;
+ wchar_t *wpath = utf8_to_utf16(path);
+ if (wpath)
+ ret = _waccess(wpath, mode);
+ free((void *)wpath);
+ return ret;
+}
+
#ifndef O_BINARY
#define O_BINARY 0
#endif