mirror of
https://github.com/espressif/openthread.git
synced 2026-08-11 05:07:47 +00:00
[build] auto detect big endian (#4551)
This commit is contained in:
@@ -202,6 +202,8 @@ AC_PROG_CXX_C_O
|
||||
|
||||
AM_PROG_AS
|
||||
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
# Check for other compiler toolchain tools.
|
||||
|
||||
AC_CHECK_TOOL(AR, ar)
|
||||
|
||||
@@ -37,8 +37,13 @@
|
||||
#include "openthread-core-config.h"
|
||||
|
||||
#ifndef BYTE_ORDER_BIG_ENDIAN
|
||||
#if defined(WORDS_BIGENDIAN) || \
|
||||
defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
#define BYTE_ORDER_BIG_ENDIAN 1
|
||||
#else
|
||||
#define BYTE_ORDER_BIG_ENDIAN 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <limits.h>
|
||||
#include <stdint.h>
|
||||
|
||||
Reference in New Issue
Block a user