diff --git a/libraries/libmdb/mdb.c b/libraries/libmdb/mdb.c index fb0df16..9d925ca 100644 --- a/libraries/libmdb/mdb.c +++ b/libraries/libmdb/mdb.c @@ -48,6 +48,7 @@ #include #include +#include #include #include #include @@ -63,6 +64,12 @@ #include "mdb.h" #include "midl.h" +#if (__BYTE_ORDER == __LITTLE_ENDIAN) == (__BYTE_ORDER == __BIG_ENDIAN) +# error "Unknown or unsupported endianness (__BYTE_ORDER)" +#elif (-6 & 5) || CHAR_BIT != 8 || UINT_MAX < 0xffffffff || ULONG_MAX % 0xFFFF +# error "Two's complement, reasonably sized integer types, please" +#endif + /** @defgroup internal MDB Internals * @{ */