Re: [PATCH 1/2] Use O_BINARY to detect whether to pass "rb" to popen
[email protected] Fri, 22 May 2015 12:20:23 -0400
| Newsgroups | gmane.comp.gnu.utils.bugs |
|---|---|
| Message-ID | <[email protected]> |
Filipe Brandenburger scripsit: > Tested it on a Linux/glibc system and on Windows and cygwin. Text mode on Cygwin is pretty much a dead duck by now. Given a simple "r" or "w", Cygwin will assume text mode only if (1) the pathname is in Posix format, (2) the path is on a mounted file system rather than one beginning /cygdrive, (3) the file system is explicitly mounted in text mode (which is never the default). Otherwise, text mode is only obtained with the explicit and non-standard "rt" and "wt" open flags. So Cygwin applications, like other Posix applications, mostly have to take care of newlines themselves, either by a universal-newline convention or in some other way. See <https://cygwin.com/cygwin-ug-net/using-textbinary.html>. -- John Cowan http://www.ccil.org/~cowan [email protected] I am expressing my opinion. When my honorable and gallant friend is called, he will express his opinion. This is the process which we call Debate. --Winston Churchill