Skip to content

Commit

Permalink
Fail if someone tries to compile us on a big-endian CPU
Browse files Browse the repository at this point in the history
Unlikely as that may be. Have a bunch of LE-specific optimisations in place.
  • Loading branch information
olorin committed Jul 19, 2016
1 parent 5e92646 commit 5424f22
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cbits/warden.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
#include <stdlib.h>
#include <stdint.h>

#include <endian.h>

#if __BYTE_ORDER != __LITTLE_ENDIAN
#error "warden only works on little-endian architectures."
#endif

typedef uint8_t bool;

#define TRUE 1
Expand Down

0 comments on commit 5424f22

Please sign in to comment.