majek / csiphash

SipHash in C
https://github.com/majek/csiphash
48 stars 17 forks source link

more portable le64toh() #2

Open dankogai opened 11 years ago

dankogai commented 11 years ago

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

dankogai commented 11 years ago

Please use the latter. The former had an embarrassing typo.

Dan

majek commented 11 years ago

I'm not convinced. I prefer simplicity over portability.

majek commented 11 years ago

How about d493cb336d348c007952e9909428d03fc941658f ?

dankogai commented 11 years ago

Added NetBSD and OpenBSD to d493cb3

dankogai commented 11 years ago

The __BYTE_ORDER part was unconditionally define'd _le64toh as le64toh while OpenBSD defines that as letoh64. The latest patches address that.