delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/08/07/04:28:11

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Mon, 7 Aug 2000 14:27:07 +0600
From: Igor Afanasyev <goga AT raid DOT ru>
X-Mailer: The Bat! (v1.44) UNREG / CD5BF9353B3B7091
Reply-To: Igor Afanasyev <goga AT raid DOT ru>
Organization: RAID-Internet
X-Priority: 3 (Normal)
Message-ID: <17918565856.20000807142707@raid.ru>
To: cygwin AT sources DOT redhat DOT com
Subject: binmode in cygwin-1.1.4 (was: binmode in cygwin-1.1.3)
In-reply-To: <20000729120625.A29889@cygnus.com>
References: <20000729120625 DOT A29889 AT cygnus DOT com>
Mime-Version: 1.0

>>In cygwin-1.1.3 when I extract files from a tar archive containing files
>>with CRLF and redirect stdout to a file I get the file with CRCRLF.
>>(tar -O -xf file.tar > qqq)
>>
>>To prevent this in cygwin-1.1.2 I set CYGWIN=binmode, but this doesn't work
>>in cygwin-1.1.3.
>>
>>Can anyone please suggest what the problem is?

CF> Sorry.  It looks like I screwed up the correspondence between "CYGWIN=binmode"
CF> and stdin/stdout.

CF> The only work-arounds that I can think of are:

CF> 1) Fix tar so that -O sets stdout to O_BINARY (the correct fix).

CF> 2) Do something like:

CF>         sh -c "tar -O -xf file.tar > qqq"

CF>    and make sure that qqq goes to a directory that is mounted with
CF>    the -b option.

Ugh, I'm mazed again.

cygwin-1.1.4:

1) Consider qqq goes to a directory that is mounted without the -b option (CYGWIN=binmode).

If I issue

sh.exe -c "tar -O -xf file.tar > qqq"

qqq contains CRCRLF.

If I issue

cmd.exe /c "tar -O -xf file.tar > qqq"

qqq contains CRLF.

Why does output differ?


2) Why hinfo::init_std_file_from_handle doesn't use __fmode anymore?


3) What is the precedence of CYGWIN=binmode, Program Options, mounting
directories with the -b option, linking with binmode.o/textmode.o, explicit
opening a file in binary/text mode? And how does it affect regular
files and stdin/stdout?


Igor



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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