Don't use aio logging to stdout on Windows

This should fix #964.
This commit is contained in:
heinrich5991 2018-01-13 20:43:41 +01:00
parent a5ab0faee7
commit 8f291ce528

View file

@ -170,6 +170,15 @@ static void logger_file(const char *line, void *user)
aio_unlock(logfile);
}
#if defined(CONF_FAMILY_WINDOWS)
static void logger_stdout_sync(const char *line, void *user)
{
(void)user;
puts(line);
fflush(stdout);
}
#endif
static void logger_stdout_finish(void *user)
{
ASYNCIO *logfile = (ASYNCIO *)user;
@ -212,7 +221,11 @@ void dbg_logger(DBG_LOGGER logger, DBG_LOGGER_FINISH finish, void *user)
void dbg_logger_stdout()
{
#if defined(CONF_FAMILY_WINDOWS)
dbg_logger(logger_stdout_sync, 0, 0);
#else
dbg_logger(logger_file, logger_stdout_finish, aio_new(io_stdout()));
#endif
}
void dbg_logger_debugger()