summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2019-03-15 07:41:39 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2019-03-15 07:41:39 (GMT)
commit750b5c293076b6a446088fa3020e4e0787d489d7 (patch)
tree80f392f7152d137a64aa28c0de84554beb066740 /tools
parent0ea7aa89ff872f810285b12ddde5d55165534afa (diff)
downloadhdf5-750b5c293076b6a446088fa3020e4e0787d489d7.zip
hdf5-750b5c293076b6a446088fa3020e4e0787d489d7.tar.gz
hdf5-750b5c293076b6a446088fa3020e4e0787d489d7.tar.bz2
Adds _wopen support on Windows so that files with UTF-8 names
can be opened. Fixes: HDFFV-2714, HDFFV-3914, HDFFV-3895, HDFFV-8237, HDFFV-10413, HDFFV-10691
Diffstat (limited to 'tools')
-rw-r--r--tools/test/perform/sio_engine.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/test/perform/sio_engine.c b/tools/test/perform/sio_engine.c
index 4fead3f..11de229 100644
--- a/tools/test/perform/sio_engine.c
+++ b/tools/test/perform/sio_engine.c
@@ -54,6 +54,12 @@
} while(0)
/* POSIX I/O macros */
+#ifdef H5_HAVE_WIN32_API
+/* Can't link against the library, so this test will use the older, non-Unicode
+ * _open() call on Windows.
+ */
+#define HDopen(S,F,...) _open(S, F | _O_BINARY, __VA_ARGS__)
+#endif /* H5_HAVE_WIN32_API */
#define POSIXCREATE(fn) HDopen(fn, O_CREAT|O_TRUNC|O_RDWR, 0600)
#define POSIXOPEN(fn, F) HDopen(fn, F, 0600)
#define POSIXCLOSE(F) HDclose(F)