setvbuf bug (MINGW32)
S.Yoshida
vzy03312@ha.bekkoame.ne.jp
Wed Aug 16 12:43:00 GMT 2000
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
More information about the Cygwin
mailing list