Skip to content

Commit

Permalink
updated SDL_endian.h from latest SDL2
Browse files Browse the repository at this point in the history
  • Loading branch information
sezero committed Aug 17, 2024
1 parent bec4bd0 commit 1d6dfdc
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion include/SDL/SDL_endian.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@ real SDL-1.2 available to you. */
#ifdef __linux__
#include <endian.h>
#define SDL_BYTEORDER __BYTE_ORDER
#elif defined(__sun) && defined(__SVR4) /* Solaris */
#include <sys/byteorder.h>
#if defined(_LITTLE_ENDIAN)
#define SDL_BYTEORDER SDL_LIL_ENDIAN
#elif defined(_BIG_ENDIAN)
#define SDL_BYTEORDER SDL_BIG_ENDIAN
#else
#error Unsupported endianness
#endif
#elif defined(__OpenBSD__) || defined(__DragonFly__)
#include <endian.h>
#define SDL_BYTEORDER BYTE_ORDER
Expand All @@ -61,7 +70,7 @@ real SDL-1.2 available to you. */
defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \
(defined(__MIPS__) && defined(__MIPSEB__)) || \
defined(__ppc__) || defined(__POWERPC__) || defined(__powerpc__) || defined(__PPC__) || \
defined(__sparc__)
defined(__sparc__) || defined(__sparc)
#define SDL_BYTEORDER SDL_BIG_ENDIAN
#else
#define SDL_BYTEORDER SDL_LIL_ENDIAN
Expand Down

0 comments on commit 1d6dfdc

Please sign in to comment.