The condition for the context is the same for both short and long names,
therefore move that condition to the only caller.
Clean up the comment and move its parts to the appropriate places. The
"with the dollar sign escaped" part had been wrong already in 1993, and
it didn't get better over time.
mesa's assembly code for i386 only seems to be position independent
when compiled with ELF TLS, so having it disabled causes worse problems
than the edge cases ELF TLS causes.
potentially the assembly code could be fixed (it looks like it not
being safe is a bug), it could also be disabled, but i don't currently
have the means to measure the impact of that.
Reorder the parameters to match the documentation comment, and the
remaining parameters in chronological order. Remove the unused
parameter ctxt. The callbacks that need it pass it in their
modifyWordArgs instead.
Since there is only a single variable left that needs to be freed at the
end (and probably never actually needs to be freed since nobody defines
an environment variable named .OBJDIR), there is no need to loop over
these variables.
Nobody defines a global variable named .TARGET since that would have
many unpredictable effects, applying to all targets at once.
Nobody defines an environment variable named .TARGET since that's
against the naming conventions for environment variables and would have
the same effect.
Because of this, there is no point looking up the variables that are
local to a GNode anywhere else. This means they cannot come from the
environment and thus their value doesn't need to be freed after use,
which makes the code simpler.
The newly added accessor functions in make.h refer to external
functions, but since that header is not used anywhere outside of
usr.bin/make, it doesn't matter. Between 2020-08-25 and 2020-10-30,
that header had been referenced by usr.bin/xinstall.
From David H. Gutteridge in PR port-amd64/55555
There's a second part to the patch, but "make our code behave the way
the upstream code does" is very welcome.
Also PR kern/54515 and possibly others.