changeset 29210:564750acbe4a

Fix OpenBSD 4.0 <float.h> handling of long double. * m4/float_h.m4 (gl_FLOAT_H): Also claim OpenBSD is broken. * lib/float.in.h [__OpenBSD__]: Add fixes for OpenBSD. * doc/headers/float.texi (float.h): Document OpenBSD bug. Signed-off-by: Eric Blake <ebb9@byu.net>
author Eric Blake <ebb9@byu.net>
date Tue, 11 Dec 2007 08:17:24 -0700
parents d926c33e92b5
children f82e2b0c88c3
files ChangeLog doc/headers/float.texi lib/float.in.h m4/float_h.m4
diffstat 4 files changed, 14 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Dec 11 13:42:58 2007 +0100
+++ b/ChangeLog	Tue Dec 11 08:17:24 2007 -0700
@@ -1,3 +1,11 @@
+2007-12-11  Eric Blake  <ebb9@byu.net>
+	and Bruno Haible  <bruno@clisp.org>
+
+	Fix OpenBSD 4.0 <float.h> handling of long double.
+	* m4/float_h.m4 (gl_FLOAT_H): Also claim OpenBSD is broken.
+	* lib/float.in.h [__OpenBSD__]: Add fixes for OpenBSD.
+	* doc/headers/float.texi (float.h): Document OpenBSD bug.
+
 2007-12-11  Jim Meyering  <meyering@redhat.com>
 
 	* users.txt: Add libvirt.
--- a/doc/headers/float.texi	Tue Dec 11 13:42:58 2007 +0100
+++ b/doc/headers/float.texi	Tue Dec 11 08:17:24 2007 -0700
@@ -9,8 +9,9 @@
 @itemize
 @item
 The values of @code{LDBL_*} macros are incorrect on some platforms:
-On BeOS, they are the same as the values of the @code{DBL_*} macros, although
-@samp{long double} is a larger type than @samp{double}.
+On OpenBSD 4.0 and BeOS, they are the same as the values of the
+@code{DBL_*} macros, although @samp{long double} is a larger type than
+@samp{double}.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/lib/float.in.h	Tue Dec 11 13:42:58 2007 +0100
+++ b/lib/float.in.h	Tue Dec 11 08:17:24 2007 -0700
@@ -24,7 +24,7 @@
 #define _GL_FLOAT_H
 
 /* 'long double' properties.  */
-#if defined __i386__ && defined __BEOS__
+#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
 /* Number of mantissa units, in base FLT_RADIX.  */
 # undef LDBL_MANT_DIG
 # define LDBL_MANT_DIG   64
--- a/m4/float_h.m4	Tue Dec 11 13:42:58 2007 +0100
+++ b/m4/float_h.m4	Tue Dec 11 08:17:24 2007 -0700
@@ -1,4 +1,4 @@
-# float_h.m4 serial 2
+# float_h.m4 serial 3
 dnl Copyright (C) 2007 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -10,7 +10,7 @@
   AC_REQUIRE([AC_CANONICAL_HOST])
   FLOAT_H=
   case "$host_os" in
-    beos*)
+    beos* | openbsd*)
       FLOAT_H=float.h
       gl_CHECK_NEXT_HEADERS([float.h])
       ;;