]> Savannah Git Hosting - gnulib.git/commitdiff
tests: prefer stdckdint to intprops
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 11 Oct 2022 01:45:03 +0000 (18:45 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 11 Oct 2022 01:45:25 +0000 (18:45 -0700)
* modules/chown-tests, modules/fchownat-tests:
* modules/fdutimensat-tests, modules/futimens-tests:
* modules/lchown-tests, modules/stat-time-tests:
* modules/utime-tests, modules/utimens-tests:
* modules/utimensat-tests:
(Depends on): Depend on stdckint, not intprops.
* tests/nap.h: Include stdckdint.h, not intprops.h.
All macro uses changed.

ChangeLog
modules/chown-tests
modules/fchownat-tests
modules/fdutimensat-tests
modules/futimens-tests
modules/lchown-tests
modules/stat-time-tests
modules/utime-tests
modules/utimens-tests
modules/utimensat-tests
tests/nap.h

index 0827f5c77275183fe809d770b47b52da54745694..8abee26d101b7c65320982954f05187456260850 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2022-10-10  Paul Eggert  <eggert@cs.ucla.edu>
 
+       tests: prefer stdckdint to intprops
+       * modules/chown-tests, modules/fchownat-tests:
+       * modules/fdutimensat-tests, modules/futimens-tests:
+       * modules/lchown-tests, modules/stat-time-tests:
+       * modules/utime-tests, modules/utimens-tests:
+       * modules/utimensat-tests:
+       (Depends on): Depend on stdckint, not intprops.
+       * tests/nap.h: Include stdckdint.h, not intprops.h.
+       All macro uses changed.
+
        stat-time: prefer stdckdint to intprops
        * lib/stat-time.h: Include stdckdint.h instead of intprops.h.
        (stat_time_normalize): Use ckd_add instead of INT_ADD_WRAPV.
index 13138f438b568a798451a716e6b6488b145c20eb..1bd674406756a9b44ee791f29de064b4357c33f7 100644 (file)
@@ -7,12 +7,12 @@ tests/macros.h
 
 Depends-on:
 ignore-value
-intprops
 lstat
 mgetgroups
 nanosleep
 stat-time
 stdbool
+stdckdint
 symlink
 
 configure.ac:
index e5fb7833f408a785a4be167a17703d207a3ac330..f0e4cea78cffd36e40d41696a46742ca12811f25 100644 (file)
@@ -9,11 +9,11 @@ tests/macros.h
 Depends-on:
 errno
 ignore-value
-intprops
 mgetgroups
 nanosleep
 openat-h
 stat-time
+stdckdint
 symlink
 
 configure.ac:
index 37f70c652824a9f9563a1f8dd446f54a17c5ab20..1f492a6989b53a2c9ccc284a715100916c7a71cb 100644 (file)
@@ -10,9 +10,9 @@ tests/macros.h
 Depends-on:
 fcntl-h
 ignore-value
-intprops
 nanosleep
 openat
+stdckdint
 timespec
 dup
 utimecmp
index 519141300733aa77cbcf1db875d4dfed589b4984..636f8426b6a47411f74a88cf2e60bc101e98cbc7 100644 (file)
@@ -10,8 +10,8 @@ Depends-on:
 gettext-h
 fcntl-h
 ignore-value
-intprops
 nanosleep
+stdckdint
 timespec
 dup
 utimecmp
index 42b946014c12603317a3adb91f81d985f412b825..edd0cc7c21fc63855d0a81b020e3cdd1f8f5c7ca 100644 (file)
@@ -8,9 +8,9 @@ tests/macros.h
 Depends-on:
 errno
 ignore-value
-intprops
 mgetgroups
 nanosleep
+stdckdint
 stat-time
 stdbool
 symlink
index 8db236951386781318fe008f3fe442c0df68d192..9fafb9fb9ab2750820e4b3caabdb67c585f09455 100644 (file)
@@ -4,8 +4,8 @@ tests/macros.h
 tests/nap.h
 
 Depends-on:
-intprops
 nanosleep
+stdckdint
 time
 unistd
 
index a64d0a0069096c819c220587c36d16114670381a..3f30f92925138ea3a79139fa238d34534527f1bc 100644 (file)
@@ -8,8 +8,8 @@ Depends-on:
 dup
 gettext-h
 ignore-value
-intprops
 nanosleep
+stdckdint
 symlink
 timespec
 utimecmp
index 2a95346a0d09b7e4343f34e8bba5372db3f3fd11..b3e066f95f434abd3bdcc3718ec6cc4d7675e908 100644 (file)
@@ -11,8 +11,8 @@ Depends-on:
 dup
 gettext-h
 ignore-value
-intprops
 nanosleep
+stdckdint
 symlink
 timespec
 utimecmp
index 15c79407e8d08d0a4fdc4bad779a4db49114b73b..d713b7052cfa04d80fbba8d34183d75f18f0e31c 100644 (file)
@@ -9,8 +9,8 @@ tests/macros.h
 
 Depends-on:
 ignore-value
-intprops
 nanosleep
+stdckdint
 timespec
 utimecmp
 
index 1320d2f8f8fbb089af9b49d57fc4c174cdac6101..37f8009c6d8238d3e2eea54df4c7f6768982ebf6 100644 (file)
@@ -21,7 +21,7 @@
 
 # include <limits.h>
 
-# include <intprops.h>
+# include <stdckdint.h>
 
 /* Avoid a conflict with a function called nap() on UnixWare.  */
 # if defined _SCO_DS || (defined __SCO_VERSION__ || defined __sysv5__)  /* OpenServer, UnixWare */
@@ -54,9 +54,9 @@ diff_timespec (struct timespec a, struct timespec b)
   if (! (bs < as || (bs == as && bns < ans)))
     return 0;
 
-  if (INT_SUBTRACT_WRAPV (as, bs, &sdiff)
-      || INT_MULTIPLY_WRAPV (sdiff, 1000000000, &sdiff)
-      || INT_ADD_WRAPV (sdiff, ans - bns, &sdiff))
+  if (ckd_sub (&sdiff, as, bs)
+      || ckd_mul (&sdiff, sdiff, 1000000000)
+      || ckd_add (&sdiff, sdiff, ans - bns))
     return INT_MAX;
 
   return sdiff;