summaryrefslogtreecommitdiff
path: root/cfg.mk
diff options
context:
space:
mode:
Diffstat (limited to 'cfg.mk')
-rw-r--r--cfg.mk11
1 files changed, 11 insertions, 0 deletions
diff --git a/cfg.mk b/cfg.mk
index 010a903e1..86373b827 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -176,6 +176,17 @@ sc_prohibit_quotes_notation:
exit 1; } \
|| :
+# Files in src/ should quote all strings in error() output, so that
+# unexpected input chars like \r etc. don't corrupt the error.
+# In edge cases this can be avoided by putting the format string
+# on a separate line to the following arguments.
+sc_error_quotes:
+ @cd $(srcdir)/src && GIT_PAGER= git grep -n 'error *(.*%s.*, [^(]*);$$'\
+ *.c | grep -v quote \
+ && { echo '$(ME): '"Use quote() for error string arguments" 1>&2; \
+ exit 1; } \
+ || :
+
sc_sun_os_names:
@grep -nEi \
'solaris[^[:alnum:]]*2\.(7|8|9|[1-9][0-9])|sunos[^[:alnum:]][6-9]' \