Fix __isinfl on architectures where double == long double. This is the
case on at least ARM and PowerPC. MFC after: 1 week
This commit is contained in:
parent
35725a97c4
commit
275ac7729e
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user