Tweaked the O_BINARY code to the latest idiom.
authorWayne Davison <wayned@samba.org>
Sun, 30 Mar 2003 23:00:51 +0000 (23:00 +0000)
committerWayne Davison <wayned@samba.org>
Sun, 30 Mar 2003 23:00:51 +0000 (23:00 +0000)
syscall.c

index 58f1f677da70c9d6a7bee292e162a2f8de6ac7ea..dbde033b3879726c56e5b7e28fcb4e2cb8427d35 100644 (file)
--- a/syscall.c
+++ b/syscall.c
@@ -85,14 +85,10 @@ int do_open(char *pathname, int flags, mode_t mode)
            if (dry_run) return -1;
            CHECK_RO
        }
-#ifdef O_BINARY
-       /* for Windows */
-       flags |= O_BINARY;
-#endif
        /* some systems can't handle a double / */
        if (pathname[0] == '/' && pathname[1] == '/') pathname++;
 
-       return open(pathname, flags, mode);
+       return open(pathname, flags | O_BINARY, mode);
 }
 
 #if HAVE_CHMOD