This commit subtly changes the behavior for the :gmtime and :localtime
modifiers, but only in irrelevant cases since the time value must be an
integer, and neither '\' nor ':' nor '$' may occur in these values.
When make complains about an unwritable .OBJDIR
it is not always obvious how we derrived that value.
If MAKE_DEBUG_OBJDIR_CHECK_WRITABLE is enabled call PrintOnError
so we can examine variables that are likely relevant.
Fix description of MAKE_OBJDIR_CHECK_WRITABLE in make.1
The variables in the 3 scopes must be freed before the scopes themselves
are freed by Targ_End.
The test opt-m-include-dir creates a directory of the form '*.tmp', thus
it must be removed before attempting to only remove regular files of
this name.
POSIX requires setenv to copy the passed name and value, so there is no
need to keep that memory allocated any longer.
In the tool, reflow and reorder usage() output and also consistently
mark which arguments are optional.
In the man page, add missing -t argument in the synopsis and follow
consistent argument ordering.
Rather than play games with adding .DOTLAST and then having to
exclude that from .SYSPATH, just have Dir_FindFile check if
path is sysIncPath or defSysIncPath and behave as if .DOTLAST seen
and also skip the final search of .CURDIR.
Fix Dir_SetSYSPATH to use defSysIncPath if sysIncPath is empty.
When using the Clang preprocessor (with MKLLVM=yes), the preprocessor
output does not indicate which tokens come from a system header and
which tokens come from the user code. Lint's strict bool mode relies on
this information to treat the character classification functions from
<ctype.h> as if their return type were bool instead of int.
These wrapper functions are only used when their argument is indeed a
'char', but not when the argument might be 'EOF or representable as an
unsigned char', such as when reading a byte from the input.
These diagnostics are emitted by lint2, and like all diagnostics from
lint2, they don't affect the exit status.
In libc, lint cannot handle the renamings from namespace.h, generating
many false positive diagnostics since 'libc_function' is used but
'_libc_function' is defined. Until this situation is handled properly,
suppress this diagnostic.
Even though 0 is not a boolean constant, allow this common idiom, to
help in those cases where the C preprocessor used by lint does not mark
tokens as coming from system headers (Clang).
To access yytext from lex.c, the lexer needs to be in %pointer mode,
which was specified in IEEE Std 1003.1, 2004 Edition and thus should be
old enough to be available on platforms other than NetBSD, for use in
tools/lint1 where lint1 is built before yacc and lex.
The Clang preprocessor does not mark sections from system headers.
Lint's strict bool mode relies on these markers to allow the functions
from <ctype.h> to be used as 'bool', even though their declared return
type is 'int'. Without these markers, lint complains that the "right
operand of '&&' must be bool, not 'int'". Until this is fixed in lint,
disable strict bool mode.