From: Ted Lemon Date: Thu, 1 Jul 1999 19:25:01 +0000 (+0000) Subject: - Conditionalize definition of byte order constants, in case BIND headers X-Git-Tag: V3-BETA-1-PATCH-0~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b0a0945b94d8a63bdc0eb25b3752939e8d132b8;p=thirdparty%2Fdhcp.git - Conditionalize definition of byte order constants, in case BIND headers define them. --- diff --git a/includes/cf/sunos5-5.h b/includes/cf/sunos5-5.h index 94d0ee333..ec01e5979 100644 --- a/includes/cf/sunos5-5.h +++ b/includes/cf/sunos5-5.h @@ -126,15 +126,23 @@ extern int h_errno; /* Solaris doesn't provide an endian.h, so we have to do it. */ -#define BIG_ENDIAN 1 -#define LITTLE_ENDIAN 2 -#if defined (__i386) || defined (i386) -# define BYTE_ORDER LITTLE_ENDIAN -#else -# if defined (__sparc) || defined (sparc) -# define BYTE_ORDER BIG_ENDIAN +#if !defined (BIG_ENDIAN) +# define BIG_ENDIAN 1 +#endif + +#if !defined (BIG_ENDIAN) +# define LITTLE_ENDIAN 2 +#endif + +#if !defined (BYTE_ORDER) +# if defined (__i386) || defined (i386) +# define BYTE_ORDER LITTLE_ENDIAN # else +# if defined (__sparc) || defined (sparc) +# define BYTE_ORDER BIG_ENDIAN +# else @@@ ERROR @@@ Unable to determine byte order! +# endif # endif #endif