Quoth Alex Musolino <a...@musolino.id.au>:
> > I'm getting rid of ape but I need the functions at
> > /sys/src/ape/lib/bsd/ntohl.c to port some software.  These functions
> > just change endianness.  Is there some native similar functions
> > somebody is aware of?  lookman is not helping me here.  I don't want
> > to add code if a similar functionality is already in the system.
> 
> No. Those functions are mental.  The Plan 9 way is so simple that
> there's no library, everyone just brings their own macros/functions.
> The trick is: if you care about the order of bytes then you should be
> dealing with a byte array, not a native integral type.

see also:

https://commandcenter.blogspot.com/2012/04/byte-order-fallacy.html



------------------------------------------
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/Tbf58310b561cd180-M11b2b34d2e1336b13546b09f
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

Reply via email to