This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Unbuffer stdout and stderr on windows
- From: Eli Zaretskii <eliz at gnu dot org>
- To: palves at redhat dot com, gdb-patches at sourceware dot org, brobecker at adacore dot com, yao at codesourcery dot com
- Date: Thu, 15 Aug 2013 21:44:49 +0300
- Subject: Re: [PATCH] Unbuffer stdout and stderr on windows
- References: <51EE23F8 dot 1070905 at codesourcery dot com> <83wqohw4ee dot fsf at gnu dot org> <20130729192559 dot GA5348 at ednor dot casa dot cgf dot cx> <83d2q1xiyv dot fsf at gnu dot org> <51F6C7B2 dot 3020400 at redhat dot com> <20130731034045 dot GA5565 at ednor dot casa dot cgf dot cx> <20130812211105 dot GA11128 at adacore dot com> <8361v9piop dot fsf at gnu dot org> <20130815173618 dot GA6955 at ednor dot casa dot cgf dot cx> <83eh9uonlg dot fsf at gnu dot org> <20130815175940 dot GD6955 at ednor dot casa dot cgf dot cx>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Thu, 15 Aug 2013 13:59:40 -0400
> From: Christopher Faylor <cgf-use-the-mailinglist-please@sourceware.org>
>
> >>If the mingw "unbuffered" mode means that everything is o n e c h a r a
> >>c t e r a t a t i m e
> >
> >It does mean that. Doesn't it work like that in Cygwin?
>
> Cygwin uses newlib which, AFAICT, writes a block at a time without
> storing the block in a buffer first.
>
> So:
>
> fwrite (foo, 27, 1, stdout);
>
> writes 27 bytes to stdout in one shot, without buffering.
Sorry, I wasn't thinking about fwrite. I was thinking about fprintf
and putc.