1 Star 0 Fork 43

Funda Wang/postgresql_1

forked from src-openEuler/postgresql 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
postgresql-13.3-sw.patch 3.02 KB
一键复制 编辑 原始数据 按行查看 历史
diff -Naur postgresql-13.3.org/contrib/pgcrypto/crypt-blowfish.c postgresql-13.3.sw/contrib/pgcrypto/crypt-blowfish.c
--- postgresql-13.3.org/contrib/pgcrypto/crypt-blowfish.c 2022-09-16 11:31:15.100000000 +0800
+++ postgresql-13.3.sw/contrib/pgcrypto/crypt-blowfish.c 2022-09-16 11:32:01.060000000 +0800
@@ -41,7 +41,7 @@
#ifdef __i386__
#define BF_ASM 0 /* 1 */
#define BF_SCALE 1
-#elif defined(__x86_64__) || defined(__alpha__) || defined(__hppa__)
+#elif defined(__x86_64__) || defined(__alpha__) || defined(__hppa__) || defined(__sw_64__)
#define BF_ASM 0
#define BF_SCALE 1
#else
diff -Naur postgresql-13.3.org/src/include/port/atomics/arch-sw_64.h postgresql-13.3.sw/src/include/port/atomics/arch-sw_64.h
--- postgresql-13.3.org/src/include/port/atomics/arch-sw_64.h 1970-01-01 08:00:00.000000000 +0800
+++ postgresql-13.3.sw/src/include/port/atomics/arch-sw_64.h 2022-09-16 13:37:10.630000000 +0800
@@ -0,0 +1,26 @@
+/*-------------------------------------------------------------------------
+ *
+ * arch-arm.h
+ * Atomic operations considerations specific to ARM
+ *
+ * Portions Copyright (c) 2013-2020, PostgreSQL Global Development Group
+ *
+ * NOTES:
+ *
+ * src/include/port/atomics/arch-arm.h
+ *
+ *-------------------------------------------------------------------------
+ */
+
+/* intentionally no include guards, should only be included by atomics.h */
+#ifndef INSIDE_ATOMICS_H
+#error "should be included via atomics.h"
+#endif
+
+/*
+ * 64 bit atomics on ARM32 are implemented using kernel fallbacks and thus
+ * might be slow, so disable entirely. On ARM64 that problem doesn't exist.
+ */
+#if !defined(_sw_64__)
+#define PG_DISABLE_64_BIT_ATOMICS
+#endif /* __sw_64__ || __sw_64 */
diff -Naur postgresql-13.3.org/src/include/port/atomics.h postgresql-13.3.sw/src/include/port/atomics.h
--- postgresql-13.3.org/src/include/port/atomics.h 2022-09-16 11:31:15.640000000 +0800
+++ postgresql-13.3.sw/src/include/port/atomics.h 2022-09-16 13:36:15.370000000 +0800
@@ -68,6 +68,8 @@
#include "port/atomics/arch-arm.h"
#elif defined(__i386__) || defined(__i386) || defined(__x86_64__)
#include "port/atomics/arch-x86.h"
+#elif defined(__sw_64__)
+#include "port/atomics/arch-sw_64.h"
#elif defined(__ia64__) || defined(__ia64)
#include "port/atomics/arch-ia64.h"
#elif defined(__ppc__) || defined(__powerpc__) || defined(__ppc64__) || defined(__powerpc64__)
diff -Naur postgresql-13.3.org/src/include/storage/s_lock.h postgresql-13.3.sw/src/include/storage/s_lock.h
--- postgresql-13.3.org/src/include/storage/s_lock.h 2022-09-16 11:31:15.560000000 +0800
+++ postgresql-13.3.sw/src/include/storage/s_lock.h 2022-09-16 11:43:30.940000000 +0800
@@ -320,7 +320,7 @@
* We use the int-width variant of the builtin because it works on more chips
* than other widths.
*/
-#if defined(__arm__) || defined(__arm) || defined(__aarch64__) || defined(__aarch64)
+#if defined(__arm__) || defined(__arm) || defined(__aarch64__) || defined(__aarch64) || defined(__sw_64__) || defined(__sw_64)
#ifdef HAVE_GCC__SYNC_INT32_TAS
#define HAS_TEST_AND_SET
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/fundawang/postgresql_1.git
git@gitee.com:fundawang/postgresql_1.git
fundawang
postgresql_1
postgresql_1
openEuler-22.03-LTS-SP4

搜索帮助

371d5123 14472233 46e8bd33 14472233