[SCM] Gerris Flow Solver branch, upstream, updated. b3aa46814a06c9cb2912790b23916ffb44f1f203
Stephane Popinet
popinet at users.sf.net
Fri May 15 02:55:48 UTC 2009
The following commit has been merged in the upstream branch:
commit 2e48480f54e8ea5d58968d6d291d56ff5053f95c
Author: Stephane Popinet <popinet at users.sf.net>
Date: Wed Oct 22 10:35:48 2008 +1100
Terrain databases were incompatible between 32 and 64 bits
This is fixed but you will need to regenerate the databases...
darcs-hash:20081021233548-d4795-420dd231d4a95c968454a41942f4c714ae1c91f1.gz
diff --git a/modules/RStarTree/RSTBase.h b/modules/RStarTree/RSTBase.h
index 9a44dd3..e93fdc6 100644
--- a/modules/RStarTree/RSTBase.h
+++ b/modules/RStarTree/RSTBase.h
@@ -19,7 +19,6 @@ Vector types are always called <..>Array.
*/
/*** End ----- naming rules for structured types ----- **********/
-
/* constants */
#define SIZEfixblock 512
@@ -62,6 +61,7 @@ typedef enum {
typedef struct {
typrect rect;
int ptrtosub;
+ PADDING_32_BITS;
typdirinfo info;
} typDIRent, *refDIRent; /* inner entry */
typedef struct {
@@ -84,6 +84,7 @@ typedef typDATAent typDATAentries[EntryRange];
typedef struct {
int nofentries;
+ PADDING_32_BITS;
typDIRentries entries; /* 0 .. nofentries-1 !! */
} typDIRnode, *refDIRnode; /* inner node */
typedef struct {
@@ -166,6 +167,7 @@ typedef struct {
typparamblock parameters;
typcount count;
boolean RSTDone;
+ PADDING_32_BITS;
refnode helpdirnode, helpdatanode, Ntosplit, Nsibling;
typfiledesc dir, data, dirPD, dataPD;
RSTName dirname;
@@ -182,6 +184,7 @@ typedef
typedef
struct {
int nofentries;
+ PADDING_32_BITS;
typ2DIRentries entries;
} typDIRnodeOf2; /* inner node containing 2 entries */
typedef
@@ -197,6 +200,7 @@ typedef
typedef
struct {
int nofentries;
+ PADDING_32_BITS;
typ3DIRentries entries;
} typDIRnodeOf3; /* inner node containing 3 entries */
typedef
diff --git a/modules/RStarTree/RSTInterUtil.c b/modules/RStarTree/RSTInterUtil.c
index f76ee7b..be01685 100644
--- a/modules/RStarTree/RSTInterUtil.c
+++ b/modules/RStarTree/RSTInterUtil.c
@@ -249,10 +249,12 @@ void SetCheckDir(RSTREE R, boolean creation)
REALSIZE_DIRnofentries= SIZE_DIRnodeOf3 - 3 * (*par).direntrylen;
(*par).SIZE_DIRnofentries= REALSIZE_DIRnofentries; /* set */
if (creation) {
+#if 0
if (PACKEDSIZE_DIRnofentries != (*par).SIZE_DIRnofentries) {
fprintf(stderr,"\n%s\n"," ----- WARNING -----");
fprintf(stderr,"%s\n","Gap before directory entries!");
}
+#endif
}
else {
if ((*par).SIZE_DIRnofentries != REALSIZE_DIRnofentries) {
diff --git a/modules/RStarTree/RStarTree.h b/modules/RStarTree/RStarTree.h
index f8bd94c..7652db3 100644
--- a/modules/RStarTree/RStarTree.h
+++ b/modules/RStarTree/RStarTree.h
@@ -36,6 +36,14 @@
#include <fcntl.h>
+/* padding on 32 bits systems (to match automatic 64 bits padding) */
+
+#if defined (__LP64__) || defined (__64BIT__) || defined (_LP64) || (__WORDSIZE == 64)
+ #define PADDING_32_BITS
+#else
+ #define PADDING_32_BITS int padding
+#endif
+
/* ----------------------------- constants ----------------------------- */
#define byte unsigned char
@@ -93,6 +101,7 @@ typedef struct {
double H5, H6;
float Hmin, Hmax;
int n;
+ PADDING_32_BITS;
} typdirinfo;
/* A typdirinfo is a struct which may contain arbitrary information
diff --git a/modules/rsurface.h b/modules/rsurface.h
index 4e24112..4eedfc9 100644
--- a/modules/rsurface.h
+++ b/modules/rsurface.h
@@ -1,3 +1,11 @@
+/* padding on 32 bits systems (to match automatic 64 bits padding) */
+
+#if defined (__LP64__) || defined (__64BIT__) || defined (_LP64) || (__WORDSIZE == 64)
+ #define PADDING_32_BITS
+#else
+ #define PADDING_32_BITS int padding
+#endif
+
typedef struct _RSurface RSurface;
typedef struct { /* needs to be identical to typdirinfo in RStarTree.h */
@@ -10,6 +18,7 @@ typedef struct { /* needs to be identical to typdirinfo in RStarTree.h */
double H5, H6;
float Hmin, Hmax;
int n;
+ PADDING_32_BITS;
} RSurfaceSum;
typedef struct {
--
Gerris Flow Solver
More information about the debian-science-commits
mailing list