(if date fails, because of bad or out of range input
to parsedate, it cannot be expected to output the
expected result).
Remove the atf-expect-fail now that parsedate() should
detect overflows, and fail, causing date to fail, rather
than simply producing bogus results.
Add checks to detect overflow, and also detect other invalid
(out of range) inputs for parsedate().
There could be more, and some of what is being added is not
perfect, but many calculation overflows will be detected now
(and cause an error return) and some of the most bizarre
inputs that were previously accepted no longer will be.
In apparently rare cases the (REPE) CMPS instruction can trigger an memory
assist. NVMM wouldn't recognize the instruction and thus couldn't assist and
Qemu would abort.
The only purpose of the parameter freeIt is to free the memory
associated with the return value. To do this, no pointer arithmetic is
needed. Therefore, change to a void pointer, to catch accidental use of
that pointer.
It is not worth having a dependency on usr.bin/make just for including
this small table. The header file usr.bin/make/make.h, which is
included for consistency with the rest of the usr.bin/make code, is
using inline functions a lot and refers to several parts of make that
are completely irrelevant to usr.bin/install.
The string literal "${VAR} " had produced a "Malformed conditional", at
least since 2003. (That's the oldest make I have available for testing.)
Strange that nobody else noticed that in the last 17 years.
Either all flags had been given or none. Except in Var_Append, but
since the ctxt was VAR_GLOBAL anyway, adding FIND_GLOBAL there did not
make a difference.
While here, use a consistent order for the enum constants. This is both
the declaration order and at the same time the usual lookup order,
unless the -e option is given.