mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-11-03 04:17:17 -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:
parent
ce167cc6bb
commit
1d84364c5a
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user