Commit Graph

3 Commits

Author SHA1 Message Date
Omar Polo 9e6fc13b35 drop the __bounded__ attribute
breaks the build with -Werror depending on the compiler.
2023-08-07 17:54:34 +00:00
Omar Polo 36363b011c drop #include <sys/cdefs.h> from vis.h
Doesn't seem to be available on many systems.  It is also not strictly
needed since we include vis.h only after headers like stdlib.h that
already pulls in the type it needs.
2023-08-07 16:09:00 +00:00
Omar Polo d13b044d59 address the strnvis(3) portability fiasco
strnvis originates on OpenBSD.  When NetBSD added it to their libc
they decided to swap the argument.  Without starting a holy war on
the "best" argument order, adding an implementation of a function
that's widely available and making its signature purposefully
incompatible is beyond justification.  FreeBSD (and so macos too?)
followed NetBSD in this, so we end up with *two* major and incompatible
strnvis implementations.  libbsd is in a limbo, they started with
the OpenBSD version but they'll probably switch to the NetBSD version
in the future.

That's why we can't have nice things.

Do the right thing(tm) and check for the presence of the original
strnvis(3), if not available or broken use the bundled one.
2023-08-07 15:39:57 +00:00