1 diff -Naur hdf5-1.10.3_SRC_orig/src/H5FDwindows.c hdf5-1.10.3_SRC_modif/src/H5FDwindows.c
2 --- hdf5-1.10.3_SRC_orig/src/H5FDwindows.c 2018-08-10 00:36:32.000000000 +0300
3 +++ hdf5-1.10.3_SRC_modif/src/H5FDwindows.c 2020-05-08 16:55:38.043834500 +0300
8 +int _win_open(const char *name, int oflag,...)
12 + /* Get the mode, if O_CREAT was specified */
13 + if(oflag & O_CREAT) {
16 + HDva_start(vl, oflag);
17 + pmode = HDva_arg(vl, int);
20 + int size_needed = MultiByteToWideChar(CP_UTF8, 0, name, strlen(name), NULL, 0);
21 + wchar_t* wname = (wchar_t*)malloc( sizeof(wchar_t)*(size_needed + 1) );
22 + MultiByteToWideChar( CP_UTF8, 0, name, strlen(name), wname, size_needed );
23 + wname[size_needed] = '\0';
24 + fd=_wopen(wname, oflag, pmode);
30 /*-------------------------------------------------------------------------
31 * Function: H5Pset_fapl_windows
32 diff -Naur hdf5-1.10.3_SRC_orig/src/H5win32defs.h hdf5-1.10.3_SRC_modif/src/H5win32defs.h
33 --- hdf5-1.10.3_SRC_orig/src/H5win32defs.h 2018-08-10 00:36:32.000000000 +0300
34 +++ hdf5-1.10.3_SRC_modif/src/H5win32defs.h 2020-05-08 16:53:04.239497600 +0300
36 * Also note that the variadic macro is using a VC++ extension
37 * where the comma is dropped if nothing is passed to the ellipsis.
39 -#define HDopen(S,F,...) _open(S, F | _O_BINARY, __VA_ARGS__)
40 +//#define HDopen(S,F,...) _open(S, F | _O_BINARY, __VA_ARGS__)
41 +H5_DLL int _win_open(const char *name, int oflag,...);
42 +#define HDopen(S,F,...) _win_open(S, F | _O_BINARY, __VA_ARGS__)
43 #define HDread(F,M,Z) _read(F,M,Z)
44 #define HDrmdir(S) _rmdir(S)
45 #define HDsetvbuf(F,S,M,Z) setvbuf(F,S,M,(Z>1?Z:2))