# Ensure that "stdio--.h" is used where appropriate.
sc_require_stdio_safer:
@if $(VC_LIST_EXCEPT) | grep -l '\.[ch]$$' > /dev/null; then \
- files=$$(grep -l '$(begword)freopen \?(' $$($(VC_LIST_EXCEPT) \
+ files=$$(grep -El '$(begword)freopen ?\(' $$($(VC_LIST_EXCEPT)\
| grep '\.[ch]$$')); \
test -n "$$files" && grep -LE 'include "stdio--.h"' $$files \
| grep . && \
else :; \
fi
+# Ensure that "stdlib--.h" is used where appropriate.
+sc_require_stdlib_safer:
+ @if $(VC_LIST_EXCEPT) | grep -l '\.[ch]$$' > /dev/null; then \
+ files=$$(grep -El '$(begword)mkstemp ?\(' $$($(VC_LIST_EXCEPT)\
+ | grep '\.[ch]$$')); \
+ test -n "$$files" && grep -LE 'include "stdlib--.h"' $$files \
+ | grep . && \
+ { echo '$(ME): the above files should use "stdlib--.h"' \
+ 1>&2; exit 1; } || :; \
+ else :; \
+ fi
+
sc_prohibit_perl_hash_quotes:
@prohibit="\{'[A-Z_]+' *[=}]" \
halt="in Perl code, write \$$hash{KEY}, not \$$hash{'K''EY'}" \