On Sun, 12 Aug 2012, Aaron W. Hsu wrote:
> Marc Balmer <[email protected]> writes:
>
>> A possible solution could be to use long instead of int, as sizeof(long)
>> == sizeof(void *) on 32bit and 64bit linux. But if such values are used
>> in externalized binary form somewhere (tooltalk?) it might lead to
>> incompatabilities.
>
> This is not really future portable, and I would prefer to do this the
> correct way rather than just fudging it. Is there a reason we are not
> using pointer types here and are instead using integer types?
>
>
In cases where this is important, you could also use the '__LP64__'
define to detect systems where long == pointer in terms of size.
But just globally changing ints to long is a bad idea... pointers
should be used where possible, and longs where not (on LP64) systems.
--
Jon Trulson
"If the Martian rope-a-dope don't get him, he'll get himself, he'll
come in too fast and punch himself out."
- one of my brothers, referring to the Curiosity landing.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
cdesktopenv-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel