RE: need help on porting from 32bit to 64bit.
RE: need help on porting from 32bit to 64bit.
- Subject: RE: need help on porting from 32bit to 64bit.
- From: Nathan Herring <email@hidden>
- Date: Mon, 3 May 2010 19:09:49 +0000
- 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=email@hidden [mailto:darwin-dev-bounces+nathanh=email@hidden] On Behalf Of Jean-Daniel Dupas
Sent: Wednesday, April 21, 2010 6:02 AM
To: Arnab Ganguly
Cc: email@hidden 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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden