diff options
Diffstat (limited to 'test/check-obsolete-functions.sh')
-rwxr-xr-x | test/check-obsolete-functions.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/check-obsolete-functions.sh b/test/check-obsolete-functions.sh new file mode 100755 index 00000000..c9a200f1 --- /dev/null +++ b/test/check-obsolete-functions.sh @@ -0,0 +1,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}" |