summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2018-04-29 19:01:28 +0200
committerGitHub <noreply@github.com>2018-04-29 19:01:28 +0200
commit0165fe128339733822cf56c6d230de4778bbad39 (patch)
treeb770fcaa6d537e1cc60b75d12e08689e14b8342e /src/core
parentaef69443e766089b0d9ceaa2255959ee327396f0 (diff)
downloadopenttd-0165fe128339733822cf56c6d230de4778bbad39.tar.xz
Codechange: remove endian_check in favour of __BYTE_ORDER macro (Rubidium) (#6762)
Diffstat (limited to 'src/core')
-rw-r--r--src/core/endian_type.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/endian_type.hpp b/src/core/endian_type.hpp
index dbb7faec6..cb3e348b4 100644
--- a/src/core/endian_type.hpp
+++ b/src/core/endian_type.hpp
@@ -29,11 +29,11 @@
#if defined(WIN32) || defined(__OS2__) || defined(WIN64)
#define TTD_ENDIAN TTD_LITTLE_ENDIAN
#elif !defined(TESTING)
- /* Else include endian[target/host].h, which has the endian-type, autodetected by the Makefile */
- #if defined(STRGEN) || defined(SETTINGSGEN)
- #include "endian_host.h"
+ #include <sys/param.h>
+ #if __BYTE_ORDER == __LITTLE_ENDIAN
+ #define TTD_ENDIAN TTD_LITTLE_ENDIAN
#else
- #include "endian_target.h"
+ #define TTD_ENDIAN TTD_BIG_ENDIAN
#endif
#endif /* WIN32 || __OS2__ || WIN64 */