Skip to content
Commit a0c2892c authored by D. Guthrie's avatar D. Guthrie
Browse files

Fix mg building on darwin.

I am not happy with this at all. It avoids using libbsd at all on
darwin because there are conflicting header files, particularly the
header string.h.

Ideally that would be the thing to fix. But in the meantime, this patch
should do the trick.

It declares a header file apple.h, which files include if target is
darwin (checks for presence of __APPLE__). This header file also
references the three source files futimens.c, reallocarray.c and
strtonum.c. The former and  latter are from https://github.com/ibara/mg
which is another portable fork, but building against more platforms.

From the OpenBSD source tree is _null.h and tree.h. There is a check so
that if __APPLE__ is present then it will include them from this source
tree.

Now,the makefile GNUMakefile will not link against libbsd on darwin, by
checking the output of uname in much the same way as it did already for
FreeBSD.
parent 40e30f96
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment