]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
build: prohibit direct use of readlink or readlinkat
authorJim Meyering <meyering@redhat.com>
Thu, 22 Oct 2009 10:12:24 +0000 (12:12 +0200)
committerJim Meyering <meyering@redhat.com>
Thu, 22 Oct 2009 10:12:24 +0000 (12:12 +0200)
* cfg.mk (sc_prohibit_readlink): New rule.
Suggested by Eric Blake.

cfg.mk

diff --git a/cfg.mk b/cfg.mk
index 5de2f37d50dc6badab15e7b17ec57b004236bba8..807d3c9c4e1fe14781abfcd40832e53135d64cad 100644 (file)
--- 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.