X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=blobdiff_plain;f=ALIROOT%2Ffpu.c;h=4fda4d6fec87b64b91a4819a2f3db1a08d356f8c;hp=421d4c2de2ecf73f6b2572508ec40a0dfe243604;hb=4ea4036dd5a599729a732432605856497af55443;hpb=d94e688b5e5c15e93499de723cfa1b07ca3ce826 diff --git a/ALIROOT/fpu.c b/ALIROOT/fpu.c index 421d4c2de2e..4fda4d6fec8 100644 --- a/ALIROOT/fpu.c +++ b/ALIROOT/fpu.c @@ -1,9 +1,11 @@ #ifdef __linux -#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); } +#else +void trapfpe () {} #endif