From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Problem with line buffering and getc function on 1.7.33.
Date: Sun, 13 Mar 2016 11:06:00 -0000 [thread overview]
Message-ID: <20160313110627.GD25791@calimero.vinschen.de> (raw)
In-Reply-To: <02b96659afff45653e40bc7eaeae3495@mail.kylheku.com>
[-- Attachment #1: Type: text/plain, Size: 1630 bytes --]
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.
>
> 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.
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:
- The locking call is later. The first check potenitally exiting
the function early does not need any access to either reent or fp.
- OpenBSD setvbuf now drops the ungetc buffer.
- OpenBSD resets more flags, namely __SOPT | __SNPT | __SEOF. That's
certainly the safer option.
- Optimal IO size handling is a bonus. Just setting buffer to 1K was
a bit sub-optimal.
- Add missing __sinit() call.
- Only set buffersize to non-0 in _IOLBF case if we're already writing.
- The rest is equivalent to before. Only the switch statement has been
changed to an if in OpenBSD's setvbuf.
Did you try Cygwin 2.0.5-0.6?
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-03-13 11:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-11 21:57 Kaz Kylheku
2016-03-11 22:14 ` Marco Atzeri
2016-03-12 0:05 ` Kaz Kylheku
2016-03-12 19:39 ` Corinna Vinschen
2016-03-12 22:29 ` Corinna Vinschen
2016-03-13 0:37 ` Kaz Kylheku
2016-03-13 10:47 ` Corinna Vinschen
2016-03-13 0:41 ` Kaz Kylheku
2016-03-13 11:06 ` Corinna Vinschen [this message]
2016-03-13 11:37 ` Corinna Vinschen
-- strict thread matches above, loose matches on Subject: below --
2016-03-11 19:17 Kaz Kylheku
2016-03-11 20:09 ` Yaakov Selkowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160313110627.GD25791@calimero.vinschen.de \
--to=corinna-cygwin@cygwin.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).