delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT 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:subject:to:references:from:message-id:date | |
:mime-version:in-reply-to:content-type; q=dns; s=default; b=dL+5 | |
vZUSUY5Q4iXgQGzzIb0MJPAET0JQ0qqAaWXZCN1jfe3ND+euDiLzerHVrexokhNS | |
sEPZH+XvEpA90AHZYllp+x0/rxhzQpY0yAjnxR+G86hjHde/cBdnWEvqtqndfWHx | |
hL772nCNa0KAu32F1JVgM4Gro3UhxiPI7eC7xTo= | |
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:subject:to:references:from:message-id:date | |
:mime-version:in-reply-to:content-type; s=default; bh=8W9MHr2M+q | |
So0ip9eZDTl7HkzjI=; b=uOpvg7shriBmRoQG24xBiqIOOLQif+qBhPX6oO7kQc | |
TcFzQsJOZlDTd3iW5PQAMRh9dRN1d6BdEygekZfdVXGutp39dGNx/Sdjt/YTb9xR | |
0bEmRQotkKG3/r44vT3r1OahJOpc3FIcroNWj9meR5p9No9BhGJyHJEWLAiM65cZ | |
U= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Authentication-Results: | sourceware.org; auth=none |
X-Virus-Found: | No |
X-Spam-SWARE-Status: | No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=WANT, manipulating, dear, Dear |
X-HELO: | mx1.redhat.com |
DMARC-Filter: | OpenDMARC Filter v1.3.2 mx1.redhat.com 6E5C6C04B936 |
Authentication-Results: | ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com |
Authentication-Results: | ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=eblake AT redhat DOT com |
DKIM-Filter: | OpenDKIM Filter v2.11.0 mx1.redhat.com 6E5C6C04B936 |
Subject: | Re: CR-LF handling behavior of SED changed recently - this breaks a lot of MinGW cross build scripts |
To: | cygwin AT cygwin DOT com |
References: | <0F7D3B1B3C4B894D824F5B822E3E5A175B2636E4 AT IRSMSX103 DOT ger DOT corp DOT intel DOT com> <a53282b6-d00c-aad8-76a6-26b4089a9623 AT redhat DOT com> <0F7D3B1B3C4B894D824F5B822E3E5A175B26CE47 AT IRSMSX102 DOT ger DOT corp DOT intel DOT com> <59399CC5 DOT 60900 AT tlinx DOT org> <417f84ac-5d9f-dc50-e912-973e90b8a128 AT redhat DOT com> <0F7D3B1B3C4B894D824F5B822E3E5A175B26F278 AT IRSMSX102 DOT ger DOT corp DOT intel DOT com> <34b26965-34c2-b5f0-a3f2-b2c3df344b08 AT gmail DOT com> <0F7D3B1B3C4B894D824F5B822E3E5A175B270518 AT IRSMSX102 DOT ger DOT corp DOT intel DOT com> |
From: | Eric Blake <eblake AT redhat DOT com> |
Openpgp: | url=http://people.redhat.com/eblake/eblake.gpg |
Message-ID: | <5313de97-d9bd-d9c9-cb4a-254a3eadcf4a@redhat.com> |
Date: | Fri, 9 Jun 2017 10:51:36 -0500 |
User-Agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 |
MIME-Version: | 1.0 |
In-Reply-To: | <0F7D3B1B3C4B894D824F5B822E3E5A175B270518@IRSMSX102.ger.corp.intel.com> |
X-IsSubscribed: | yes |
--iiKosXkoE0W6qp8c1lXgJqfsril0VOc4J Content-Type: multipart/mixed; boundary="pTUdnk9bPcow7x92LRuvN2NpKKA4lN18b"; protected-headers="v1" From: Eric Blake <eblake AT redhat DOT com> To: cygwin AT cygwin DOT com Message-ID: <5313de97-d9bd-d9c9-cb4a-254a3eadcf4a AT redhat DOT com> Subject: Re: CR-LF handling behavior of SED changed recently - this breaks a lot of MinGW cross build scripts References: <0F7D3B1B3C4B894D824F5B822E3E5A175B2636E4 AT IRSMSX103 DOT ger DOT corp DOT intel DOT com> <a53282b6-d00c-aad8-76a6-26b4089a9623 AT redhat DOT com> <0F7D3B1B3C4B894D824F5B822E3E5A175B26CE47 AT IRSMSX102 DOT ger DOT corp DOT intel DOT com> <59399CC5 DOT 60900 AT tlinx DOT org> <417f84ac-5d9f-dc50-e912-973e90b8a128 AT redhat DOT com> <0F7D3B1B3C4B894D824F5B822E3E5A175B26F278 AT IRSMSX102 DOT ger DOT corp DOT intel DOT com> <34b26965-34c2-b5f0-a3f2-b2c3df344b08 AT gmail DOT com> <0F7D3B1B3C4B894D824F5B822E3E5A175B270518 AT IRSMSX102 DOT ger DOT corp DOT intel DOT com> In-Reply-To: <0F7D3B1B3C4B894D824F5B822E3E5A175B270518 AT IRSMSX102 DOT ger DOT corp DOT intel DOT com> --pTUdnk9bPcow7x92LRuvN2NpKKA4lN18b Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 06/09/2017 10:01 AM, Soegtrop, Michael wrote: > Dear cyg Simple, >=20 >> but it would be most beneficial if you caused the stdio of your >> Windows applications to be in binary format instead of text format. The= n the >> CR wouldn't be an issue during the pipe process. Why does your applicat= ions >> stdio need to be in text format instead of binary format? >=20 > it is not my application I have issues with. I am building many open sour= ce tools and libraries which are maintained by others, and as you said, the= se others have every right to deny implementing windows specific workaround= s in their tools or build scripts. Why should anybody use "wb" mode to open= a file in a Linux centric app=20 Using "wb" is GOOD practice in programs like tar, that WANT to produce their output as binary no matter what. But you are mixing things up. "wb" is binary mode, but manipulating CRs is only done in text mode. Text mode is only possible with "wt" (a Cygwin extension that doesn't work elsewhere), or with "w" (depending on the underlying mount - on Cygwin, "w" is text on text mode mounts, and binary on pipelines and binary mode mounts) (on other platforms, "w" is always text mode, but indistinguishable from "wb" binary mode). > or mess around with the input of sed to remove CRs in a build script for = such an app? If you are writing a Linux app that processes data produced on a windows machine, then YOU must strip CR from that data (Linux sed will NOT strip it). So now cygwin sed does the same thing. > Of cause the same is true for cygwin, except that I think building MinGW = apps is an intended use case for cygwin.=20 Building mingw apps may be one use of cygwin, but it is not the "intended use case". The intended use case of cygwin is to emulate as much as possible of a linux environment. If building for mingw on Linux requires you to explicitly strip CR when dealing with data from Windows, then so should building for mingw on Cygwin. --=20 Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org --pTUdnk9bPcow7x92LRuvN2NpKKA4lN18b-- --iiKosXkoE0W6qp8c1lXgJqfsril0VOc4J Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJZOsQJAAoJEKeha0olJ0NquqgH/3TK7v/5JTCBK3SNI+ksF1kZ rUvZ+ka2YEr+40gkywZ4oRa9TZYJsaUUA2fvUDkOpaA8m8liEOatKcILh/1I7uZI NVsubX6OF5Fhxt6nqy8AHHdi7z3zQA94SKPTaS87y+Y2yfsBo3JaQhEHdPq7ON4B H2sEXnMGuvJFvGMfCXU1rQbCTYVEGb10i9AHHcoIBcQe4sRtHtG5K1fef1xE9drr BCC4fx0akurJUyEb0Dg5BYXp68qcScpaL+nYt60ooNhIY+WSa281BjPjHZFpwlqI Gn3XQGAJ6rlXGuaEirjJwDXjXH8dswKyUr6e+BFqZFgNpfz6U9SLbJwE5V9sguc= =Tbuy -----END PGP SIGNATURE----- --iiKosXkoE0W6qp8c1lXgJqfsril0VOc4J--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |