From aa9fd90d003bab1d37ef5613929bc71276e0decb Mon Sep 17 00:00:00 2001
From: root <root@localhost.localdomain>
Date: Fri, 13 Dec 2024 14:42:26 +0800
Subject: [PATCH] add sw_64 support

---
 Foundation/include/Poco/Platform.h | 4 ++++
 Foundation/src/utils.h             | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/Foundation/include/Poco/Platform.h b/Foundation/include/Poco/Platform.h
index 192d6c7..3dd37ef 100644
--- a/Foundation/include/Poco/Platform.h
+++ b/Foundation/include/Poco/Platform.h
@@ -137,11 +137,15 @@
 #define POCO_ARCH_RISCV64     0x10
 #define POCO_ARCH_RISCV32     0x11
 #define POCO_ARCH_LOONGARCH64 0x12
+#define POCO_ARCH_SW_64 0x12
 
 
 #if defined(__ALPHA) || defined(__alpha) || defined(__alpha__) || defined(_M_ALPHA)
 	#define POCO_ARCH POCO_ARCH_ALPHA
 	#define POCO_ARCH_LITTLE_ENDIAN 1
+#elif defined(__sw_64__)
+        #define POCO_ARCH POCO_ARCH_SW_64
+        #define POCO_ARCH_LITTLE_ENDIAN 1
 #elif defined(i386) || defined(__i386) || defined(__i386__) || defined(_M_IX86) || defined(EMSCRIPTEN)
 	#define POCO_ARCH POCO_ARCH_IA32
 	#define POCO_ARCH_LITTLE_ENDIAN 1
diff --git a/Foundation/src/utils.h b/Foundation/src/utils.h
index c9b6c00..5f567db 100644
--- a/Foundation/src/utils.h
+++ b/Foundation/src/utils.h
@@ -137,7 +137,7 @@ int main(int argc, char** argv) {
     defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \
     defined(_POWER) || defined(_ARCH_PPC) || defined(_ARCH_PPC64) || \
     defined(__sparc__) || defined(__sparc) || defined(__s390__) || \
-    defined(__SH4__) || defined(__alpha__) || \
+    defined(__SH4__) || defined(__alpha__) || defined(__sw_64__) ||\
     defined(_MIPS_ARCH_MIPS32R2) || defined(__ARMEB__) ||\
     defined(__AARCH64EL__) || defined(__aarch64__) || defined(__AARCH64EB__) || \
     (defined(__riscv) && defined(__riscv_float_abi_double)) || defined(__e2k__) || \
-- 
2.33.0

