From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3867 invoked by alias); 15 Aug 2013 18:44:25 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 3853 invoked by uid 89); 15 Aug 2013 18:44:24 -0000 X-Spam-SWARE-Status: No, score=-4.0 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_YE,SPF_SOFTFAIL autolearn=no version=3.3.2 Received: from mtaout22.012.net.il (HELO mtaout22.012.net.il) (80.179.55.172) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 15 Aug 2013 18:44:23 +0000 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MRL00M0057Z7E00@a-mtaout22.012.net.il> for gdb-patches@sourceware.org; Thu, 15 Aug 2013 21:44:20 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MRL00M325DU4050@a-mtaout22.012.net.il>; Thu, 15 Aug 2013 21:44:20 +0300 (IDT) Date: Thu, 15 Aug 2013 18:44:00 -0000 From: Eli Zaretskii Subject: Re: [PATCH] Unbuffer stdout and stderr on windows In-reply-to: <20130815175940.GD6955@ednor.casa.cgf.cx> To: palves@redhat.com, gdb-patches@sourceware.org, brobecker@adacore.com, yao@codesourcery.com Reply-to: Eli Zaretskii Message-id: <83bo4yokta.fsf@gnu.org> References: <51EE23F8.1070905@codesourcery.com> <83wqohw4ee.fsf@gnu.org> <20130729192559.GA5348@ednor.casa.cgf.cx> <83d2q1xiyv.fsf@gnu.org> <51F6C7B2.3020400@redhat.com> <20130731034045.GA5565@ednor.casa.cgf.cx> <20130812211105.GA11128@adacore.com> <8361v9piop.fsf@gnu.org> <20130815173618.GA6955@ednor.casa.cgf.cx> <83eh9uonlg.fsf@gnu.org> <20130815175940.GD6955@ednor.casa.cgf.cx> X-SW-Source: 2013-08/txt/msg00405.txt.bz2 > Date: Thu, 15 Aug 2013 13:59:40 -0400 > From: Christopher Faylor > > >>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.