[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56116] trunk/blender/source/blender/ blenlib/intern/storage.c: Fix thumbnails not appearing on MinGW64, was actually a mistake on
Antony Riakiotakis
kalast at gmail.com
Wed Apr 17 21:35:34 CEST 2013
Revision: 56116
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56116
Author: psy-fi
Date: 2013-04-17 19:35:33 +0000 (Wed, 17 Apr 2013)
Log Message:
-----------
Fix thumbnails not appearing on MinGW64, was actually a mistake on
MinGW-w64 headers (where _stat is actually _stati64), but since we
recommend a specific compiler build it's OK for now. Also tweaked other
places where _wstat is used.
Modified Paths:
--------------
trunk/blender/source/blender/blenlib/intern/storage.c
Modified: trunk/blender/source/blender/blenlib/intern/storage.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/storage.c 2013-04-17 17:12:12 UTC (rev 56115)
+++ trunk/blender/source/blender/blenlib/intern/storage.c 2013-04-17 19:35:33 UTC (rev 56116)
@@ -525,7 +525,14 @@
{
int r;
UTF16_ENCODE(path);
+
+ /* workaround error in MinGW64 headers, normally, a wstat should work */
+ #ifndef __MINGW64__
r = _wstat(path_16, buffer);
+ #else
+ r = _wstati64(path_16, buffer);
+ #endif
+
UTF16_UN_ENCODE(path);
return r;
}
@@ -614,14 +621,24 @@
bool BLI_file_older(const char *file1, const char *file2)
{
#ifdef WIN32
+ #ifndef __MINGW32__
struct _stat st1, st2;
+ #else
+ struct _stati64 st1, st2;
+ #endif
UTF16_ENCODE(file1);
UTF16_ENCODE(file2);
+ #ifndef __MINGW32__
if (_wstat(file1_16, &st1)) return false;
if (_wstat(file2_16, &st2)) return false;
+ #else
+ if (_wstati64(file1_16, &st1)) return false;
+ if (_wstati64(file2_16, &st2)) return false;
+ #endif
+
UTF16_UN_ENCODE(file2);
UTF16_UN_ENCODE(file1);
#else
More information about the Bf-blender-cvs
mailing list