Explicitly disable floating-point exceptions on FreeBSD, to force conformance with IEEE-specified behavior that the JS engine depends on.

Thanks to saska@acc.umu.se for the patch, and especially to all the experts who contributed to the discussion of this issue on the 9967 report.

r=mccabe.
This commit is contained in:
mccabe%netscape.com 2000-01-11 02:30:12 +00:00
Родитель 76d996686e
Коммит f1521991f9
1 изменённых файлов: 12 добавлений и 0 удалений

Просмотреть файл

@ -487,6 +487,11 @@ static nsresult Ensure1Window( nsICmdLineService* cmdLineArgs)
#endif
#endif
#if defined(FREEBSD)
// pick up fpsetmask prototype.
#include <floatingpoint.h>
#endif
static nsresult main1(int argc, char* argv[])
{
nsresult rv;
@ -499,6 +504,13 @@ static nsresult main1(int argc, char* argv[])
// Unbuffer debug output (necessary for automated QA performance scripts).
setbuf( stdout, 0 );
#endif
#if defined(FREEBSD)
// Disable all SIGFPE's on FreeBSD, as it has non-IEEE-conformant fp
// trap behavior that trips up on floating-point tests performed by
// the JS engine. See bugzilla bug 9967 details.
fpsetmask(0);
#endif
InitFullCircle();