Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
071be080
L
libvirt
项目概览
openeuler
/
libvirt
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
libvirt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
071be080
编写于
1月 20, 2009
作者:
D
Daniel P. Berrange
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add syntax check rule to look for non-reentrant POSIX apis
上级
3548e9aa
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
107 addition
and
0 deletion
+107
-0
ChangeLog
ChangeLog
+8
-0
Makefile.am
Makefile.am
+2
-0
Makefile.cfg
Makefile.cfg
+1
-0
Makefile.maint
Makefile.maint
+11
-0
Makefile.nonreentrant
Makefile.nonreentrant
+85
-0
未找到文件。
ChangeLog
浏览文件 @
071be080
Tue Jan 20 19:49:53 GMT 2009 Daniel P. Berrange <berrange@redhat.com>
* .x-sc_prohibit_nonreentrant: Blacklist some places where
use of non-threadsafe APIs are not neccessary to check
* Makefile.am, Makefile.maint, Makefile.nonreentrant: Add
check for non-reentrant safe API calls
* Makefile.cfg: Temporarily disable non-reentrant check
Tue Jan 20 20:28:07 +0100 2009 Jim Meyering <meyering@redhat.com>
Tue Jan 20 20:28:07 +0100 2009 Jim Meyering <meyering@redhat.com>
don't ignore write failure
don't ignore write failure
...
...
Makefile.am
浏览文件 @
071be080
...
@@ -17,6 +17,8 @@ EXTRA_DIST = \
...
@@ -17,6 +17,8 @@ EXTRA_DIST = \
.x-sc_require_config_h_first
\
.x-sc_require_config_h_first
\
.x-sc_prohibit_strcmp
\
.x-sc_prohibit_strcmp
\
.x-sc_require_config_h
\
.x-sc_require_config_h
\
.x-sc_prohibit_nonreentrant
\
Makefile.nonreentrant
\
autogen.sh
autogen.sh
man_MANS
=
virsh.1
man_MANS
=
virsh.1
...
...
Makefile.cfg
浏览文件 @
071be080
...
@@ -40,6 +40,7 @@ local-checks-to-skip = \
...
@@ -40,6 +40,7 @@ local-checks-to-skip = \
sc_prohibit_jm_in_m4
\
sc_prohibit_jm_in_m4
\
sc_prohibit_quote_without_use
\
sc_prohibit_quote_without_use
\
sc_prohibit_quotearg_without_use
\
sc_prohibit_quotearg_without_use
\
sc_prohibit_nonreentrant
\
sc_root_tests
\
sc_root_tests
\
sc_space_tab
\
sc_space_tab
\
sc_sun_os_names
\
sc_sun_os_names
\
...
...
Makefile.maint
浏览文件 @
071be080
...
@@ -13,6 +13,8 @@ VC_LIST = $(srcdir)/build-aux/vc-list-files
...
@@ -13,6 +13,8 @@ VC_LIST = $(srcdir)/build-aux/vc-list-files
VC_LIST_EXCEPT
=
\
VC_LIST_EXCEPT
=
\
$(VC_LIST)
|
if
test
-f
.x-
$@
;
then
grep
-vEf
.x-
$@
;
else
grep
-v
ChangeLog
;
fi
$(VC_LIST)
|
if
test
-f
.x-
$@
;
then
grep
-vEf
.x-
$@
;
else
grep
-v
ChangeLog
;
fi
include
Makefile.nonreentrant
# Prevent programs like 'sort' from considering distinct strings to be equal.
# Prevent programs like 'sort' from considering distinct strings to be equal.
# Doing it here saves us from having to set LC_ALL elsewhere in this file.
# Doing it here saves us from having to set LC_ALL elsewhere in this file.
export
LC_ALL
=
C
export
LC_ALL
=
C
...
@@ -111,6 +113,15 @@ sc_prohibit_asprintf:
...
@@ -111,6 +113,15 @@ sc_prohibit_asprintf:
@
grep
-nE
'\<[a]sprintf\>'
$$
(
$(VC_LIST_EXCEPT)
)
&&
\
@
grep
-nE
'\<[a]sprintf\>'
$$
(
$(VC_LIST_EXCEPT)
)
&&
\
{
echo
'
$(ME)
: use virAsprintf, not a'
sprintf 1>&2
;
exit
1
;
}
||
:
{
echo
'
$(ME)
: use virAsprintf, not a'
sprintf 1>&2
;
exit
1
;
}
||
:
sc_prohibit_nonreentrant
:
@
fail
=
0
;
\
for
i
in
$(NON_REENTRANT)
;
\
do
\
grep
-nE
"
\<
$$
i
\>
[:space:]*
\(
"
$$
(
$(VC_LIST_EXCEPT)
)
&&
\
fail
=
1
&&
echo
"
$(ME)
: use
$
${i}
_r, not
$
${i}
"
||
:
;
\
done
;
\
exit
$$
fail
# Using EXIT_SUCCESS as the first argument to error is misleading,
# Using EXIT_SUCCESS as the first argument to error is misleading,
# since when that parameter is 0, error does not exit. Use `0' instead.
# since when that parameter is 0, error does not exit. Use `0' instead.
sc_error_exit_success
:
sc_error_exit_success
:
...
...
Makefile.nonreentrant
0 → 100644
浏览文件 @
071be080
#
# Generated by running the following on Fedora 9:
#
# nm -D --defined-only /lib/libc.so.6 \
# | grep '_r$' \
# | awk '{print $3}' \
# | grep -v __ \
# | grep -v qsort \ # Red herring since we don't need to pass extra args to qsort comparator
# | grep -v readdir \ # This is safe as long as each DIR * instance is only used by one thread
# | sort \
# | uniq \
# | sed -e 's/_r//'
#
NON_REENTRANT
=
NON_REENTRANT
+=
asctime
NON_REENTRANT
+=
ctime
NON_REENTRANT
+=
drand48
NON_REENTRANT
+=
ecvt
NON_REENTRANT
+=
erand48
NON_REENTRANT
+=
ether_aton
NON_REENTRANT
+=
ether_ntoa
NON_REENTRANT
+=
fcvt
NON_REENTRANT
+=
fgetgrent
NON_REENTRANT
+=
fgetpwent
NON_REENTRANT
+=
fgetspent
NON_REENTRANT
+=
getaliasbyname
NON_REENTRANT
+=
getaliasent
NON_REENTRANT
+=
getdate
NON_REENTRANT
+=
getgrent
NON_REENTRANT
+=
getgrgid
NON_REENTRANT
+=
getgrnam
NON_REENTRANT
+=
gethostbyaddr
NON_REENTRANT
+=
gethostbyname2
NON_REENTRANT
+=
gethostbyname
NON_REENTRANT
+=
gethostent
NON_REENTRANT
+=
getlogin
NON_REENTRANT
+=
getmntent
NON_REENTRANT
+=
getnetbyaddr
NON_REENTRANT
+=
getnetbyname
NON_REENTRANT
+=
getnetent
NON_REENTRANT
+=
getnetgrent
NON_REENTRANT
+=
getprotobyname
NON_REENTRANT
+=
getprotobynumber
NON_REENTRANT
+=
getprotoent
NON_REENTRANT
+=
getpwent
NON_REENTRANT
+=
getpwnam
NON_REENTRANT
+=
getpwuid
NON_REENTRANT
+=
getrpcbyname
NON_REENTRANT
+=
getrpcbynumber
NON_REENTRANT
+=
getrpcent
NON_REENTRANT
+=
getservbyname
NON_REENTRANT
+=
getservbyport
NON_REENTRANT
+=
getservent
NON_REENTRANT
+=
getspent
NON_REENTRANT
+=
getspnam
NON_REENTRANT
+=
getutent
NON_REENTRANT
+=
getutid
NON_REENTRANT
+=
getutline
NON_REENTRANT
+=
gmtime
NON_REENTRANT
+=
hcreate
NON_REENTRANT
+=
hdestroy
NON_REENTRANT
+=
hsearch
NON_REENTRANT
+=
initstate
NON_REENTRANT
+=
jrand48
NON_REENTRANT
+=
lcong48
NON_REENTRANT
+=
localtime
NON_REENTRANT
+=
lrand48
NON_REENTRANT
+=
mrand48
NON_REENTRANT
+=
nrand48
NON_REENTRANT
+=
ptsname
NON_REENTRANT
+=
qecvt
NON_REENTRANT
+=
qfcvt
NON_REENTRANT
+=
random
NON_REENTRANT
+=
rand
NON_REENTRANT
+=
seed48
NON_REENTRANT
+=
setstate
NON_REENTRANT
+=
sgetspent
NON_REENTRANT
+=
srand48
NON_REENTRANT
+=
srandom
NON_REENTRANT
+=
strerror
NON_REENTRANT
+=
strtok
NON_REENTRANT
+=
tmpnam
NON_REENTRANT
+=
ttyname
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录