From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 41832 invoked by alias); 13 Mar 2016 11:37:06 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 41821 invoked by uid 89); 13 Mar 2016 11:37:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-93.9 required=5.0 tests=BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_PBL,RDNS_DYNAMIC,USER_IN_WHITELIST autolearn=no version=3.3.2 spammy=H*f:sk:02b9665, non-0, potenitally, resets X-HELO: calimero.vinschen.de Received: from ipbcc0d020.dynamic.kabel-deutschland.de (HELO calimero.vinschen.de) (188.192.208.32) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 13 Mar 2016 11:37:04 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id AC0C5A80547; Sun, 13 Mar 2016 12:37:02 +0100 (CET) Date: Sun, 13 Mar 2016 11:37:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: Problem with line buffering and getc function on 1.7.33. Message-ID: <20160313113702.GE25791@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <56E34346.9010000@gmail.com> <11ca145175d5b7d15db927c0c1f28b18@mail.kylheku.com> <20160312193946.GB3567@calimero.vinschen.de> <20160312222921.GD3567@calimero.vinschen.de> <02b96659afff45653e40bc7eaeae3495@mail.kylheku.com> <20160313110627.GD25791@calimero.vinschen.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="pAwQNkOnpTn9IO2O" Content-Disposition: inline In-Reply-To: <20160313110627.GD25791@calimero.vinschen.de> User-Agent: Mutt/1.5.24 (2015-08-30) X-SW-Source: 2016-03/txt/msg00200.txt.bz2 --pAwQNkOnpTn9IO2O Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1736 On Mar 13 12:06, Corinna Vinschen wrote: > On Mar 12 16:41, Kaz Kylheku wrote: > > On 12.03.2016 14:29, Corinna Vinschen wrote: > > >I do now. Basically it's setvbuf screwing up the internal flags in the > > >FILE structure. I took the liberty to update newlib's setvbuf to the > > >OpenBSD version locally and I'm going to apply my patches to newlib > > >soon. I'll provide a new 2.5.0 test release of Cygwin with this patch > > >tomorrow or early next week. > >=20 > > The change in git now seems risky; it substantially rewrites setvbuf. > > Of course, it's not that I think OpenBSD has it wrong, but that it's > > being cherry-picked in isolation into what looks like a code base > > with some other old pieces. Just a thought. >=20 > Point taken. I compared the code carefully and I'm reasonable sure > that the risk is low. The major differences to the old setvbuf are: >=20 > - The locking call is later. The first check potenitally exiting > the function early does not need any access to either reent or fp. >=20 > - OpenBSD setvbuf now drops the ungetc buffer. >=20 > - OpenBSD resets more flags, namely __SOPT | __SNPT | __SEOF. That's > certainly the safer option. >=20 > - Optimal IO size handling is a bonus. Just setting buffer to 1K was > a bit sub-optimal. >=20 > - Add missing __sinit() call. >=20 > - Only set buffersize to non-0 in _IOLBF case if we're already writing. >=20 > - The rest is equivalent to before. Only the switch statement has been > changed to an if in OpenBSD's setvbuf. >=20 > Did you try Cygwin 2.0.5-0.6? s/2.0.5/2.5.0/ Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --pAwQNkOnpTn9IO2O Content-Type: application/pgp-signature; name="signature.asc" Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJW5VDeAAoJEPU2Bp2uRE+gkM4P/igDGC4PoS/8lJCvsGbZXJOK KZWk6IjAFOEFSgWymTPTqBCYT3+OMHdWx4oy/PzpMfEWqfChYbc7YVtFnubprBCg yASo5y8slDcA26JxMarsmA+reFXlTXF3amBLxE5U+qBvIGrOStAKK8vtb/e4kYJA w2pqSgBaC4mJYj9RmFLA+5X+RCh6cwPiu0Gu8bFdniCjxiWvcxIC2HmIqiblQcco xfiVw7EEGjVVQdCWWBbJ/kJYlY6+SOC7Kgc4cLBbLTVyTBKqA6KrBXfKHJ9xVtZn tILLo+aeWPlT63K8jZ+PntrUIyfEXUZ4bIwuDJMTWDfUdOwamooHd9felumIEIUu xUT18/+oGelz8zVrFX0Ej9ZhdrbtfE9ljtOnkWk+w03Cr++1ummnYomWTFz0tG1O z0KGanyxhfeXEKTdq3xnutP3bWIYiE2zkAwIaAU+Mwo4f9RxOUmtZ3aLgP++D8Pv T8EjtlOtJoBFJGB31ywoSfM9VKHp2GrxrLxyoVWKi8BhIRkKOtN1GvHm9PnxBA2X 7/hkTiB8HLYNYdzIqQTZ01WavIgLzM0cEki9b+TqYeYydO/j1JkdFtgdhWXRpb+1 C/HubxKvfG45OVsPE60sFi1ACtNJ6lcIch/ZsG0L6GHQA+k95C1GgTTOH87GH6+O dlfMzqLeYq6J1I3UQ86/ =vGx+ -----END PGP SIGNATURE----- --pAwQNkOnpTn9IO2O--