Joerg Schilling wrote:
> "Garrett D'Amore" <[EMAIL PROTECTED]> wrote:
>
>
>>> 2. How to handle the Endian methods(LE/BE) in solaris?
>>>
>>>
>> In application space, htons and htonl are the common methods. Generally
>> you only care about endianness when dealing with data being exchanged,
>> and normally you just need network byte order which is handled by htonl
>> and htons. If you have other needs, you may need to implement it
>> yourself. There are macros, _BIG_ENDIAN and _LITTLE_ENDIAN which will
>> report the native byte order for the machine.
>>
>
> But these macros are not POSIX.
>
Perhaps (I don't know). But I also don't know what the portable way for
doing this would be apart from either writing your own tests, using
autoconf (bleh), or htons/htonl. I don't know why anyone would need to
deal with little-endian byte order in userland code, anyway.
-- Garrett
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code