diff options
author | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2015-03-19 16:47:23 +0100 |
---|---|---|
committer | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2015-03-19 16:48:45 +0100 |
commit | d1ad446669cea2a76d7146023e4862a1fdbf3e13 (patch) | |
tree | 359dd5405b8bc24daabbb56640d1017f3ac79605 /include/astra/clog.h | |
parent | 476fd5388da4aa6e23658460199e26e88e05dc5d (diff) | |
download | astra-d1ad446669cea2a76d7146023e4862a1fdbf3e13.tar.gz astra-d1ad446669cea2a76d7146023e4862a1fdbf3e13.tar.bz2 astra-d1ad446669cea2a76d7146023e4862a1fdbf3e13.tar.xz astra-d1ad446669cea2a76d7146023e4862a1fdbf3e13.zip |
Fix windows build
Diffstat (limited to 'include/astra/clog.h')
-rw-r--r-- | include/astra/clog.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/astra/clog.h b/include/astra/clog.h index ce082df..c0cbae4 100644 --- a/include/astra/clog.h +++ b/include/astra/clog.h @@ -71,7 +71,15 @@ #include <stdio.h> #include <string.h> #include <time.h> +#ifndef _MSC_VER #include <unistd.h> +#else +#include <io.h> +#define open _open +#define close _close +#define write _write +#define snprintf _snprintf +#endif /* Number of loggers that can be defined. */ #define CLOG_MAX_LOGGERS 16 @@ -625,7 +633,10 @@ _clog_log(const char *sfile, int sline, enum clog_level level, if (dynbuf != buf) { free(dynbuf); } +#ifndef _MSC_VER + // FIXME fsync(logger->fd); +#endif } } |