From: Mika Rautio Date: Mon, 5 Dec 2016 10:33:48 +0000 (+0200) Subject: MinGW __stat64 support depends on MSVCRT version X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f9cce7f59c5c4fa824d5e2f9f84d3fe2e09d88ad;p=platform%2Fupstream%2Fassimp.git MinGW __stat64 support depends on MSVCRT version --- diff --git a/code/DefaultIOStream.cpp b/code/DefaultIOStream.cpp index 11bad9b..1907709 100644 --- a/code/DefaultIOStream.cpp +++ b/code/DefaultIOStream.cpp @@ -120,13 +120,13 @@ size_t DefaultIOStream::FileSize() const // // See here for details: // https://www.securecoding.cert.org/confluence/display/seccode/FIO19-C.+Do+not+use+fseek()+and+ftell()+to+compute+the+size+of+a+regular+file -#if defined _WIN32 +#if defined _WIN32 && (!defined __GNUC__ || __MSVCRT_VERSION__ >= 0x0601) struct __stat64 fileStat; int err = _stat64( mFilename.c_str(), &fileStat ); if (0 != err) return 0; mCachedSize = (size_t) (fileStat.st_size); -#elif defined __gnu_linux__ || defined __APPLE__ || defined __MACH__ +#elif defined __GNUC__ || defined __APPLE__ || defined __MACH__ struct stat fileStat; int err = stat(mFilename.c_str(), &fileStat ); if (0 != err)