1 Star 0 Fork 22

阿翔与山海经/opengauss-server

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0001-zlib.patch 1.86 KB
一键复制 编辑 原始数据 按行查看 历史
zhangxubo 提交于 2021-12-02 16:30 . init opengauss-server
From 32efb3e42f67bc300a26c21837e4cc5813444be4 Mon Sep 17 00:00:00 2001
From: Mark Adler <madler@alumni.caltech.edu>
Date: Thu, 17 Sep 2020 11:09:46 -0700
Subject: [PATCH 1/3] [Backport] Change macro name
Reference: https://github.com/madler/zlib/commit/53ce2713117ef2a8ed682d77b944df991c499252
Change macro name in inflate.c to avoid collision in VxWorks.
---
inflate.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/inflate.c b/inflate.c
index ac333e8..36a6120 100644
--- a/inflate.c
+++ b/inflate.c
@@ -447,10 +447,10 @@ unsigned copy;
/* check function to use adler32() for zlib or crc32() for gzip */
#ifdef GUNZIP
-# define UPDATE(check, buf, len) \
+# define UPDATE_CHECK(check, buf, len) \
(state->flags ? crc32(check, buf, len) : adler32(check, buf, len))
#else
-# define UPDATE(check, buf, len) adler32(check, buf, len)
+# define UPDATE_CHECK(check, buf, len) adler32(check, buf, len)
#endif
/* check macros for header crc */
@@ -1202,7 +1202,7 @@ int flush;
state->total += out;
if ((state->wrap & 4) && out)
strm->adler = state->check =
- UPDATE(state->check, put - out, out);
+ UPDATE_CHECK(state->check, put - out, out);
out = left;
if ((state->wrap & 4) && (
#ifdef GUNZIP
@@ -1265,7 +1265,7 @@ int flush;
state->total += out;
if ((state->wrap & 4) && out)
strm->adler = state->check =
- UPDATE(state->check, strm->next_out - out, out);
+ UPDATE_CHECK(state->check, strm->next_out - out, out);
strm->data_type = (int)state->bits + (state->last ? 64 : 0) +
(state->mode == TYPE ? 128 : 0) +
(state->mode == LEN_ || state->mode == COPY_ ? 256 : 0);
--
2.23.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/a-xiang-and-shanhaijing/opengauss-server.git
git@gitee.com:a-xiang-and-shanhaijing/opengauss-server.git
a-xiang-and-shanhaijing
opengauss-server
opengauss-server
master

搜索帮助