#if defined(__ALPHA) || defined(__alpha) || defined(__alpha__) || defined(_M_ALPHA)
#define POCO_ARCH POCO_ARCH_ALPHA
#define POCO_ARCH_LITTLE_ENDIAN 1
#elif defined(i386) || defined(__i386) || defined(__i386__) || defined(_M_IX86) || defined(EMSCRIPTEN) || defined(__EMSCRIPTEN__)
#define POCO_ARCH POCO_ARCH_IA32
#define POCO_ARCH_LITTLE_ENDIAN 1
#elif defined(_IA64) || defined(__IA64__) || defined(__ia64__) || defined(__ia64) || defined(_M_IA64)
#define POCO_ARCH POCO_ARCH_IA64
#if defined(hpux) || defined(_hpux)
#define POCO_ARCH_BIG_ENDIAN 1
#else
#define POCO_ARCH_LITTLE_ENDIAN 1
#endif
#elif defined(__x86_64__) || defined(_M_X64)
#define POCO_ARCH POCO_ARCH_AMD64
#define POCO_ARCH_LITTLE_ENDIAN 1
#elif defined(__mips__) || defined(__mips) || defined(__MIPS__) || defined(_M_MRX000)
#define POCO_ARCH POCO_ARCH_MIPS
#if defined(POCO_OS_FAMILY_WINDOWS)
// Is this OK? Supports windows only little endian??
#define POCO_ARCH_LITTLE_ENDIAN 1
#elif defined(__MIPSEB__) || defined(_MIPSEB) || defined(__MIPSEB)
#define POCO_ARCH_BIG_ENDIAN 1
#elif defined(__MIPSEL__) || defined(_MIPSEL) || defined(__MIPSEL)
#define POCO_ARCH_LITTLE_ENDIAN 1
#else
#error "MIPS but neither MIPSEL nor MIPSEB?"
#endif
#elif defined(__hppa) || defined(__hppa__)
#define POCO_ARCH POCO_ARCH_HPPA
#define POCO_ARCH_BIG_ENDIAN 1
#elif defined(__PPC) || defined(__POWERPC__) || defined(__powerpc) || defined(__PPC__) || \
defined(__powerpc__) || defined(__ppc__) || defined(__ppc) || defined(_ARCH_PPC) || defined(_M_PPC)
#define POCO_ARCH POCO_ARCH_PPC
#if defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
#define POCO_ARCH_LITTLE_ENDIAN 1
#else
#define POCO_ARCH_BIG_ENDIAN 1
#endif
#elif defined(_POWER) || defined(_ARCH_PWR) || defined(_ARCH_PWR2) || defined(_ARCH_PWR3) || \
defined(_ARCH_PWR4) || defined(__THW_RS6000)
#define POCO_ARCH POCO_ARCH_POWER
#define POCO_ARCH_BIG_ENDIAN 1
#elif defined(__sparc__) || defined(__sparc) || defined(sparc)
#define POCO_ARCH POCO_ARCH_SPARC
#define POCO_ARCH_BIG_ENDIAN 1
#elif defined(__arm__) || defined(__arm) || defined(ARM) || defined(_ARM_) || defined(__ARM__) || defined(_M_ARM)
#define POCO_ARCH POCO_ARCH_ARM
#if defined(__ARMEB__)
#define POCO_ARCH_BIG_ENDIAN 1
#else
#define POCO_ARCH_LITTLE_ENDIAN 1
#endif
#elif defined(__arm64__) || defined(__arm64)
#define POCO_ARCH POCO_ARCH_ARM64
#if defined(__ARMEB__)
#define POCO_ARCH_BIG_ENDIAN 1
#elif defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
#define POCO_ARCH_BIG_ENDIAN 1
#else
#define POCO_ARCH_LITTLE_ENDIAN 1
#endif
#elif defined(__m68k__)
#define POCO_ARCH POCO_ARCH_M68K
#define POCO_ARCH_BIG_ENDIAN 1
#elif defined(__s390__)
#define POCO_ARCH POCO_ARCH_S390
#define POCO_ARCH_BIG_ENDIAN 1
#elif defined(__sh__) || defined(__sh) || defined(SHx) || defined(_SHX_)
#define POCO_ARCH POCO_ARCH_SH
#if defined(__LITTLE_ENDIAN__) || (POCO_OS == POCO_OS_WINDOWS_CE)
#define POCO_ARCH_LITTLE_ENDIAN 1
#else
#define POCO_ARCH_BIG_ENDIAN 1
#endif
#elif defined (nios2) || defined(__nios2) || defined(__nios2__)
#define POCO_ARCH POCO_ARCH_NIOS2
#if defined(__nios2_little_endian) || defined(nios2_little_endian) || defined(__nios2_little_endian__)
#define POCO_ARCH_LITTLE_ENDIAN 1
#else
#define POCO_ARCH_BIG_ENDIAN 1
#endif
#elif defined(__AARCH64EL__)
#define POCO_ARCH POCO_ARCH_AARCH64
#define POCO_ARCH_LITTLE_ENDIAN 1
#elif defined(__AARCH64EB__)
#define POCO_ARCH POCO_ARCH_AARCH64
#define POCO_ARCH_BIG_ENDIAN 1
#endif