svn commit: r283693 - head/lib/libc/gen
Andrew Turner
andrew at FreeBSD.org
Fri May 29 09:23:21 UTC 2015
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
}
More information about the svn-src-all
mailing list