Changeset: 6d9da887ed32 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6d9da887ed32
Modified Files:
        gdk/gdk_bat.c
Branch: default
Log Message:

Windows doesn't always use off_t as type for st_size.


diffs (21 lines):

diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c
--- a/gdk/gdk_bat.c
+++ b/gdk/gdk_bat.c
@@ -326,7 +326,7 @@ BATattach(int tt, const char *heapfile, 
                struct stat st;
                int atomsize;
                BUN cap;
-               off_t n;
+               lng n;
 
                if (fstat(fileno(f), &st) < 0) {
                        GDKsyserror("BATattach: cannot stat %s\n", heapfile);
@@ -351,7 +351,7 @@ BATattach(int tt, const char *heapfile, 
                        return NULL;
                }
                p = Tloc(bn, 0);
-               n = st.st_size;
+               n = (lng) st.st_size;
                while (n > 0 && (m = fread(p, 1, (size_t) MIN(1024*1024, n), 
f)) > 0) {
                        p += m;
                        n -= m;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to