Commit 1d84364c authored by Ed "oddsock" Zaleski's avatar Ed "oddsock" Zaleski

win32 doesn't support line buffering with setvbuf() properly, so for win32

lets just set it to no-buffering for logs.

svn path=/trunk/log/; revision=4381
parent ce167cc6
......@@ -103,7 +103,7 @@ int log_open(const char *filename)
ret = log_open_file(file);
if(ret >= 0)
setvbuf(file, NULL, _IOLBF, 0);
setvbuf(file, NULL, IO_BUFFER_TYPE, 0);
return ret;
}
......
......@@ -9,6 +9,11 @@
#define LOG_ENOTOPEN -4
#define LOG_ENOTIMPL -5
#ifdef _WIN32
#define IO_BUFFER_TYPE _IONBF
#else
#define IO_BUFFER_TYPE _IOLBF
#endif
void log_initialize();
int log_open_file(FILE *file);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment