mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-05 19:08:12 +00:00
SDL_endian.h: extend Linux way for GNU libc
The currently used way to determine the endianness (i.e. include <endian.h> and use the __BYTE_ORDER macro) is provided in general by GNU libc. Thus, extend that to any platform/OS based on GNU libc.
This commit is contained in:

committed by
Sam Lantinga

parent
f439e44771
commit
561c99ee11
@@ -128,7 +128,7 @@ _m_prefetch(void *__P)
|
||||
* \sa SDL_BIG_ENDIAN
|
||||
*/
|
||||
#define SDL_BYTEORDER SDL_LIL_ENDIAN___or_maybe___SDL_BIG_ENDIAN
|
||||
#elif defined(SDL_PLATFORM_LINUX)
|
||||
#elif defined(SDL_PLATFORM_LINUX) || defined(__GLIBC__)
|
||||
#include <endian.h>
|
||||
#define SDL_BYTEORDER __BYTE_ORDER
|
||||
#elif defined(SDL_PLATFORM_SOLARIS)
|
||||
|
Reference in New Issue
Block a user