[SCM] Gerris Flow Solver branch, upstream, updated. b3aa46814a06c9cb2912790b23916ffb44f1f203

Stephane Popinet popinet at users.sf.net
Fri May 15 02:55:14 UTC 2009


The following commit has been merged in the upstream branch:
commit 604c2d9ded53fd9c75d76f15383c9c3baade18e0
Author: Stephane Popinet <popinet at users.sf.net>
Date:   Thu Apr 10 19:32:17 2008 +1000

    Large file (> 2GiB) support for RStarTree
    
    darcs-hash:20080410093217-d4795-b8805ebe0f0d71870987b4949486d2e2029a1ceb.gz

diff --git a/modules/RStarTree/Makefile.am b/modules/RStarTree/Makefile.am
index c4a5e24..debc941 100644
--- a/modules/RStarTree/Makefile.am
+++ b/modules/RStarTree/Makefile.am
@@ -2,7 +2,7 @@
 
 noinst_LIBRARIES = libcSmRST.a
 
-libcSmRST_a_CFLAGS = $(AM_CFLAGS)
+libcSmRST_a_CFLAGS = $(AM_CFLAGS) -D_FILE_OFFSET_BITS=64
 libcSmRST_a_SOURCES = \
 		RStarTree.c \
 		RStarTree.h \
diff --git a/modules/RStarTree/RSTInOut.c b/modules/RStarTree/RSTInOut.c
index 35cb963..22eed0f 100644
--- a/modules/RStarTree/RSTInOut.c
+++ b/modules/RStarTree/RSTInOut.c
@@ -93,7 +93,7 @@ void ReadPage(RSTREE R,
 {
   int pnb; /* position or nbytes */
   
-  pnb= lseek(fd.f,pagenr*fd.bl,L_SET);
+  pnb= lseek(fd.f,(off_t)pagenr*(off_t)fd.bl,L_SET);
   if (pnb != -1) {
     pnb= read(fd.f,block,fd.bl);
   }
@@ -112,7 +112,7 @@ void WritePage(RSTREE R,
 {
   int pnb; /* position or nbytes */
   
-  pnb= lseek(fd.f,pagenr*fd.bl,L_SET);
+  pnb= lseek(fd.f,(off_t)pagenr*(off_t)fd.bl,L_SET);
   if (pnb != -1) {
     pnb= write(fd.f,block,fd.bl);
   }

-- 
Gerris Flow Solver



More information about the debian-science-commits mailing list