libbsd/include/bsd
Faidon Liambotis 01f0d1ea1e Add recallocarray() and freezero() from OpenBSD
Add recallocarray(), introduced in OpenBSD 6.1, and freezero(),
introduced in OpenBSD 6.2. The former is imported as-is from OpenBSD,
while the latter is the non-malloc-internal branch of the same code (and
also the OpenSSH portable variant).

Both of these originated in OpenBSD, but have also been implemented by
IllumOS, cf. https://www.illumos.org/issues/8546

Documentation for these functions is in malloc(3) upstream, the relevant
parts of which were previously imported in reallocarray(3bsd). Update
reallocarray(3bsd) with the changes that were introduced since, and add
the relevant bits for recallocarray() and freezero(), plus aliases.

[guillem@hadrons.org: Update copyright in COPYING. ]

Closes: !10
Signed-off-by: Guillem Jover <guillem@hadrons.org>
2021-01-01 18:18:51 +01:00
..
netinet Namespace header inclusion protection macros 2017-06-19 03:17:21 +02:00
sys Provide a <sys/param.h> with MIN() and MAX() 2019-08-08 03:22:09 +02:00
bitstring.h Add <bitstring.h> for compatibility with NetBSD and OpenBSD 2012-05-29 04:51:16 +02:00
bsd.h Turn <bsd/bsd.h> inert when using LIBBSD_OVERLAY 2015-12-14 00:58:59 +01:00
err.h err: Add err(), warn(), errx() and warnx() familiy of functions 2019-08-08 03:47:05 +02:00
getopt.h Guard non-portable forwarded includes 2018-06-18 04:31:00 +02:00
inttypes.h Import strtoi() and strtou() functions from NetBSD 2018-05-21 04:47:28 +02:00
libutil.h Update humanize_number() from FreeBSD 2018-05-21 04:47:28 +02:00
md5.h Handle systems missing <sys/cdefs.h> 2018-03-13 02:28:53 +01:00
nlist.h Re-allow direct use of nlist.n_name in <nlist.h> 2019-08-08 03:47:04 +02:00
readpassphrase.h Handle systems missing <sys/cdefs.h> 2018-03-13 02:28:53 +01:00
stdio.h Support GCC deprecated attribute for GCC older than 4.5 2017-06-05 05:51:52 +02:00
stdlib.h Add recallocarray() and freezero() from OpenBSD 2021-01-01 18:18:51 +01:00
string.h Fix function declaration protection for glibc already providing them 2018-03-13 02:28:53 +01:00
stringlist.h Handle systems missing <sys/cdefs.h> 2018-03-13 02:28:53 +01:00
timeconv.h Handle systems missing <sys/cdefs.h> 2018-03-13 02:28:53 +01:00
unistd.h Guard non-portable forwarded includes 2018-06-18 04:31:00 +02:00
vis.h Fix strnvis() and strnunvis() NetBSD ABI break 2018-05-22 16:07:42 +02:00
wchar.h Handle systems missing <sys/cdefs.h> 2018-03-13 02:28:53 +01:00