X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=ALIROOT%2Ffpu.c;h=4fda4d6fec87b64b91a4819a2f3db1a08d356f8c;hb=13bc44df6619073b3b46856b7d956ea347a0b7c1;hp=d4da3cbd61bff15064e8cab38dce208ca994f8ee;hpb=d9f43611c2041ffa6a725b5dd91050a8b6147278;p=u%2Fmrichter%2FAliRoot.git diff --git a/ALIROOT/fpu.c b/ALIROOT/fpu.c index d4da3cbd61b..4fda4d6fec8 100644 --- a/ALIROOT/fpu.c +++ b/ALIROOT/fpu.c @@ -1,14 +1,11 @@ #ifdef __linux -#ifdef __ia64 -#else -#include -void __attribute__ ((constructor)) - trapfpe () { - fpu_control_t cw = _FPU_DEFAULT & ~(_FPU_MASK_IM | _FPU_MASK_ZM | - _FPU_MASK_OM); - _FPU_SETCW(cw); +#define _GNU_SOURCE 1 +#include +static void __attribute__ ((constructor)) trapfpe(void) +{ + /* Enable some exceptions. At startup all exceptions are masked. */ + feenableexcept(FE_INVALID|FE_DIVBYZERO|FE_OVERFLOW); } -#endif #else void trapfpe () {} #endif