SunPro compiler defines __SVR4
We need to check both to ensure that on SunOS signal is hooked into
sigaction - otherwise we do not pass the unit-tests due to missing
a SIGCHLD
bmake_malloc and friends. Implement them via macros for the native case
and provide fallback implementations otherwise. Avoid polluting the
namespace by not defining enomem globally. Don't bother to provide
strdup and strndup, they were only used for the estrdup and estrndup
comapt code.
This addresses the presence of emalloc in system libraries on A/UX and
resulted strange issues as reported by Timothy E. Larson.
Instead of adding MAKE_BOOTSTRAP for hosted environments, i.e., when
you want things simple, instead add MAKE_NATIVE to get those hugely
important features like __RCSID().
It's now possible to build make on some hosts with: cc *.c */*.c
- consistently support __hpux (which the HP compilers define) as well
as __hpux__ (not sure which compilers set this, but retained anyway)
- fix a typo in the definition of signal(). arguably the codebase should
just be converted to sigaction()...
1. Compensate for h-pox assert brain damage where it gets confused by the
string in: assert(!memcmp(foo, "in", 2)); I miss the h-pox broken compiler,
I had not had to work around it for years.
2. Oh, finally h-pox has random() and utimes(). We don't need our own anymore.
the .DOTLAST primitive by a boolean variable with the same name, this whole
mechanism was broken ... it doesn't save much stat calls but it was wrong.
Thanks to Jason Thorpe for the other shadow-variable fixing patches he
made.
(XXX - This should be an inclusive, not exclusive, list. Later, this
should be autoconfiscated, but keep the internal implementation, since
src/tools/compat isn't necessarily available for use at make's build time.)
arch.c: Don't require ranlib stuff. Not everybody has it.
dir.c: SunOS-4 != Solaris; change #ifdef sun to #if sun && !__svr4__
job.c, compat.c: Don't use 'union wait', use int and the W*() macros.
main.c: Check for uname() == -1; some unames return > 0...
util.c, job.c: Add signal() with BSD semantics for svr4, don't use bsd
sigmask and friends.