Mail Archives: cygwin-developers/2000/02/24/11:54:39
----- Forwarded message from "J. Johnston" <jjohnstn AT cygnus DOT com> -----
From: "J. Johnston" <jjohnstn AT cygnus DOT com>
To: Chris Faylor <cgf AT cygnus DOT com>
Subject: Re: A patch from the net
Date: Thu, 24 Feb 2000 11:13:42 -0500
Organization: Cygnus Solutions
Chris Faylor wrote:
>
> Does this make sense?
>
> cgf
>
Yes and no. It will end up regressing newlib at least on some embedded platforms.
The code in findfp was originally changed by myself to fix PR15319
whereby gdb used with the simulator wasn't flushing output properly.
This is because __smakebuf does not correctly reset to line buffered
because often returns -1 on embedded platforms that don't have file I/O.
Thus, we screw up debugging simple test cases with printfs in them.
This code was originally changed to fix PR15319. If it is a Cygwin
issue where fstat does indeed work, add a check in the code.
-- Jeff J.
> diff -ur newlib.orig/ChangeLog newlib/ChangeLog
> --- newlib.orig/ChangeLog Tue Feb 01 04:58:58 2000
> +++ newlib/ChangeLog Fri Feb 18 13:31:18 2000
> @@ -1,3 +1,9 @@
> +Fri Feb 18 13:25:59 2000 Eric Fifer <efifer AT sanwaint DOT com>
> +
> + * libc/stdio/findfp.c (__sinit): stdout should be fully
> + buffered by default, code in makebuf.c (__smakebuf) already
> + asserts line buffering on tty devices.
> +
> Thu Jan 20 18:57:00 2000 Fernando Nasser <fnasser AT redhat DOT com>
>
> * setvbuf.c (setvbuf): Set size to BUFSIZ when passed a zero size
> diff -ur newlib.orig/libc/stdio/findfp.c newlib/libc/stdio/findfp.c
> --- newlib.orig/libc/stdio/findfp.c Fri Aug 27 23:15:06 1999
> +++ newlib/libc/stdio/findfp.c Fri Feb 18 10:23:52 2000
> @@ -144,7 +144,7 @@
> s->__sdidinit = 1;
>
> std (s->__sf + 0, __SRD, 0, s);
> - std (s->__sf + 1, __SWR | __SLBF, 1, s);
> + std (s->__sf + 1, __SWR, 1, s);
> std (s->__sf + 2, __SWR | __SNBF, 2, s);
>
> s->__sglue._next = NULL;
----- End forwarded message -----
--
cgf AT cygnus DOT com Cygnus Solutions, a Red Hat company
http://sourcware.cygnus.com/ http://www.redhat.com/
- Raw text -