Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
bc3cae7e
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
8 个月 前同步成功
通知
8
Star
18
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Openssl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
bc3cae7e
编写于
4月 12, 2005
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Include error library value in C error source files instead of fixing up
at runtime.
上级
37942fab
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
40 addition
and
8 deletion
+40
-8
CHANGES
CHANGES
+8
-1
crypto/err/err.c
crypto/err/err.c
+4
-2
util/mkerr.pl
util/mkerr.pl
+28
-5
未找到文件。
CHANGES
浏览文件 @
bc3cae7e
...
...
@@ -778,7 +778,14 @@
differing sizes.
[Richard Levitte]
Changes between 0.9.7f and 0.9.7g [XX xxx xxxx]
Changes between 0.9.7g and 0.9.7h [XX xxx XXXX]
*) Include the fixed error library code in the C error file definitions
instead of fixing them up at runtime. This keeps the error code
structures constant.
[Steve Henson]
Changes between 0.9.7f and 0.9.7g [11 Apr 2005]
*) Fixes for newer kerberos headers. NB: the casts are needed because
the 'length' field is signed on one version and unsigned on another
...
...
crypto/err/err.c
浏览文件 @
bc3cae7e
...
...
@@ -631,7 +631,8 @@ static void err_load_strings(int lib, ERR_STRING_DATA *str)
{
while
(
str
->
error
)
{
str
->
error
|=
ERR_PACK
(
lib
,
0
,
0
);
if
(
lib
)
str
->
error
|=
ERR_PACK
(
lib
,
0
,
0
);
ERRFN
(
err_set_item
)(
str
);
str
++
;
}
...
...
@@ -647,7 +648,8 @@ void ERR_unload_strings(int lib, ERR_STRING_DATA *str)
{
while
(
str
->
error
)
{
str
->
error
|=
ERR_PACK
(
lib
,
0
,
0
);
if
(
lib
)
str
->
error
|=
ERR_PACK
(
lib
,
0
,
0
);
ERRFN
(
err_del_item
)(
str
);
str
++
;
}
...
...
util/mkerr.pl
浏览文件 @
bc3cae7e
...
...
@@ -9,6 +9,9 @@ my $reindex = 0;
my
$dowrite
=
0
;
my
$staticloader
=
"";
my
$pack_errcode
;
my
$load_errcode
;
while
(
@ARGV
)
{
my
$arg
=
$ARGV
[
0
];
if
(
$arg
eq
"
-conf
")
{
...
...
@@ -398,6 +401,20 @@ EOF
$hincf
=
"
\"
$hfile
\"
";
}
# If static we know the error code at compile time so use it
# in error definitions.
if
(
$static
)
{
$pack_errcode
=
"
ERR_LIB_
${lib}
";
$load_errcode
=
"
0
";
}
else
{
$pack_errcode
=
"
0
";
$load_errcode
=
"
ERR_LIB_
${lib}
";
}
open
(
OUT
,"
>
$cfile
")
||
die
"
Can't open
$cfile
for writing
";
...
...
@@ -468,6 +485,10 @@ EOF
/* BEGIN ERROR CODES */
#ifndef OPENSSL_NO_ERR
#define ERR_FUNC(func) ERR_PACK($pack_errcode,func,0)
#define ERR_REASON(reason) ERR_PACK($pack_errcode,0,reason)
static ERR_STRING_DATA ${lib}_str_functs[]=
{
EOF
...
...
@@ -479,7 +500,8 @@ EOF
if
(
exists
$ftrans
{
$fn
})
{
$fn
=
$ftrans
{
$fn
};
}
print
OUT
"
{ERR_PACK(0,
$i
,0),
\t\"
$fn
\"
},
\n
";
# print OUT "{ERR_PACK($pack_errcode,$i,0),\t\"$fn\"},\n";
print
OUT
"
{ERR_FUNC(
$i
),
\t\"
$fn
\"
},
\n
";
}
print
OUT
<<"EOF";
{0,NULL}
...
...
@@ -491,6 +513,7 @@ EOF
# Add each reason code.
foreach
$i
(
@reasons
)
{
my
$rn
;
my
$rstr
=
"
ERR_REASON(
$i
)
";
my
$nspc
=
0
;
if
(
exists
$err_reason_strings
{
$i
})
{
$rn
=
$err_reason_strings
{
$i
};
...
...
@@ -499,9 +522,9 @@ EOF
$rn
=
$
1
;
$rn
=~
tr/_[A-Z]/ [a-z]/
;
}
$nspc
=
40
-
length
(
$
i
)
unless
length
(
$i
)
>
40
;
$nspc
=
40
-
length
(
$
rstr
)
unless
length
(
$rstr
)
>
40
;
$nspc
=
"
"
x
$nspc
;
print
OUT
"
{
${
i
}${nspc}
,
\"
$rn
\"
},
\n
";
print
OUT
"
{
${
rstr
}${nspc}
,
\"
$rn
\"
},
\n
";
}
if
(
$static
)
{
print
OUT
<<"EOF";
...
...
@@ -518,8 +541,8 @@ ${staticloader}void ERR_load_${lib}_strings(void)
{
init=0;
#ifndef OPENSSL_NO_ERR
ERR_load_strings(
ERR_LIB_${lib}
,${lib}_str_functs);
ERR_load_strings(
ERR_LIB_${lib}
,${lib}_str_reasons);
ERR_load_strings(
$load_errcode
,${lib}_str_functs);
ERR_load_strings(
$load_errcode
,${lib}_str_reasons);
#endif
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录