[Python-checkins] python/dist/src/Modules fpectlmodule.c,2.17,2.18
gvanrossum@users.sourceforge.net
gvanrossum@users.sourceforge.net
Thu, 26 Sep 2002 09:52:04 -0700
Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv17765
Modified Files:
fpectlmodule.c
Log Message:
Patch for the DEC Alpha under Linux, by Lee Busby.
Index: fpectlmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/fpectlmodule.c,v
retrieving revision 2.17
retrieving revision 2.18
diff -C2 -d -r2.17 -r2.18
*** fpectlmodule.c 2 Aug 2002 02:27:13 -0000 2.17
--- fpectlmodule.c 26 Sep 2002 16:52:02 -0000 2.18
***************
*** 181,184 ****
--- 181,192 ----
PyOS_setsig(SIGFPE, handler);
+ /*-- DEC ALPHA LINUX ------------------------------------------------------*/
+ #elif defined(__alpha) && defined(linux)
+ #include <asm/fpu.h>
+ unsigned long fp_control =
+ IEEE_TRAP_ENABLE_INV | IEEE_TRAP_ENABLE_DZE | IEEE_TRAP_ENABLE_OVF;
+ ieee_set_fp_control(fp_control);
+ PyOS_setsig(SIGFPE, handler);
+
/*-- Cray Unicos ----------------------------------------------------------*/
#elif defined(cray)