mirror of
https://git.savannah.gnu.org/git/gnulib.git
synced 2025-08-10 04:43:00 +03:00
reallocarray is a new function in glibc 2.26 to safely allocate an array of memory locations with integer overflow protection. * MODULES.html.sh: Add reallocarray. * doc/glibc-functions/reallocarray.texi: Documentation for reallocarray. * lib/reallocarray.c: New file to implement module reallocarray. * lib/stdlib.in.h: Add function declarations for reallocarray. * m4/reallocarray.m4: New file. * m4/stdlib_h.m4: Declare reallocarray. * modules/reallocarray: New file. * modules/reallocarray-test: New file. * modules/stdlib: Coerce stdlib.h to export reallocarray. * tests/test-reallocarray.c: New test.
23 lines
659 B
Plaintext
23 lines
659 B
Plaintext
@node reallocarray
|
|
@subsection @code{reallocarray}
|
|
@findex reallocarray
|
|
|
|
Gnulib module: reallocarray
|
|
|
|
Allocate multiple memory locations of a fixed size with integer overflow
|
|
protection.
|
|
Glibc Manual: @url{https://www.gnu.org/software/libc/manual/html_node/Changing-Block-Size.html#Changing-Block-Size}
|
|
|
|
Portability problems fixed by Gnulib:
|
|
@itemize
|
|
@item
|
|
This function is missing on many platforms:
|
|
glibc 2.25, macOS 10.13, FreeBSD 11.0, NetBSD 7.1, OpenBSD 5.5, Minix 3.1.8,
|
|
AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw,
|
|
MSVC 14, Interix 3.5, BeOS.
|
|
@end itemize
|
|
|
|
Portability problems not fixed by Gnulib:
|
|
@itemize
|
|
@end itemize
|