RE: need help on porting from 32bit to 64bit.
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Thread-index: AQHK4UsWDE8FDlQJZUuI5GvGFWzrkJItTW+AgAAK8gCAEsyAIA== Thread-topic: need help on porting from 32bit to 64bit. GNU also has some compiler intrinsics to perform the same, so you can avoid the cost of the function call to OS services. http://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html see __builtin_bswap32 __builtin_bswap64 -----Original Message----- From: darwin-dev-bounces+nathanh=microsoft.com@lists.apple.com [mailto:darwin-dev-bounces+nathanh=microsoft.com@lists.apple.com] On Behalf Of Jean-Daniel Dupas Sent: Wednesday, April 21, 2010 6:02 AM To: Arnab Ganguly Cc: darwin-dev@lists.apple.com Dev Subject: Re: need help on porting from 32bit to 64bit. Swapping byte on OS X is a matter of taste. OSSwap API (libkern) NSSwap API (Foundation) CFSwap API (CoreFoundation) Core Endian API (CoreServices) and probably other hidden somewhere. Le 21 avr. 2010 à 14:22, Nico Schmidt a écrit :
What about OSSwapBigToHostInt64 and OSSwapHostToBigInt64 both from #include <libkern/OSByteOrder.h> ?
Nico
On 21.04.2010, at 14:05, Arnab Ganguly wrote:
Hi All, I am porting my application from 32bit to 64bit.I see functions like ntohl and htonl is being used. What should I use it equivalent in 64bit code base. Thanks, -A
-- Jean-Daniel _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Nathan Herring