The current documentation on Cygwin text mode heuristic relies on a bug in a GNU tool. That bug was fixed.
http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/doc/textbinary.sgml?rev=1.11&content-type=text/x-cvsweb-markup&cvsroot=src The script</para> <screen> <![CDATA[ #!/bin/sh # Remove \r from the file given as argument tr -d '\r' < "$1" > "$1".nocr ]]> </screen> <para> will not work on a text mounted systems because the \r will be reintroduced on writing.I believe GNU tr switched to always-binary output on January 1, 1999, according to its change log, http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=87f9e231c340b939bf691842df8fb30e88402acd The Cygwin example should probably be more explicit by offering C code with the fopen() "w" mode and a counter-example with the "wb" mode. I tested tr's binary output in a text mount using the attached script, https://savannah.gnu.org/bugs/?27983 The script showed that cygport's build of xargs and the pristine biuld of GNU gzip failed to use the explicit binary mode where they should. --
text-mode.sh
Description: Bourne shell script
-- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple