aboutsummaryrefslogtreecommitdiff
path: root/test/check-obsolete-functions.sh
blob: c9a200f1fe2c4a980975070b60203dbb84431def (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh

top_srcdir=${SOURCE_ROOT:-..}
. ${top_srcdir}/test/setup_env.sh

ebegin "Checking for obsolete functions"
out=$(cd ${top_srcdir}; find src -name '*.[ch]' \
	! -name queue.h \
	-exec grep -n -E '\<(malloc|memory|sys/(errno|fcntl|signal|stropts|termios|unistd))\.h\>' {} +)
[ -z "${out}" ]
eend $? "Avoid these obsolete functions:"$'\n'"${out}"