Commit a926daec authored by David Dykstra's avatar David Dykstra

Always add the O_BINARY flag in do_open if it is defined, for Windows.

Suggestion from Mart.Laak@hansa.ee
parent 53dd3135
...@@ -76,6 +76,10 @@ int do_rmdir(char *pathname) ...@@ -76,6 +76,10 @@ int do_rmdir(char *pathname)
int do_open(char *pathname, int flags, mode_t mode) int do_open(char *pathname, int flags, mode_t mode)
{ {
if (dry_run) return -1; if (dry_run) return -1;
#ifdef O_BINARY
/* for Windows */
flags |= O_BINARY;
#endif
CHECK_RO CHECK_RO
return open(pathname, flags, mode); return open(pathname, flags, mode);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment