summaryrefslogtreecommitdiffstats
path: root/contrib/netbsd-tests/lib/libm/t_precision.c
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2017-02-10 07:13:16 +0000
committerngie <ngie@FreeBSD.org>2017-02-10 07:13:16 +0000
commitb39322d52d2dd66d37af0ffcbfb48d13896804ea (patch)
tree50240f0582121388b79a17f7a28cf9e4294ab21e /contrib/netbsd-tests/lib/libm/t_precision.c
parentb3a273f11b9829eca57412e90421eee4b4d2a018 (diff)
downloadFreeBSD-src-b39322d52d2dd66d37af0ffcbfb48d13896804ea.zip
FreeBSD-src-b39322d52d2dd66d37af0ffcbfb48d13896804ea.tar.gz
MFC r311925,r311968,r311969,r312008:
r311925: Import testcase updates with code contributed back to NetBSD This also (inadvertently) contains an update to contrib/netbsd-tests/lib/libc/sys/t_wait.c (new testcases). In collaboration with: christos@NetBSD.org r311968: Fix lib/libc/sys/access_test after r311925 sys/param.h needs to be #included in order for __FreeBSD_version to be checked r311969: Remove __HAVE_LONG_DOUBLE #define from t_strtod.c and place it in Makefile This is to enable support in other testcases Inspired by lib/msun/tests/Makefile . r312008: Upgrade NetBSD tests to 01.11.2017_23.20 snapshot This contains some new testcases in /usr/tests/...: - .../lib/libc - .../lib/libthr - .../lib/msun - .../sys/kern Tested on: amd64, i386
Diffstat (limited to 'contrib/netbsd-tests/lib/libm/t_precision.c')
-rw-r--r--contrib/netbsd-tests/lib/libm/t_precision.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/contrib/netbsd-tests/lib/libm/t_precision.c b/contrib/netbsd-tests/lib/libm/t_precision.c
index c01deba..df2d8a3 100644
--- a/contrib/netbsd-tests/lib/libm/t_precision.c
+++ b/contrib/netbsd-tests/lib/libm/t_precision.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_precision.c,v 1.2 2014/11/04 00:20:19 justin Exp $ */
+/* $NetBSD: t_precision.c,v 1.3 2016/08/27 10:07:05 christos Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_precision.c,v 1.2 2014/11/04 00:20:19 justin Exp $");
+__RCSID("$NetBSD: t_precision.c,v 1.3 2016/08/27 10:07:05 christos Exp $");
#include <atf-c.h>
@@ -45,7 +45,9 @@ ATF_TC_HEAD(t_precision, tc)
}
volatile double x = 1;
+#if __HAVE_LONG_DOUBLE
volatile long double y = 1;
+#endif
ATF_TC_BODY(t_precision, tc)
{
@@ -58,7 +60,7 @@ ATF_TC_BODY(t_precision, tc)
x += DBL_EPSILON;
ATF_CHECK(x == 2.0);
-#if !defined(__FreeBSD__) || !defined(__i386__)
+#if __HAVE_LONG_DOUBLE
y += LDBL_EPSILON;
ATF_CHECK(y != 1.0L);
y -= 1;
OpenPOWER on IntegriCloud