>On Thu, Feb 14, 2008 at 08:04:57PM +0530, Rishi M Nair wrote:
>> --- byteorder.h.orig Tue Oct  2 19:44:36 2007
>> +++ byteorder.h      Thu Feb 14 17:53:39 2008
>> @@ -50,6 +50,17 @@
>>  #include <asm/byteorder.h>
>>  #endif
>>  
>> +#ifndef htonll
>> +#ifdef _BIG_ENDIAN
>> +#define htonll(x)   (x)
>> +#define ntohll(x)   (x)
>> +#else
>> +#define htonll(x)   ((((uint64_t)htonl(x)) << 32) + htonl(x >> 32))
>> +#define ntohll(x)   ((((uint64_t)ntohl(x)) << 32) + ntohl(x >> 32))
>> +#endif
>> +#endif
>> +
>> +
>>  #ifdef      __cplusplus
>>  extern "C" {
>>  #endif
>
>Be careful - sometimes these simple bugfixes aren't that simple.
>
>There are other definitions of htonll() you'll need to plug in as well:
>
>       usr/src/stand/lib/xdr/byteorder.c
>
>       usr/src/uts/intel/ia32/ml/ia32.il
>
>       usr/src/uts/intel/ia32/ml/i86_subr.s
>
>       usr/src/uts/intel/amd64/ml/amd64.il
>
>Also, there are some htonll macros defined for specific modules that should
>be ripped out so they start using systemwide ones.


And you must make sure that the htonll macros are not visible in strict
standard conformant mode.

Casper


Reply via email to