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 6a3c84d..ac4c3a1 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