From 536b84680b4ab1f29fa456b4fa7b5b16eff4af8f Mon Sep 17 00:00:00 2001 From: David Dykstra Date: Sun, 26 Jan 2003 03:46:54 +0000 Subject: Open config files in text mode when O_TEXT is defined. This helps on Cygwin when the config files are on a filesystem that is mounted in binary mode. Patch from Ville Herva. --- syscall.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'syscall.c') diff --git a/syscall.c b/syscall.c index 58f1f677..c620f607 100644 --- a/syscall.c +++ b/syscall.c @@ -85,10 +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++; -- cgit v1.2.3