As far as I can tell, tooltalk makes no effort to be binary compatible between different platforms already; e.g. in the patch I recently submitted, that code sends part of a message of size uid_t which is not the same between different platforms. (although rpc itself should be platform independent) I'm not sure if there is a reason to talk to a nonlocal tooltalk daemon an7wa7.
size_t (large enough for any array indexing) is not _clearly guaranteed_ by the standard to be the same size as a pointer, but in reality I believe it is the same size pretty much everywhere, since array indexing is addition + dereferencing. For whatever reason, C does not allow you to perform bitwise operations on pointers; that's probably why they're being converted to int/longs. On Sun, Aug 12, 2012 at 4:01 PM, Jon Trulson <j...@radscan.com> wrote: > On Sun, 12 Aug 2012, Aaron W. Hsu wrote: > >> Marc Balmer <m...@msys.ch> 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 > cdesktopenv-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel ------------------------------------------------------------------------------ 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 cdesktopenv-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel