- Ensure that stderr output are not buffered, portability for tests

This commit is contained in:
Pierre Joye 2010-01-25 14:47:19 +00:00
parent d0ab70458d
commit 5eb4db5e8f
5 changed files with 68 additions and 0 deletions

View file

@ -50,6 +50,10 @@ php_output_globals output_globals;
PHPAPI int php_default_output_func(const char *str, uint str_len TSRMLS_DC)
{
fwrite(str, 1, str_len, stderr);
/* See http://support.microsoft.com/kb/190351 */
#ifdef PHP_WIN32
fflush(stderr);
#endif
return str_len;
}
/* }}} */