From 26112352a774737e1ce5580c93654a26c1e82b39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Mon, 24 Oct 2022 22:25:29 +0200 Subject: New upstream version 1.1 --- tests/nap.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'tests/nap.h') 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 -# include -# include +# include /* 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; -- cgit v1.2.3