This patch fixes a simple cast error, by including wordsize.h, to tell wether 
we're 32 or 64 bit.

required for AMD64 compilation. Committing.

Julia Longtin <[EMAIL PROTECTED]>
--- ../../dev3/gift/ChangeLog   2006-11-18 12:03:45.000000000 -0600
+++ ChangeLog   2006-11-18 12:18:55.000000000 -0600
@@ -8,6 +8,9 @@
        * dtd/Makefile.am
        make mv invocations use ${top_builddir}, so that we can build gift in a 
directory other than ${srcdir}
        replace "../" with appropriate autoconf variables.
+       * libMRML/cc/CAttributeList.cc
+       include wordsize.h, so we can tell if we're a 64 or 32bit binary during 
build.
+       when dumping pointer as int, check the size of the pointer before 
casting.
 
 2006-10-10    <[EMAIL PROTECTED]>
 
--- ../../dev3/gift/libMRML/cc/CAttributeList.cc        2006-02-28 
07:48:22.000000000 -0600
+++ libMRML/cc/CAttributeList.cc        2006-11-18 12:14:09.000000000 -0600
@@ -27,6 +27,8 @@
 #include "libMRML/include/CMutex.h"
 #include <iostream>
 #include <algorithm>
+/* for __WORDSIZE */
+#include <bits/wordsize.h>
 extern CMutex* gMutex;
 
 CAttributeList::CAttributeList(const char * const * const inAttributeList){
@@ -94,7 +96,11 @@
       
     if(strcmp(i->second.first,
                   i->second.second)){
-      cout << "DELETING FAILED" << flush << int(i->second.second) << flush << 
i->second.first << i->second.second << endl;
+#if __WORDSIZE==64 /* this should tell us what size a float* is, so that we 
can dump it properly.. */
+      cout << "DELETING FAILED" << flush << int64_t(i->second.second) << flush 
<< i->second.first << i->second.second << endl;
+#else
+      cout << "DELETING FAILED" << flush << int32_t(i->second.second) << flush 
<< i->second.first << i->second.second << endl;
+#endif
       assert(0);
     }
     delete[] i->second.first;
_______________________________________________
help-GIFT mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gift

Reply via email to