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.
# 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 */
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;