os/fs: introduce os_fopen()

Windows: Using fopen() directly may need UTF-16 filepath conversion. To
achieve that, os_fopen() goes through os_open().

fix #10586
This commit is contained in:
Justin M. Keyes
2019-07-23 20:56:27 +02:00
parent 8a9c9a9963
commit bb3a0099c6
3 changed files with 85 additions and 6 deletions

View File

@@ -86,7 +86,7 @@
#define READBIN "rb"
#define APPENDBIN "ab"
# define mch_fopen(n, p) fopen((n), (p))
# define mch_fopen(n, p) os_fopen((n), (p))
/* mch_open_rw(): invoke os_open() with third argument for user R/W. */
#if defined(UNIX) /* open in rw------- mode */