From: Collin Funk Date: Thu, 9 May 2024 01:55:51 +0000 (-0700) Subject: ftello: Prefer stdckdint to intprops. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=ee4be3987b5bfb87a2d5a21c269d2f1ea249a316;p=gnulib.git ftello: Prefer stdckdint to intprops. * lib/ftello.c (ftello): Include stdckdint.h instead of intprops.h. Prefer ckd_add to INT_ADD_OK. * modules/ftello (Depends-on): Depend on stdckdint instead of intprops. --- diff --git a/ChangeLog b/ChangeLog index 07e34a87ed..33d4c2791c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2024-05-08 Collin Funk + + ftello: Prefer stdckdint to intprops. + * lib/ftello.c (ftello): Include stdckdint.h instead of intprops.h. + Prefer ckd_add to INT_ADD_OK. + * modules/ftello (Depends-on): Depend on stdckdint instead of intprops. + 2024-05-08 Bruno Haible sigsegv, c-stack tests: Avoid test failures with ASAN. diff --git a/lib/ftello.c b/lib/ftello.c index 64119aabf1..88247bca8e 100644 --- a/lib/ftello.c +++ b/lib/ftello.c @@ -20,7 +20,7 @@ #include #include -#include "intprops.h" +#include /* Get lseek. */ #include @@ -97,7 +97,7 @@ ftello (FILE *fp) /* Compute pos + buffered, with overflow check. */ off_t sum; - if (! INT_ADD_OK (pos, buffered, &sum)) + if (ckd_add (&sum, pos, buffered)) { errno = EOVERFLOW; return -1; diff --git a/modules/ftello b/modules/ftello index d5cf73468a..7a29e6d581 100644 --- a/modules/ftello +++ b/modules/ftello @@ -14,7 +14,7 @@ extensions largefile sys_types lseek [test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1] -intprops [test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1] +stdckdint [test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1] # Just to guarantee consistency between ftell() and ftello(). ftell