Re: ivtools build failures with gcc40 in 64 bit arches

Scott Johnston <[email protected]> Fri, 23 Oct 2009 10:15:43 -0700
Newsgroups gmane.comp.lib.ivtools.devel
Message-ID <[email protected]>
Agustin,

Does the contents of this patch resolve a compiler error or a  
warning?  Information is still being lost, but if it this fools the  
compiler, I'm fine with that.

Casting a pointer to boolean, int, or unsigned int is kind of  
meaningless (other than comparison to NULL), and was only supported  
for debug purposes.

Scott

On Oct 23, 2009, at 8:30 AM, Agustin Martin wrote:

> 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
> < 
> 48_gcc40_int_pointer_errors 
> .diff 
> > 
> ------------------------------------------------------------------------------
> 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_______________________________________________
> Ivtools-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ivtools-devel



------------------------------------------------------------------------------
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