ivtools build failures with gcc40 in 64 bit arches
Agustin Martin <[email protected]> Fri, 23 Oct 2009 17:30:56 +0200
| Newsgroups | gmane.comp.lib.ivtools.devel |
|---|---|
| Message-ID | <[email protected]> |
--mP3DRpeJDSE+ciuQ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hi,
The old build failure due to the different pointer lenght in 32 and 64 bit
arches came back,
http://bugs.debian.org/545834
The reason is that not all issues from http://bugs.debian.org/314666 were
fixed with the applied patch. Note that a pointer does not fit in an integer
on 64 bit arches. A pointer is 64 bit, an integer 32 bit.
I am attaching a quick and dirty patch which mostly does what was proposed
in #314666 for that part, but using c99 typedefs intptr_t and uintptr_t,
from libc6 stdint.h, instead of unconditional long. I think they are present
in current libc variants, but you may prefer something more general or
moving its use for boolean to the boolean definition.
Hope this helps anyway.
Cheers,
--
Agustin
--mP3DRpeJDSE+ciuQ
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="48_gcc40_int_pointer_errors.diff"
Index: ivtools-1.2.6/src/Attribute/attrvalue.c
===================================================================
--- ivtools-1.2.6.orig/src/Attribute/attrvalue.c 2008-02-12 19:38:19.000000000 +0100
+++ ivtools-1.2.6/src/Attribute/attrvalue.c 2009-09-27 23:56:17.000000000 +0200
@@ -357,7 +357,7 @@
case AttributeValue::StringType:
return (boolean) int_val()!=-1;
case AttributeValue::ObjectType:
- return (boolean) obj_val();
+ return (intptr_t) obj_val();
case AttributeValue::StreamType:
return stream_mode() != 0;
default:
@@ -516,7 +516,7 @@
case AttributeValue::SymbolType:
return (unsigned int) int_val();
case AttributeValue::ObjectType:
- return (unsigned int)obj_val();
+ return (uintptr_t) obj_val();
default:
return 0;
}
@@ -549,7 +549,7 @@
case AttributeValue::SymbolType:
return int_ref();
case AttributeValue::ObjectType:
- return (int)obj_val();
+ return (intptr_t) obj_val();
default:
return 0;
}
--mP3DRpeJDSE+ciuQ
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
--mP3DRpeJDSE+ciuQ
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Ivtools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ivtools-devel
--mP3DRpeJDSE+ciuQ--