Revision: 30753 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30753 Author: nazgul Date: 2010-07-26 12:41:26 +0200 (Mon, 26 Jul 2010)
Log Message: ----------- [#22846] GCC 4.4.1 support in Windows In this commit i've fixed crash when opening file browser. This crash was caused by different _stat structures size in storage.c and filelist.c (because of force setting __MSVCRT_VERSION__ in storage.c), other errors from report were fixed earlier. I've used _stati64 strcutrure and functions and tested on official mingw-gcc 3.4.5, official mingw-gcc 4.4.0, tdm-mingw-gcc 4.4.1, cross mingw-gcc 4.4.4 and cross mingw-gcc 4.2.1-sjlj -- everything was ok in this configurations (except openexr and opencollada libraries which requires sjlj compiler, so i was unable to build blender with that libraries by official mingw-gcc 4.4.0) Modified Paths: -------------- trunk/blender/source/blender/blenlib/BLI_storage_types.h trunk/blender/source/blender/blenlib/intern/storage.c Modified: trunk/blender/source/blender/blenlib/BLI_storage_types.h =================================================================== --- trunk/blender/source/blender/blenlib/BLI_storage_types.h 2010-07-26 10:31:51 UTC (rev 30752) +++ trunk/blender/source/blender/blenlib/BLI_storage_types.h 2010-07-26 10:41:26 UTC (rev 30753) @@ -58,6 +58,8 @@ char *path; #if (defined(WIN32) || defined(WIN64)) && (_MSC_VER>=1500) struct _stat64 s; +#elif defined(__MINGW32__) + struct _stati64 s; #else struct stat s; #endif Modified: trunk/blender/source/blender/blenlib/intern/storage.c =================================================================== --- trunk/blender/source/blender/blenlib/intern/storage.c 2010-07-26 10:31:51 UTC (rev 30752) +++ trunk/blender/source/blender/blenlib/intern/storage.c 2010-07-26 10:41:26 UTC (rev 30753) @@ -29,11 +29,6 @@ * Some really low-level file thingies. */ -/* needed for mingw & _stat64i32 */ -#ifdef FREE_WINDOWS -# define __MSVCRT_VERSION__ 0x0800 -#endif - #include <sys/types.h> #include <stdio.h> #include <stdlib.h> @@ -255,6 +250,8 @@ // Excluding other than current MSVC compiler until able to test. #if (defined(WIN32) || defined(WIN64)) && (_MSC_VER>=1500) _stat64(dlink->name,&files[actnum].s); +#elif defined(__MINGW32__) + _stati64(dlink->name,&files[actnum].s); #else stat(dlink->name,&files[actnum].s); #endif @@ -449,14 +446,14 @@ if (len > 3 && ( tmp[len-1]=='\\' || tmp[len-1]=='/') ) tmp[len-1] = '\0'; res = _stat(tmp, &st); if (res == -1) return(0); -#elif defined(WIN32) && defined(__MINGW32__) - struct stat st; +#elif defined(__MINGW32__) + struct _stati64 st; char tmp[FILE_MAXDIR+FILE_MAXFILE]; int len, res; BLI_strncpy(tmp, name, FILE_MAXDIR+FILE_MAXFILE); len = strlen(tmp); if (len > 3 && ( tmp[len-1]=='\\' || tmp[len-1]=='/') ) tmp[len-1] = '\0'; - res = stat(tmp, &st); + res = _stati64(tmp, &st); if (res) return(0); #else struct stat st; _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs