patch #5007: Patch for line-buffering of stdout and stderr


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@757 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Joerg Wunsch
2007-10-29 22:46:45 +00:00
parent 9693e039cb
commit a566b4a888
2 changed files with 13 additions and 0 deletions

View File

@@ -272,6 +272,13 @@ int main(int argc, char * argv [])
char * homedir;
#endif
/*
* Set line buffering for file descriptors so we see stdout and stderr
* properly interleaved.
*/
setvbuf(stdout, (char*)NULL, _IOLBF, 0);
setvbuf(stderr, (char*)NULL, _IOLBF, 0);
progname = strrchr(argv[0],'/');
#if defined (WIN32NATIVE)