From 5424f22bd27f1007f2d79f80bacd23b1ab37b497 Mon Sep 17 00:00:00 2001 From: Sharif Olorin Date: Tue, 19 Jul 2016 07:20:43 +0000 Subject: [PATCH] Fail if someone tries to compile us on a big-endian CPU Unlikely as that may be. Have a bunch of LE-specific optimisations in place. --- cbits/warden.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cbits/warden.h b/cbits/warden.h index 37a3203..eb67f3e 100644 --- a/cbits/warden.h +++ b/cbits/warden.h @@ -4,6 +4,12 @@ #include #include +#include + +#if __BYTE_ORDER != __LITTLE_ENDIAN +#error "warden only works on little-endian architectures." +#endif + typedef uint8_t bool; #define TRUE 1