Date: Fri, 29 May 2015 09:23:21 +0000 (UTC) From: Andrew Turner <andrew@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283693 - head/lib/libc/gen Message-ID: <201505290923.t4T9NLrf029425@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: andrew Date: Fri May 29 09:23:20 2015 New Revision: 283693 URL: https://svnweb.freebsd.org/changeset/base/283693 Log: Fix __isinfl on architectures where double == long double. This is the case on at least ARM and PowerPC. MFC after: 1 week Modified: head/lib/libc/gen/isinf.c Modified: head/lib/libc/gen/isinf.c ============================================================================== --- head/lib/libc/gen/isinf.c Fri May 29 09:17:59 2015 (r283692) +++ head/lib/libc/gen/isinf.c Fri May 29 09:23:20 2015 (r283693) @@ -26,6 +26,8 @@ * $FreeBSD$ */ +#include <machine/float.h> + #include <math.h> #include "fpmath.h" @@ -62,9 +64,9 @@ __isinfl(long double e) u.e = e; mask_nbit_l(u); -#ifndef __alpha__ - return (u.bits.exp == 32767 && u.bits.manl == 0 && u.bits.manh == 0); -#else +#if LDBL_MANT_DIG == 53 return (u.bits.exp == 2047 && u.bits.manl == 0 && u.bits.manh == 0); +#else + return (u.bits.exp == 32767 && u.bits.manl == 0 && u.bits.manh == 0); #endif }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505290923.t4T9NLrf029425>