1 Star 0 Fork 40

Mingtai/perl_1

forked from src-openEuler/perl 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
perl-5.35.1-Fix-GDBM_File-to-compile-with-version-1.20-and-earli.patch 1.49 KB
一键复制 编辑 原始数据 按行查看 历史
weiwei_tiantian 提交于 2022-03-18 16:39 . upgrade version to 5.34.0
From aacd2398e766500cb5d83c4d76b642fcf31d997a Mon Sep 17 00:00:00 2001
From: Sergey Poznyakoff <gray@gnu.org>
Date: Wed, 23 Jun 2021 10:26:50 +0300
Subject: [PATCH 1/3] Fix GDBM_File to compile with version 1.20 and earlier
* ext/GDBM_File/GDBM_File.xs (ITEM_NOT_FOUND): Define conditionally,
depending on the GDBM_VERSION_MAJOR and GDBM_VERSION_MINOR.
Don't assume GDBM_ITEM_NOT_FOUND is a define (it isn't since
gdbm commit d3e27957).
---
ext/GDBM_File/GDBM_File.xs | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/ext/GDBM_File/GDBM_File.xs b/ext/GDBM_File/GDBM_File.xs
index cd0bb6f26f..494c2889ca 100644
--- a/ext/GDBM_File/GDBM_File.xs
+++ b/ext/GDBM_File/GDBM_File.xs
@@ -145,14 +145,13 @@ output_datum(pTHX_ SV *arg, char *str, int size)
#define gdbm_setopt(db,optflag,optval,optlen) not_here("gdbm_setopt")
#endif
-#ifndef GDBM_ITEM_NOT_FOUND
-# define GDBM_ITEM_NOT_FOUND GDBM_NO_ERROR
-#endif
-
+#if GDBM_VERSION_MAJOR == 1 && GDBM_VERSION_MINOR < 13
/* Prior to 1.13, gdbm_fetch family functions set gdbm_errno to GDBM_NO_ERROR
if the requested key did not exist */
-#define ITEM_NOT_FOUND() \
- (gdbm_errno == GDBM_ITEM_NOT_FOUND || gdbm_errno == GDBM_NO_ERROR)
+# define ITEM_NOT_FOUND() (gdbm_errno == GDBM_NO_ERROR)
+#else
+# define ITEM_NOT_FOUND() (gdbm_errno == GDBM_ITEM_NOT_FOUND)
+#endif
#define CHECKDB(db) do { \
if (!db->dbp) { \
--
2.31.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yangmingtaip/perl_1.git
git@gitee.com:yangmingtaip/perl_1.git
yangmingtaip
perl_1
perl_1
master

搜索帮助