delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/02/16/12:43:29

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:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=Lt0WFpe8FDELWZaeKxCzmEqV9Pgs2+MKg6jIXmYAz9l3vQ7Jfpdhd
8HI5fRc1Q198rZnfsXqtuGGXzMCgdTqjKyZZhgp4DnsmlcBnccYmzKNaenhIxPeE
jwqTmi4QC90rBP6+KCXvNK3oVKJfTSnpDGt43OmXFzcYOU09e4oS78=
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:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=//Jb4fmn/WprDyGR1eLE1/kSMcQ=; b=ae4X6XqEcSxGB6c+Wk2m56RReEVQ
76evizPf/3dMJVkgUH5SomR7hNabNSQozLpYavjFrdzKUNc80+fig5dT585pMP5R
wGBGh2mg2dzdONu+eHxPcWj0Q9MHwh1uEaUqmk379BXkf29jocv7MEkSDHYpLa8G
WKweL15xHT7/r4c=
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-Spam-SWARE-Status: No, score=-100.9 required=5.0 tests=BAYES_00,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=
X-HELO: mout.kundenserver.de
Date: Sat, 16 Feb 2019 18:43:13 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: textmode for stdout, what is "correct" now?
Message-ID: <20190216174313.GG4256@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <20190214162002 DOT GA4950 AT calimero DOT vinschen DOT de> <6aa280c2-4769-0772-91d9-c73a3a3d9680 AT ssi-schaefer DOT com> <20190215102251 DOT GA2702 AT calimero DOT vinschen DOT de> <f7345109-5b22-a342-df1e-940e236c2397 AT ssi-schaefer DOT com> <20190215124844 DOT GE2702 AT calimero DOT vinschen DOT de> <6d02258d-115d-135c-1404-1b02eec34045 AT ssi-schaefer DOT com> <20190215203108 DOT GN2702 AT calimero DOT vinschen DOT de> <f1372893-842b-93e1-f0f2-3a9f3ac02e20 AT ssi-schaefer DOT com> <20190216093855 DOT GR2702 AT calimero DOT vinschen DOT de> <863f060b-9c2f-1c78-30e8-c1486d567f74 AT ssi-schaefer DOT com>
MIME-Version: 1.0
In-Reply-To: <863f060b-9c2f-1c78-30e8-c1486d567f74@ssi-schaefer.com>
User-Agent: Mutt/1.10.1 (2018-07-13)

--hwvH6HDNit2nSK4j
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Feb 16 18:13, Michael Haubenwallner wrote:
> On 2/16/19 10:38 AM, Corinna Vinschen wrote:
> > setmode(fd, O_BINARY) works on Cygwin.
>=20
> Well... true.
>=20
> What I'm trying to say is that restoring the *default* mode is currently=
=20
> broken, because traditionally the default mode simply is called "text
> mode" - which is enough for DOS only systems, but confusing in Cygwin.
>=20
> As for Cygwin the default mode is more complex, we may want to call it
> something like the "Cygwin text mode" instead.  Consequently, the mode
> that does force \r should be called the "DOS text mode".
>=20
> Whether the "Cygwin text mode" is with or without \r depends on some
> other property like the text mount.
>=20
> However, after setting the "binary mode", libraries like openssl BIO
> want to be able to restore the "non-binary mode" - whatever name it
> may have.  So they use the only available API: setmode(fd, O_TEXT).
> And IMO they're right to expect the "Cygwin text mode" on Cygwin.
>=20
> If they really need the "DOS text mode", they either should handle the
> \r in binary mode - or we provide some new setmode(fd, O_DOSTEXT) API.
>=20
> In hope to be more clear now,
> /haubi/

I really miss the problem you're trying to solve here.  Why should an
application setting O_BINARY explicitely revert this decision on the
same file descriptor?  That doesn't make sense.


Corinna

--=20
Corinna Vinschen
Cygwin Maintainer

--hwvH6HDNit2nSK4j
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAlxoS7EACgkQ9TYGna5E
T6AFeA//e0LWJCK1mM4UbS70PTuqfZ/vgmd6VQUeVailL7TgL4v26wvU8P/lGq/C
SXSXEY5SmG2uoYDJrS8Tsc0hnL3volymE39mTVq+wslbVvB6JUcdMnvMlFqPJgra
xfjT2quXpunTHXSmjAnPRu+jOikocSs1d2mbBA8ypUB9IHKxBLwNXWAqztF5SFWA
5yFnAk/Uq8nUgjaX97xAWZ7qlk7vKjvQBVzJxTTDIcEHreCBerkMKugPOiOLJIbU
5y4nlgLvMlHHmv7vweRGfo+Chjv5ChLKvH5dzj05jjef2NEkZOGUI4cUqrEK9eVy
TpdFLgx6x4ZxFKYFTiycGnxYt+7IyR9B+FuVxOnNRIq7rbUhLN9irt7rSgZ8xUvt
aI9lpip9BLPa0xzavNYVHl7/K9d6puwrzQd5cLwBu2FniFrW99FHKv+xqodPyWaV
4IVaptraY7wavZoN3qhHKkidYGs1xG02wXs1o/tvnIiXyywjAQj3NYFaeN4CeUy+
SfDihUZiqmbbc3Rc2viFWUzBiGfinNCaSYhmB1udZSfOkF6JCFbbQ0pT9dDjn9fP
aeTpin+9rkFRHB4E4zg3LoDU/psjRJ/Impxny/5jfKaSnjLca7K8f5WIePt3LxWC
ljtTOKMJfBiVbcth1hkmwkPbMsJxuNBxCgUxTzOjFUyuqct95L8=
=mu/W
-----END PGP SIGNATURE-----

--hwvH6HDNit2nSK4j--

- Raw text -


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