hats
hats copied to clipboard
Allows eepdump and eepmake to be compiled on Mac OS
Mac OS X doesn't provide endian.h.
It's only required for the be32toh and htobe32 utility functions.
Mac OS X provides similare functions in libkern/OSByteOrder.h.
Respectively OSSwapHostToBigInt32 for htobe32 and OSSwapBigToHostInt32 for be32toh.
This adds a preprocessor condition to include endian.h on non apple system and to include libkern/OSByteOrder.h as well as defining to macro to provide htobe32 and be32toh on apple plateform.