mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-17 10:52:46 +00:00
Fix compile-time endianness check to work on linux. As the original comment says, it's still not very robust.
This commit is contained in:
@ -46,13 +46,17 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
*
|
||||
***/
|
||||
|
||||
#ifdef _M_IX86
|
||||
# define LITTLE_ENDIAN 1
|
||||
#if defined(_M_IX86) || defined(i386) || defined(__i386__) || defined(__i386)
|
||||
# ifndef LITTLE_ENDIAN
|
||||
# define LITTLE_ENDIAN 1
|
||||
# endif
|
||||
#else
|
||||
# define BIG_ENDIAN 1
|
||||
# ifndef BIG_ENDIAN
|
||||
# define BIG_ENDIAN 1
|
||||
// That was a pretty weak check for endian-ness, if it
|
||||
// failed then we probably need to strengthen it a bit.
|
||||
# error "Are you sure this is a big-endian CPU?"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user