$NetBSD: patch-ac,v 1.2 2002/10/29 16:50:14 drochner Exp $ --- ./scsilib/include/btorder.h.orig Sun Nov 25 16:35:10 2001 +++ ./scsilib/include/btorder.h Tue Oct 29 09:33:02 2002 @@ -63,35 +63,21 @@ #endif -/* - * Convert byte-order definitions from xconfig.h into our values - * and verify them. - */ -#if defined(HAVE_C_BIGENDIAN) && \ - !defined(WORDS_BIGENDIAN) -#define WORDS_LITTLEENDIAN -#define _LITTLE_ENDIAN -#endif - -#if defined(HAVE_C_BIGENDIAN) && \ - defined(WORDS_BIGENDIAN) -#define _BIG_ENDIAN -#endif - -#if defined(_LITTLE_ENDIAN) && defined(_BIG_ENDIAN) -/* - * #error will not work for all compilers (e.g. sunos4) - * The following line will abort compilation on all compilers - * if none of the above is defines. And that's what we want. - */ -error Only one of _LITTLE_ENDIAN or _BIG_ENDIAN may be defined -#endif #if defined(_BIT_FIELDS_LTOH) || defined(_BIT_FIELDS_HTOL) /* * Bitorder is already known. */ + +#elif defined(__NetBSD__) +#include +#if BYTE_ORDER == LITTLE_ENDIAN +#define _BIT_FIELDS_LTOH +#else +#define _BIT_FIELDS_HTOL +#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + #else /* * Bitorder not yet known.