This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

setvbuf bug (MINGW32)



good news.


#if 0 /* from mingw using crtdll.dll */

/*
 * The three possible buffering mode (nMode) values for setvbuf.
 * NOTE: _IOFBF works, but _IOLBF seems to work like unbuffered...
 * maybe I'm testing it wrong?
 */

#define	_IOFBF	0	/* fully buffered */
#define	_IOLBF	1	/* line buffered */
#define	_IONBF	2	/* unbuffered */

#else /* from lccwin32 using crtdll.dll */

#define _IOFBF		0x0000
#define _IOLBF		0x0040
#define _IONBF		0x0004
#endif

 /*
  * I found these problems in following case
  */

void autoflush( FILE *fp )
{
    setvbuf( fp, NULL, _IONBF, 0 );
}

void gui_emulate_stderr( void )
{
    CreatePipe .....

    autoflush( w_pipout );
    autoflush( w_piperr );
}


Regards,
S.Yoshida vzy03312@ha.bekkoame.ne.jp

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]