Building opendx (cvs) on a suse 10
(gcc version 4.0.2 20050901 (prerelease) (SUSE Linux) )

I ended up with a not working ui executable.
For what I understand, the definition of
XmNselectCallback (that is already defined in system header)
in src/uipp/widgets/XmDX.h was the cuprit.
After applying this patch everything seems to work fine, but I don't know it this is the correct way to go.

Index: src/uipp/widgets/XmDX.h
===================================================================
RCS file: /src/master/dx/src/uipp/widgets/XmDX.h,v
retrieving revision 1.9
diff -u -r1.9 XmDX.h
--- src/uipp/widgets/XmDX.h     30 Sep 2003 17:41:49 -0000      1.9
+++ src/uipp/widgets/XmDX.h     21 Nov 2005 14:34:57 -0000
@@ -172,7 +172,7 @@
 #define XmNscrolledWindowWidget "scrolledWindowWidget"
 #define XmNminColumnWidth      "minColumnWidth"
 #define XmCMinColumnWidth      "MinColumnWidth"
-#define XmNselectCallback       "selectCallback"
+/*#define XmNselectCallback       "selectCallback"*/

 #define XmNdisplayGlobe                        "displayGlobe"
 #define XmCDisplayGlobe                        "DisplayGlobe"



I also found this warning:

hash.c: In function '_QueryHashElement':
hash.c:409: warning: operation on 'slot' may be undefined
hash.c: In function '_InsertHashLeaf':
hash.c:684: warning: operation on 'slot' may be undefined
hash.c: In function '_splitLeaf':
hash.c:779: warning: operation on 'slot' may be undefined

The warning seems reasonable, and I think that a possible
solution (afeter checking that LEAF_INCREMENT
is used only in this way,

i = LEAF_INCREMENT(i);

)
could be

Index: src/exec/libdx/hash.c
===================================================================
RCS file: /src/master/dx/src/exec/libdx/hash.c,v
retrieving revision 1.5
diff -u -r1.5 hash.c
--- src/exec/libdx/hash.c       13 Apr 2005 19:19:17 -0000      1.5
+++ src/exec/libdx/hash.c       21 Nov 2005 14:34:55 -0000
@@ -119,7 +119,7 @@
 };

 #define LEAF_INDEX(pseudoKey)    ((pseudoKey) & LEAF_WRAP)
-#define LEAF_INCREMENT(leafIndex) ((++leafIndex) & LEAF_WRAP)
+#define LEAF_INCREMENT(leafIndex) ((leafIndex+1) & LEAF_WRAP)

 #define DATA_PTR(elt) (Element)(((char *)elt)+sizeof(struct hashElement))



Regards,

Marco

Reply via email to