[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/2] xstrtol: simplify integer overflow checking
From: |
Bruno Haible |
Subject: |
Re: [PATCH 2/2] xstrtol: simplify integer overflow checking |
Date: |
Mon, 17 Jan 2022 10:54:18 +0100 |
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 -I.. -DGNULIB_STRICT_CHECKING=1 -g -O2
-MT xstrtol.o -MD -MP -MF .deps/xstrtol.Tpo -c -o xstrtol.o
../../gllib/xstrtol.c
../../gllib/xstrtol.c:44:10: fatal error: intprops.h: No such file or directory
44 | #include "intprops.h"
| ^~~~~~~~~~~~
compilation terminated.
make[4]: *** [Makefile:1562: xstrtol.o] error 1
This patch fixes it.
2022-01-17 Bruno Haible <bruno@clisp.org>
xstrtol: Fix compilation error (regression 2022-01-16).
* modules/xstrtol (Depends-on): Add intprops.
diff --git a/modules/xstrtol b/modules/xstrtol
index a765f97452..d171890f3d 100644
--- a/modules/xstrtol
+++ b/modules/xstrtol
@@ -9,6 +9,7 @@ m4/xstrtol.m4
Depends-on:
assure
+intprops
inttypes-incomplete
configure.ac: