diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c index 2d72922ccf7..def44bb69f2 100644 --- a/source/blender/blenlib/intern/storage.c +++ b/source/blender/blenlib/intern/storage.c @@ -188,7 +188,7 @@ double BLI_diskfree(char *dir) if (slash) slash[1] = 0; } else strcpy(name,"/"); -#if defined (__FreeBSD__) || defined (linux) || defined (__OpenBSD__) +#if defined (__FreeBSD__) || defined (linux) || defined (__OpenBSD__) || defined (__APPLE__) if (statfs(name, &disk)) return(-1); #endif #ifdef __BeOS @@ -316,8 +316,13 @@ void BLI_adddirstrings() char size[250]; static char * types[8] = {"---", "--x", "-w-", "-wx", "r--", "r-x", "rw-", "rwx"}; int num, mode; - int num1, num2, num3, num4, st_size; - + int num1, num2, num3, num4; +#ifdef WIN32 + __int64 st_size; +#else + long long st_size; +#endif + struct direntry * file; struct tm *tm; time_t zero= 0; @@ -372,7 +377,7 @@ void BLI_adddirstrings() strftime(files[num].time, 8, "%H:%M", tm); strftime(files[num].date, 16, "%d-%b-%y", tm); - st_size= (int)files[num].s.st_size; + st_size= files[num].s.st_size; num1= st_size % 1000; num2= st_size/1000; diff --git a/source/blender/src/filesel.c b/source/blender/src/filesel.c index afeab4a0544..a30b3da8f44 100644 --- a/source/blender/src/filesel.c +++ b/source/blender/src/filesel.c @@ -394,7 +394,8 @@ void clear_global_filesel_vars() void filesel_statistics(SpaceFile *sfile, int *totfile, int *selfile, float *totlen, float *sellen) { - int a, len; + double len; + int a; *totfile= *selfile= 0; *totlen= *sellen= 0; diff --git a/source/blender/src/header_filesel.c b/source/blender/src/header_filesel.c index 2c068aae627..5310683b1e1 100644 --- a/source/blender/src/header_filesel.c +++ b/source/blender/src/header_filesel.c @@ -153,7 +153,7 @@ void file_buttons(void) filesel_statistics(sfile, &totfile, &selfile, &totlen, &sellen); - sprintf(naam, "Free: %.3f Mb Files: (%d) %d (%.3f) %.3f Mb", df, selfile,totfile, sellen, totlen); + sprintf(naam, "Free: %.3f MB Files: (%d) %d (%.3f) %.3f MB", df, selfile,totfile, sellen, totlen); cpack(0x0); glRasterPos2i(xco, 5);