I corrected the patch.
The updates are:
- Change the macro of Windows detection from _MSC_VER to _WIN32.
- Delete include directive of libgen.h.
I didn't change the path separator since support for old Mac seems unnecessary.
I noticed that it was not considered to filename automatic normalization of Mac HFS+.
However, I cannot correct because I have no Mac...
Support for its normalization is not need, since it does not increase files that cannot be opened.