fix for building with msvc

This commit is contained in:
Campbell Barton
2013-03-05 07:39:52 +00:00
parent 02caa05764
commit dc4be68cb9
2 changed files with 9 additions and 1 deletions

View File

@@ -94,6 +94,14 @@ extern "C" {
/* defines for using ISO C++ conformant names */
#define snprintf _snprintf
#ifdef _MSC_VER
# define R_OK 4
# define W_OK 2
# define X_OK 1
# define F_OK 0
# define PATH_MAX 4096
#endif
#ifndef FREE_WINDOWS
typedef unsigned int mode_t;
#endif

View File

@@ -265,7 +265,7 @@ static void bli_builddir(struct BuildDirCtx *dir_ctx, const char *dirname)
{
wchar_t *name_16 = alloc_utf16_from_8(fullname, 0);
#if defined(_MSC_VER) && (_MSC_VER >= 1500)
_wstat64(name_16, &filec->s);
_wstat64(name_16, &file->s);
#elif defined(__MINGW32__)
_stati64(fullname, &file->s);
#endif