# HG changeset patch # User Jim Meyering # Date 1337956729 -7200 # Node ID cb54ca844f1c260d6a82a8033aad7b9e65706d04 # Parent 29f5ac75cf9e1e15b7438535ecf0004cb0dcfd7b maint.mk: add strncpy-prohibiting syntax-check rule * top/maint.mk (sc_prohibit_strncpy): New rule, from coreutils. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-05-25 Jim Meyering + + maint.mk: add strncpy-prohibiting syntax-check rule + * top/maint.mk (sc_prohibit_strncpy): New rule, from coreutils. + 2012-05-24 Jim Meyering maint.mk: compute $(gpg_key_ID) more portably diff --git a/top/maint.mk b/top/maint.mk --- a/top/maint.mk +++ b/top/maint.mk @@ -332,6 +332,14 @@ halt='$(ME): replace strcmp calls above with STREQ/STRNEQ' \ $(_sc_search_regexp) +# Really. You don't want to use this function. +# It may fail to NUL-terminate the destination, +# and always NUL-pads out to the specified length. +sc_prohibit_strncpy: + @prohibit='\