diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-03-05 11:39:52 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-03-05 11:39:52 +0400 |
commit | dc4be68cb98e3eadd441975e9340c81a155befd3 (patch) | |
tree | aa637752032a39e3d9d9f6aae73df9f98c2b8c90 | |
parent | 02caa057641218fef2bcc168719ac08c86f55505 (diff) |
fix for building with msvc
-rw-r--r-- | source/blender/blenlib/BLI_winstuff.h | 8 | ||||
-rw-r--r-- | source/blender/blenlib/intern/storage.c | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/blenlib/BLI_winstuff.h b/source/blender/blenlib/BLI_winstuff.h index 70c7f1d9cae..fe538fcb42a 100644 --- a/source/blender/blenlib/BLI_winstuff.h +++ b/source/blender/blenlib/BLI_winstuff.h @@ -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 diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c index c65123d39a4..6692ff8091c 100644 --- a/source/blender/blenlib/intern/storage.c +++ b/source/blender/blenlib/intern/storage.c @@ -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 |