added a couple of tweaks to make the code more configurable and smaller
[rofl0r-rocksock.git] / endianness.h
blob7c0f1bc2ed14d79c19e5a3ac54c8b8ef8b318bce
1 /*
2 * Endianness.h
4 * Created on: 29.11.2010
5 *
6 * author: rofl0r
7 *
8 * License: LGPL 2.1+ with static linking exception
9 *
12 #ifndef ENDIANNESS_H_
13 #define ENDIANNESS_H_
15 #ifdef __linux
16 #include <endian.h>
17 #else
18 #include <machine/endian.h>
19 #endif
21 //#include <stdint.h>
22 //#define IS_BIG_ENDIAN (*(uint16_t *)"\0\xff" < 0x100)
24 #if __BYTE_ORDER == __LITTLE_ENDIAN
25 #define IS_LITTLE_ENDIAN
26 #endif
28 #endif /* ENDIANNESS_H_ */