From d09c6448f632be66cf60bede1ccf30dd38aa75cb Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Tue, 11 Dec 2007 08:17:24 -0700 Subject: [PATCH] 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 --- ChangeLog | 8 ++++++++ doc/headers/float.texi | 5 +++-- lib/float.in.h | 2 +- m4/float_h.m4 | 4 ++-- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index d679041f3..d7af7f981 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 --git a/doc/headers/float.texi b/doc/headers/float.texi index 72a2afc81..799856070 100644 --- a/doc/headers/float.texi +++ b/doc/headers/float.texi @@ -9,8 +9,9 @@ Portability problems fixed by Gnulib: @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 --git a/lib/float.in.h b/lib/float.in.h index 986719b54..250403207 100644 --- a/lib/float.in.h +++ b/lib/float.in.h @@ -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 --git a/m4/float_h.m4 b/m4/float_h.m4 index 1b1ad103e..d36e3a46c 100644 --- a/m4/float_h.m4 +++ b/m4/float_h.m4 @@ -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_DEFUN([gl_FLOAT_H], AC_REQUIRE([AC_CANONICAL_HOST]) FLOAT_H= case "$host_os" in - beos*) + beos* | openbsd*) FLOAT_H=float.h gl_CHECK_NEXT_HEADERS([float.h]) ;; -- 2.11.0