summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--newlib/libc/stdio/flags.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/newlib/libc/stdio/flags.c b/newlib/libc/stdio/flags.c
index 518cc33f1..7d18fd1d1 100644
--- a/newlib/libc/stdio/flags.c
+++ b/newlib/libc/stdio/flags.c
@@ -90,8 +90,8 @@ _DEFUN(__sflags, (ptr, mode, optr),
break;
}
}
-#if defined (O_TEXT) && !defined (__CYGWIN__)
- if (!(m | O_BINARY))
+#if defined (O_TEXT)
+ if (!(m & O_BINARY))
m |= O_TEXT;
#endif
*optr = m | o;