X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:message-id:date:from:mime-version:to:cc
	:subject:references:in-reply-to:content-type
	:content-transfer-encoding; q=dns; s=default; b=j2s+OK6GdSRKwsLR
	Wdt1ClaYdZtCF2ppeF/XBGOEpJG8eF5FVVWWRgAtGulUc+gw07xRcNA2u/zbFI07
	HIDaeBp7MLbPkaBkN/GcKrEaaiKepdS6yCeSYttQgs4hcqwnYqxA2RBiBQxqjpey
	2YURRpaLWz4bOsR3/Kk3Myh1lt4=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:message-id:date:from:mime-version:to:cc
	:subject:references:in-reply-to:content-type
	:content-transfer-encoding; s=default; bh=SM0fT4fC84yh5E2ZVXvrCU
	1AyLI=; b=wufDy2IxYMWbj+ESlMyaenfbKW9Fp2yh/kHC9tDffeiIcX+bCbiOLX
	A0xmKsGMsjqEfco/3ZOegYTYVU6AlckinpuwkdUvOzzZQZYfL4ngeod6K3UweTbx
	UuhydV/ubxRMDgSkcmKf+LHiSGk9wkJb1YQfVgsYg7MVwvWFDPDWQ=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-6.9 required=5.0 tests=BAYES_00,GIT_PATCH_2,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=H*F:U*cygwin, supplying, dear, Dear
X-HELO: Ishtar.sc.tlinx.org
Message-ID: <59399CC5.60900@tlinx.org>
Date: Thu, 08 Jun 2017 11:51:49 -0700
From: L A Walsh <cygwin@tlinx.org>
User-Agent: Thunderbird
MIME-Version: 1.0
To: michael.soegtrop@intel.com
CC: cygwin@cygwin.com
Subject: Re: CR-LF handling behavior of SED changed recently - this breaks a lot of MinGW cross build scripts
References: <0F7D3B1B3C4B894D824F5B822E3E5A175B2636E4@IRSMSX103.ger.corp.intel.com> <a53282b6-d00c-aad8-76a6-26b4089a9623@redhat.com> <0F7D3B1B3C4B894D824F5B822E3E5A175B26CE47@IRSMSX102.ger.corp.intel.com>
In-Reply-To: <0F7D3B1B3C4B894D824F5B822E3E5A175B26CE47@IRSMSX102.ger.corp.intel.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes

Soegtrop, Michael wrote:
> Dear Eric,
>
>   
>> No, the documented behavior is that CR-LF is converted to LF only for text-
>> mounted files; but pipelines are default binary-mounted.  If you want to strip
>> CR from a pipeline, then make it explicit.
>>
>>     
>>> var=$( prog | sed .)
>>>       
>> Rewrite that to var=$( prog | tr -d '\r' | sed .)
>>     
>
> I have two problems with this:
>
> 1.) I build many (~ 50) unix libs and tools MinGW cross on cygwin from sources and this breaks many of the configure and other scripts. 
---
    But didn't one have to use 'sed -b' before, in order to
strip out CR's?  I.e. wouldn't all the individual lib/tool maintainers have
been required to add '-b' to their sed scripts?  Seems either way,
you have the undesirability of forcing external products to change to
support cygwin.

    Whereas, what I'd wonder is, how you are supplying input to sed
in the first place?  I.e. how did CR's get into the stream to begin with.
If you used cygwin and some tool on cygwin generated CR's into the output
stream, I'd think that'd be a problem (or bug).  But if you are mixing
DOS/Win-progs w/cygwin, then you need to adapt the DOS/Win progs' outputs to
not have CR in them.

Or am I missing something basic?




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

