delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/06/14/00:41:48

From: blake AT edge DOT net (Blake McBride)
Subject: Re: Problem with stdout BINARY
14 Jun 1997 00:41:48 -0700 :
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <199706131334.IAA14334.cygnus.gnu-win32@edge.edge.net>
Mime-Version: 1.0
X-Sender: blake AT edge DOT net
X-Mailer: Windows Eudora Version 2.1.1
Original-To: gnu-win32 AT cygnus DOT com (Cygnus gnuwin32)
Original-Sender: owner-gnu-win32 AT cygnus DOT com

At 11:04 AM 6/12/97 -0400, you wrote:
>Blake McBride writes:
> > At 11:29 AM 6/11/97 +0100, you wrote:
> > >Hi everybody,
> > >
> > >Trying to write gif file in stdout with 'putchar'. b18 seems to add a CRNL
> > >every CR he
> > >founds in the file.
> > 
> > You know it's one of life's great mysteries.  stdxxx used to be opened in
> > binary mode and then someone changed it.   It seems to me that it's got
> > to be trivial to switch it back.  The reason for changing it is unknown
> > to me.  Since they've changed it to TEXT mode you can't even execute:
> > 
> > gzip -dc abc.tar.gz |tar xvf -
> > 
> > anymore.  I don't have time to find and fix the problem for my own use
> > and this is the only reason I don't use gnu-win32.
> > 
> > --blake
>
>I've run into the same problem--for instance, if "x" is a binary file,
>the commands "dd if=x of=y" and "dd if=x > y" produce different
>results ("cat x > y" doesn't work because cat opens its input in TEXT
>mode).  This is an incredible headache, but the fix is pretty easy.
>
>You need to recompile bash, which always opens redirects in TEXT mode.
>You can download my patched copy of bash at
>
>    http://www.cs.cornell.edu/home/jyh/cygwin32/
>
>or you can just patch the file "make_cmd.c" with the following patch:


Thanks!!  I wonder who and why the decision was made to open in 
text mode?  Oh, well..

--blake

--
Download source code to my Dynace Object 
Oriented Extension to C from:
http://www.edge.net/algorithms
Blake McBride (blake AT edge DOT net)
Algorithms Corporation - 615-791-1636 - USA

-
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".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019