1
0
mirror of https://git.savannah.gnu.org/git/gnulib.git synced 2025-08-08 17:22:05 +03:00

reallocarray: a bit more tuning

* lib/reallocarray.c: Include intprops.h.
(reallocarray): Use INT_MULTIPLY_WRAPV instead of
xalloc_oversized, as it now suffices and is likely a bit more
efficient (five fewer machine insns on Ubuntu 20.10 x86-64).
* modules/reallocarray (Depends-on): Depend on intprops, not
xalloc-oversized.  Use conditional dependencies to avoid building
realloc-gnu when not needed.
This commit is contained in:
Paul Eggert
2021-04-25 23:11:15 -07:00
parent 974ddbe54c
commit 354b9691ac
3 changed files with 15 additions and 5 deletions

View File

@@ -8,8 +8,8 @@ m4/reallocarray.m4
Depends-on:
extensions
xalloc-oversized
realloc-gnu
intprops [test $HAVE_REALLOCARRAY = 0 || test $REPLACE_REALLOCARRAY = 1]
realloc-gnu [test $HAVE_REALLOCARRAY = 0 || test $REPLACE_REALLOCARRAY = 1]
stdlib
configure.ac: