vcpkg/ports/libhv/d77287e954f02706502028baadc8c87e7382301b.patch
Frank 38d714c7fa
[libhv] add support ARM (#27524)
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
2023-01-18 11:42:44 -08:00

37 lines
1.2 KiB
Diff

From d77287e954f02706502028baadc8c87e7382301b Mon Sep 17 00:00:00 2001
From: ithewei <ithewei@163.com>
Date: Tue, 29 Nov 2022 10:37:21 +0800
Subject: [PATCH] judge BYTE_ORDER
---
base/hplatform.h | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/base/hplatform.h b/base/hplatform.h
index 60023230..5e0a290c 100644
--- a/base/hplatform.h
+++ b/base/hplatform.h
@@ -237,13 +237,19 @@
// BYTE_ORDER
#ifndef BYTE_ORDER
-#if defined(ARCH_X86) || defined(ARCH_X86_64) || \
- defined(__ARMEL__) || defined(__AARCH64EL__) || \
- defined(__MIPSEL) || defined(__MIPS64EL)
+#if defined(__BYTE_ORDER)
+ #define BYTE_ORDER __BYTE_ORDER
+#elif defined(__BYTE_ORDER__)
+ #define BYTE_ORDER __BYTE_ORDER__
+#elif defined(ARCH_X86) || defined(ARCH_X86_64) || \
+ defined(__ARMEL__) || defined(__AARCH64EL__) || \
+ defined(__MIPSEL) || defined(__MIPS64EL)
#define BYTE_ORDER LITTLE_ENDIAN
#elif defined(__ARMEB__) || defined(__AARCH64EB__) || \
defined(__MIPSEB) || defined(__MIPS64EB)
#define BYTE_ORDER BIG_ENDIAN
+#elif defined(OS_WIN)
+ #define BYTE_ORDER LITTLE_ENDIAN
#else
#warning "Unknown byte order!"
#endif