What are the "serious" libraries?

Joe Nelson joe at begriffs.com
Fri Apr 10 04:23:49 UTC 2020

> > Or maybe you can use BSD libc even on Mac and Linux? Is that
> > possible?

June Bug wrote:
> For other platforms there is <https://libbsd.freedesktop.org/wiki/>
> which implements functions present in *BSD libc’s but missing
> elsewhere. The libc on macOS is FreeBSD’s libc, thankfully.

Very interesting. I spent some time looking into this library and it's
nice and light. Ultimately the problem I'm running into is how to set up
a portable makefile which falls back to BSD functionality when present,
or links with libbsd when needed? The project man page
https://helpmanual.io/man7/libbsd/ talks about an overlay mode, and
that's what I want, but the makefile gymnastics are puzzling.

The libbsd author linked to some other libraries of interest. One is
called c-algorithms, and has a nice baseline of generic containers.
Haven't tried it yet to see how easy it is to use:


I also noticed that there are some generic algorithms provided by POSIX
in search.h --


They've got a tree, queue, hash table, and list. However the hash table
didn't look so great, since hcreate() allocates a hidden global.
Wouldn't work with threads.

More information about the Friends mailing list