From: adf AT mentor-systems DOT com (Austin David France) Subject: RE: When is converted to 3 Nov 1998 14:00:51 -0800 Message-ID: To: "Gnu-Win32 Mailing List (E-mail)" ? and why? Date: Mon, 2 Nov 1998 14:44:33 -0000 Message-Id: <003301be066f$4e1247f0$010120c0 AT menpc1> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-Msmail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2232.26 In-Reply-To: <71gav6$rrh$1 AT cronkite DOT cygnus DOT com> X-Mimeole: Produced By Microsoft MimeOLE V5.00.0518.4 Importance: Normal X-Delivery-Agent: ToTheNet v1.3, (C) 1997, Mentor Systems plc > >> $ echo a | tr -d '\r' > yy > >> $ ls -l yy > >> -rw-r--r-- 1 544 everyone 3 Oct 28 15:48 yy > > > >Well, another improperly ported utility. `tr' should open it's input > >and output in binary mode; obviously from this example it isn't. > > Right. It should be calling setmode(1, O_BINARY). When tr is invoked > it inherits an fd. It has no idea if that fd is associated with a file > in a directory that is mounted "binary" or not by this time. The only > thing it can do is call setmode() on its stdout fd. Surly you are all missing the point. On unix, there is no distinction between text and binary files, so why the hell should tr go out of it's way to change this so called "mode" on the file handle. If CYGWIN32 is trying to emulate Unix, then it should handle any conversions necessary. The goal should be to provide a mechanism for dealing with the difference between binary and text files (and the same applies to path names) without the need to modify the unix program source or script. OK, so that is not that simple, but I think we should be searching for a more generic solution rather than patching programs as people find they don't work in all circumstances. Austin David France Mentor Systems plc mailto:adf AT mentor-systems DOT com ------------------------------------------------------------------------ The views and opinions expressed in this e-mail message are the sender's and do not necessarily represent the views of Mentor Systems plc. ------------------------------------------------------------------------ - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".