Open dankogai opened 11 years ago
Please use the latter. The former had an embarrassing typo.
Dan
I'm not convinced. I prefer simplicity over portability.
How about d493cb336d348c007952e9909428d03fc941658f ?
Added NetBSD and OpenBSD to d493cb3
The __BYTE_ORDER part was unconditionally define'd _le64toh as le64toh while OpenBSD defines that as letoh64. The latest patches address that.
Instead of checking OS platforms, it directly asks cpp for the endianness. That way the code should be more portable. Worked not only for OS X, FreeBSD and Linux but also Windows.
Dan