diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2021-04-25 23:11:15 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2021-04-25 23:12:25 -0700 |
commit | 354b9691accd00a531358b652689ce7f580fbe54 (patch) | |
tree | d10f9e2bedd2150a7138d9af901e9edf32aac0d6 /modules | |
parent | 974ddbe54c37dd1f8f0f0f11f6f967d6fecd864d (diff) | |
download | gnulib-354b9691accd00a531358b652689ce7f580fbe54.tar.gz |
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.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/reallocarray | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/reallocarray b/modules/reallocarray index 6d762c157a..dcf851d5f0 100644 --- a/modules/reallocarray +++ b/modules/reallocarray @@ -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: |