Discussion:
test failures on DragonFly BSD (1)
Bruno Haible
2017-06-11 23:46:23 UTC
Permalink
Hi,

On DragonFly BSD 3.8 / i386, I'm seeing test failures:


FAIL: test-float
================

../../gltests/test-float.c:318: assertion 'm + m > m' failed
FAIL test-float (exit status: 134)

FAIL: test-isinf
================

../../gltests/test-isinf.c:152: assertion 'isinf (Infinityl ())' failed
FAIL test-isinf (exit status: 134)


This fixes them.


2017-06-11 Bruno Haible <***@clisp.org>

float: Fix 'float' and 'isinf' failures on DragonFly BSD.
* m4/float_h.m4 (gl_FLOAT_H): Treat DragonFly BSD like FreeBSD.
* lib/float.in.h: Likewise.

diff --git a/lib/float.in.h b/lib/float.in.h
index 3e01200..b51aafe 100644
--- a/lib/float.in.h
+++ b/lib/float.in.h
@@ -63,7 +63,7 @@
/* On FreeBSD/x86 6.4, the 'long double' type really has only 53 bits of
precision in the compiler but 64 bits of precision at runtime. See
<http://lists.gnu.org/archive/html/bug-gnulib/2008-07/msg00063.html>. */
-#if defined __i386__ && defined __FreeBSD__
+#if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__)
/* Number of mantissa units, in base FLT_RADIX. */
# undef LDBL_MANT_DIG
# define LDBL_MANT_DIG 64
diff --git a/m4/float_h.m4 b/m4/float_h.m4
index e8522ab..40dc102 100644
--- a/m4/float_h.m4
+++ b/m4/float_h.m4
@@ -1,4 +1,4 @@
-# float_h.m4 serial 9
+# float_h.m4 serial 10
dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -14,7 +14,7 @@ AC_DEFUN([gl_FLOAT_H],
aix* | beos* | openbsd* | mirbsd* | irix*)
FLOAT_H=float.h
;;
- freebsd*)
+ freebsd* | dragonfly*)
case "$host_cpu" in
changequote(,)dnl
i[34567]86 )
@@ -42,7 +42,7 @@ changequote([,])dnl
;;
esac
case "$host_os" in
- aix* | freebsd* | linux*)
+ aix* | freebsd* | dragonfly* | linux*)
if test -n "$FLOAT_H"; then
REPLACE_FLOAT_LDBL=1
fi

Loading...