Define macros of endian memory reader/writer.