1 Star 0 Fork 21

lyn/erlang

forked from src-openEuler/erlang 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
otp-0009-Load-man-pages-from-system-wide-directory.patch 883 Bytes
一键复制 编辑 原始数据 按行查看 历史
成子晗 提交于 2020-08-24 17:20 . package init
From: Francois-Denis Gonthier <[email protected]>
Date: Thu, 20 Sep 2018 15:01:18 +0300
Subject: [PATCH] Load man-pages from system-wide directory
Patch allows one to use standard man path with erl -man command.
(Erlang manual pages are placed to /usr/share/man/ hierarchy
as required by Debian policy.)
diff --git a/erts/etc/common/erlexec.c b/erts/etc/common/erlexec.c
index 23bbb86333..741b492668 100644
--- a/erts/etc/common/erlexec.c
+++ b/erts/etc/common/erlexec.c
@@ -722,8 +722,10 @@ int main(int argc, char **argv)
error("-man not supported on Windows");
#else
argv[i] = "man";
- erts_snprintf(tmpStr, sizeof(tmpStr), "%s/man", rootdir);
- set_env("MANPATH", tmpStr);
+ /*
+ * Conform to erlang-manpages content.
+ */
+ putenv(strsave("MANSECT=3erl:1:5:7"));
execvp("man", argv+i);
error("Could not execute the 'man' command.");
#endif
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/lyn1001/erlang.git
[email protected]:lyn1001/erlang.git
lyn1001
erlang
erlang
master

搜索帮助