1
0
mirror of https://gitlab.xiph.org/xiph/icecast-common.git synced 2024-12-04 14:46:31 -05:00

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
This commit is contained in:
oddsock 2003-02-27 03:02:30 +00:00
parent de873ff693
commit 72ad409e7a
2 changed files with 6 additions and 1 deletions

View File

@ -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;
}

View File

@ -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);