]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Putting back floating point exceptions for Linux
authoralibrary <alibrary@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 22 Oct 2002 13:23:05 +0000 (13:23 +0000)
committeralibrary <alibrary@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 22 Oct 2002 13:23:05 +0000 (13:23 +0000)
ALIROOT/binaliroot.pkg
ALIROOT/fpu.c [new file with mode: 0644]

index 6a3c84d8e7fca2ecf300a1716b2ef78b17d245ae..ac4c3a103e6a66ff4304a8e103a0c557189056b6 100644 (file)
@@ -1,4 +1,5 @@
 SRCS:=aliroot.cxx
+CSRCS:=fpu.c
 
 ELIBSDIR:= $(ALICE)/geant3/lib/tgt_$(ALICE_TARGET)
 
diff --git a/ALIROOT/fpu.c b/ALIROOT/fpu.c
new file mode 100644 (file)
index 0000000..421d4c2
--- /dev/null
@@ -0,0 +1,9 @@
+#ifdef __linux
+#include <fpu_control.h>
+void __attribute__ ((constructor))
+     trapfpe () {
+  fpu_control_t cw = _FPU_DEFAULT & ~(_FPU_MASK_IM | _FPU_MASK_ZM |
+                                     _FPU_MASK_OM);
+  _FPU_SETCW(cw);
+}
+#endif