Windows: use int64_t instead of off_t
authorCampbell Barton <ideasman42@gmail.com>
Tue, 19 Mar 2019 09:28:05 +0000 (20:28 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 19 Mar 2019 09:29:45 +0000 (20:29 +1100)
Avoids 2gb file size limit.

source/blender/blenkernel/intern/bpath.c
source/blender/imbuf/intern/jp2.c

index e85cb70..3d91283 100644 (file)
@@ -211,7 +211,7 @@ static bool missing_files_find__recursive(
         char *filename_new,
         const char *dirname,
         const char *filename,
-        off_t *r_filesize,
+        int64_t *r_filesize,
         int *r_recur_depth)
 {
        /* file searching stuff */
@@ -219,7 +219,7 @@ static bool missing_files_find__recursive(
        struct dirent *de;
        BLI_stat_t status;
        char path[FILE_MAX];
-       off_t size;
+       int64_t size;
        bool found = false;
 
        dir = opendir(dirname);
@@ -275,7 +275,7 @@ static bool missing_files_find__visit_cb(void *userdata, char *path_dst, const c
        BPathFind_Data *data = (BPathFind_Data *)userdata;
        char filename_new[FILE_MAX];
 
-       off_t filesize = -1;
+       int64_t filesize = -1;
        int recur_depth = 0;
        bool found;
 
index c3690bc..aaeb4e4 100644 (file)
@@ -138,7 +138,7 @@ static void info_callback(const char *msg, void *client_data)
 struct BufInfo {
        const unsigned char *buf;
        const unsigned char *cur;
-       off_t len;
+       OPJ_OFF_T len;
 };
 
 static void opj_read_from_buffer_free(void *UNUSED(p_user_data))