1 Star 0 Fork 79

hugel/rpm

forked from src-openEuler/rpm 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-An-enumeration-is-not-a-bitfield-use-an-integer-inst.patch 1.20 KB
一键复制 编辑 原始数据 按行查看 历史
hugel 提交于 2024-06-03 09:15 . Backport some patches from upstream
From 7108c172f4e60c83ecc1eeb2a766eb7eaa5956d7 Mon Sep 17 00:00:00 2001
From: Panu Matilainen <pmatilai@redhat.com>
Date: Fri, 15 Mar 2024 10:03:26 +0200
Subject: [PATCH] An enumeration is not a bitfield, use an integer instead
Enums are good for individual bitfield flag names, but combination of
the bits is not a legit value really.
Conflict:don't modify rpmfileutil.h because 8ef29094fa is not mearged; adapt context.
Reference:https://github.com/rpm-software-management/rpm/commit/7108c172f4e60c83ecc1eeb2a766eb7eaa5956d7
---
include/rpm/rpmmacro.h | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/rpm/rpmmacro.h b/include/rpm/rpmmacro.h
index 979763a76..7b23fda59 100644
--- a/include/rpm/rpmmacro.h
+++ b/include/rpm/rpmmacro.h
@@ -62,10 +62,11 @@ extern const char * macrofiles;
/* rpm macro expansion flags */
#define RPMEXPAND_EXPAND_ARGS (1 << 0) /*!< expand arguments of parametric macros */
-typedef enum rpmMacroFlags_e {
+enum rpmMacroFlags_e {
RPMMACRO_DEFAULT = 0,
RPMMACRO_LITERAL = (1 << 0), /*!< do not expand body of macro */
-} rpmMacroFlags;
+};
+typedef rpmFlags rpmMacroFlags;
/** \ingroup rpmmacro
* Print macros to file stream.
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hugel/rpm.git
git@gitee.com:hugel/rpm.git
hugel
rpm
rpm
master

搜索帮助