Some build fixes to support compilation with MSVC on Windows

This commit is contained in:
Mathieu Duponchelle 2018-05-14 13:26:26 -07:00 committed by Tim-Philipp Müller
parent 344925fc53
commit 7b293e3292
2 changed files with 13 additions and 1 deletions

View File

@ -30,7 +30,11 @@
#include <limits.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
#ifndef _WIN32
#include <sys/time.h>
#endif
#include <assert.h>
#if defined(HAVE_MMAP) || defined(__CYGWIN__)
# include <unistd.h>

View File

@ -44,6 +44,14 @@
# define WIN32_EXTRA_LEAN
# define STRICT
# include <windows.h>
#if defined(_MSC_VER)
#include <BaseTsd.h>
typedef SSIZE_T ssize_t;
#endif
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
#endif
#endif /* _FCWINDOWS_H_ */