add header to replace endianness functions

almost warning-free now!