mirror of
https://git.savannah.gnu.org/git/gnulib.git
synced 2025-08-08 17:22:05 +03:00
reallocarray: New module
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.
This commit is contained in:
committed by
Paul Eggert
parent
0474f8e6a8
commit
98756762a3
32
modules/reallocarray
Normal file
32
modules/reallocarray
Normal file
@@ -0,0 +1,32 @@
|
||||
Description:
|
||||
reallocarray() function that is glibc compatible.
|
||||
|
||||
Files:
|
||||
lib/reallocarray.c
|
||||
m4/reallocarray.m4
|
||||
|
||||
Depends-on:
|
||||
extensions
|
||||
xalloc-oversized
|
||||
realloc-gnu
|
||||
stdlib
|
||||
|
||||
configure.ac:
|
||||
gl_FUNC_REALLOCARRAY
|
||||
if test $HAVE_REALLOCARRAY = 0; then
|
||||
AC_LIBOBJ([reallocarray])
|
||||
gl_PREREQ_REALLOCARRAY
|
||||
fi
|
||||
gl_MODULE_INDICATOR([reallocarray])
|
||||
gl_STDLIB_MODULE_INDICATOR([reallocarray])
|
||||
|
||||
Makefile.am:
|
||||
|
||||
Include:
|
||||
<stdlib.h>
|
||||
|
||||
License:
|
||||
GPLv3+
|
||||
|
||||
Maintainer:
|
||||
all
|
Reference in New Issue
Block a user