polonium/include/endianness_tools.h

18 lines
339 B
C

#ifndef _ENDIANNESS_TOOLS_H
#define _ENDIANNESS_TOOLS_H
#include <stdint.h>
#include <string.h>
enum endiannesses {
UNSUPPORTED_ENDIANNESS,
DETECTED_LITTLE_ENDIAN,
DETECTED_BIG_ENDIAN
};
typedef enum endiannesses endianness_t;
endianness_t detect_endianness(void);
void reorder_b32(uint32_t* ptr);
#endif /* _ENDIANNESS_TOOLS_H */