mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 11:19:10 +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
|
#if defined(_M_IX86) || defined(i386) || defined(__i386__) || defined(__i386)
|
||||||
# define LITTLE_ENDIAN 1
|
# ifndef LITTLE_ENDIAN
|
||||||
|
# define LITTLE_ENDIAN 1
|
||||||
|
# endif
|
||||||
#else
|
#else
|
||||||
# define BIG_ENDIAN 1
|
# ifndef BIG_ENDIAN
|
||||||
|
# define BIG_ENDIAN 1
|
||||||
// That was a pretty weak check for endian-ness, if it
|
// That was a pretty weak check for endian-ness, if it
|
||||||
// failed then we probably need to strengthen it a bit.
|
// failed then we probably need to strengthen it a bit.
|
||||||
# error "Are you sure this is a big-endian CPU?"
|
# error "Are you sure this is a big-endian CPU?"
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user