diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2022-12-08 17:35:13 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2022-12-08 17:35:13 +0100 |
commit | 1b1ad4ed2919fbc68d8905cfec38a968821ce372 (patch) | |
tree | 5532a7e21342f88f4df7cd42139e012b6bd1dbe6 /tests/nap.h | |
parent | 63b5c0db2dc641876e58d232220c7efc2b2c2423 (diff) | |
parent | fa82e850f8d894ae4b9cd75bd12ffeeb65974d50 (diff) |
Merge branch 'release/debian/1.1-1_experimental1'debian/1.1-1_experimental1
Diffstat (limited to 'tests/nap.h')
-rw-r--r-- | tests/nap.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/nap.h b/tests/nap.h index 2b3c1d2..37f8009 100644 --- a/tests/nap.h +++ b/tests/nap.h @@ -3,7 +3,7 @@ This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or + the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -20,9 +20,8 @@ # define GLTEST_NAP_H # include <limits.h> -# include <stdbool.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 */ @@ -55,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; |