summaryrefslogtreecommitdiff
path: root/util/endian.h
blob: 014703f83a1241d0cc4a0bb523fb9874aacbf64d (plain)
1
2
3
4
5
6
7
#include <stdint.h>

static const uint16_t be_test = 1;
#define is_big_endian() ((* (char *) &be_test) == 0)

//returns bytes in little endian order (smallest first)
uint8_t *bytes_le_order(uint64_t in);