diff --git a/lib/isc/md5.c b/lib/isc/md5.c index 730198dc21..65e1725a09 100644 --- a/lib/isc/md5.c +++ b/lib/isc/md5.c @@ -41,6 +41,16 @@ #define BIG_ENDIAN __BIG_ENDIAN #endif +#if !defined(BYTE_ORDER) || \ + (BYTE_ORDER != BIG_ENDIAN && BYTE_ORDER != LITTLE_ENDIAN) + /* you must determine what the correct bit order is for + * your compiler - the next line is an intentional error + * which will force your compiles to bomb until you fix + * the above macros. + */ +#error "Undefined or invalid BYTE_ORDER"; +#endif + #if BYTE_ORDER == LITTLE_ENDIAN static void byteSwap(isc_uint32_t *buf, unsigned words) diff --git a/lib/isc/sha1.c b/lib/isc/sha1.c index 53f9a5d67c..7a1a276e79 100644 --- a/lib/isc/sha1.c +++ b/lib/isc/sha1.c @@ -15,7 +15,7 @@ * SOFTWARE. */ -/* $Id: sha1.c,v 1.3 2000/06/07 00:49:01 explorer Exp $ */ +/* $Id: sha1.c,v 1.4 2000/06/07 01:14:26 explorer Exp $ */ /* $NetBSD: sha1.c,v 1.5 2000/01/22 22:19:14 mycroft Exp $ */ /* $OpenBSD: sha1.c,v 1.9 1997/07/23 21:12:32 kstailey Exp $ */ @@ -54,6 +54,16 @@ #define BIG_ENDIAN __BIG_ENDIAN #endif +#if !defined(BYTE_ORDER) || \ + (BYTE_ORDER != BIG_ENDIAN && BYTE_ORDER != LITTLE_ENDIAN) + /* you must determine what the correct bit order is for + * your compiler - the next line is an intentional error + * which will force your compiles to bomb until you fix + * the above macros. + */ +#error "Undefined or invalid BYTE_ORDER"; +#endif + #define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits)))) /*