]> Savannah Git Hosting - gnulib.git/commitdiff
ftello: Prefer stdckdint to intprops.
authorCollin Funk <collin.funk1@gmail.com>
Thu, 9 May 2024 01:55:51 +0000 (18:55 -0700)
committerCollin Funk <collin.funk1@gmail.com>
Thu, 9 May 2024 01:55:51 +0000 (18:55 -0700)
* 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.

ChangeLog
lib/ftello.c
modules/ftello

index 07e34a87ed6758dc2822e9f2370ba788aa1143f4..33d4c2791c87ec8e4165854669ae6f3c9ae3ec06 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-05-08  Collin Funk  <collin.funk1@gmail.com>
+
+       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  <bruno@clisp.org>
 
        sigsegv, c-stack tests: Avoid test failures with ASAN.
index 64119aabf1cc6d1a81c40f6afa898d14372ab995..88247bca8e3aa30c758806cbbc79f55448d8161b 100644 (file)
@@ -20,7 +20,7 @@
 #include <stdio.h>
 
 #include <errno.h>
-#include "intprops.h"
+#include <stdckdint.h>
 
 /* Get lseek.  */
 #include <unistd.h>
@@ -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;
index d5cf73468a3d07e6eaa1dbde59083eb2dbef6652..7a29e6d581a65c7d89b93b939ae7e9a8838c414c 100644 (file)
@@ -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