# HG changeset patch # User Eric Blake # Date 1197386244 25200 # Node ID 564750acbe4ac25b88f6867ed31774a7cc39f60a # Parent d926c33e92b5aa982f137a18047a4f2d46547233 Fix OpenBSD 4.0 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 diff -r d926c33e92b5 -r 564750acbe4a ChangeLog --- 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 + and Bruno Haible + + Fix OpenBSD 4.0 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 * users.txt: Add libvirt. diff -r d926c33e92b5 -r 564750acbe4a doc/headers/float.texi --- 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: diff -r d926c33e92b5 -r 564750acbe4a lib/float.in.h --- 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 diff -r d926c33e92b5 -r 564750acbe4a m4/float_h.m4 --- 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]) ;;