Re: [PATCH 2/2] xstrtol: simplify integer overflow checking

2022-01-17 Thread Bruno Haible
Paul Eggert did: > * lib/xstrtol.c: Include intprops.h. > (TYPE_SIGNED): Remove, as intprops.h defines that for us now. > (bkm_scale): Use INT_MULTIPLY_WRAPV instead of checking for > overflow by hand. $ ./gnulib-tool --test --single-configure xstrtol fails: gcc -DHAVE_CONFIG_H -I. -I../../gllib

Re: [PATCH 2/2] xstrtol: simplify integer overflow checking

2022-01-17 Thread Jim Meyering
On Mon, Jan 17, 2022 at 7:53 AM Paul Eggert wrote: > * lib/xstrtol.c: Include intprops.h. > (TYPE_SIGNED): Remove, as intprops.h defines that for us now. > (bkm_scale): Use INT_MULTIPLY_WRAPV instead of checking for > overflow by hand. Thanks. I've just pushed this, too. xstrtol: remove unne

[PATCH 2/2] xstrtol: simplify integer overflow checking

2022-01-16 Thread Paul Eggert
* lib/xstrtol.c: Include intprops.h. (TYPE_SIGNED): Remove, as intprops.h defines that for us now. (bkm_scale): Use INT_MULTIPLY_WRAPV instead of checking for overflow by hand. --- ChangeLog | 6 ++ lib/xstrtol.c | 17 +++-- 2 files changed, 13 insertions(+), 10 deletions(-)