summaryrefslogtreecommitdiff
path: root/cfg.mk
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-10-22 12:12:24 +0200
committerJim Meyering <meyering@redhat.com>2009-10-22 12:12:24 +0200
commitcbf36952d8c227aa5e46acf8643458a7fd51d473 (patch)
treed8969a2fc74a5c158839708b015d80cd7c08ed47 /cfg.mk
parent029b6b14c5c4eba3071cac835efd5b277ff2337a (diff)
downloadcoreutils-cbf36952d8c227aa5e46acf8643458a7fd51d473.tar.xz
build: prohibit direct use of readlink or readlinkat
* cfg.mk (sc_prohibit_readlink): New rule. Suggested by Eric Blake.
Diffstat (limited to 'cfg.mk')
-rw-r--r--cfg.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/cfg.mk b/cfg.mk
index 5de2f37d5..807d3c9c4 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -191,6 +191,12 @@ sc_no_exec_perl_coreutils:
exit 1; } || :; \
fi
+# Don't use "readlink" or "readlinkat" directly
+sc_prohibit_readlink:
+ @re='\<readlink(at)? \(' \
+ msg='do not use readlink(at); use via xreadlink or areadlink*' \
+ $(_prohibit_regexp)
+
# Ensure that date's --help output stays in sync with the info
# documentation for GNU strftime. The only exception is %N,
# which date accepts but GNU strftime does not.