From f1a131e62be1116c71c2ee5a64ed96e402c9327e Mon Sep 17 00:00:00 2001 From: havoc Date: Thu, 11 Jan 2007 04:43:48 +0000 Subject: [PATCH] try harder to identify little endian cpus when BYTE_ORDER is undefined git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6681 d7cf8633-e32d-0410-b094-e92efae38249 --- common.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common.h b/common.h index 485d3eb6..64eecf31 100644 --- a/common.h +++ b/common.h @@ -84,8 +84,9 @@ void Com_BlockFullChecksum (void *buffer, int len, unsigned char *outbuf); #endif // If we still don't know the CPU endianess at this point, we try to guess +// normally including sys/types.h includes endian.h for the platform, which defines BYTE_ORDER, LITTLE_ENDIAN, and BIG_ENDIAN, however endian.h is a BSD-ism, and may not be present on all platforms (particularly windows) #ifndef BYTE_ORDER -# if defined(WIN32) +# if defined(WIN32) || defined (__i386) || defined(__amd64) # define BYTE_ORDER LITTLE_ENDIAN # else # if defined(SUNOS) -- 2.39.2