From: Guido van Rossum Date: Thu, 26 Sep 2002 16:53:31 +0000 (+0000) Subject: Backport of 2.18: X-Git-Tag: v2.2.2b1~99 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6ad929261f9369285bdf36f398c98415dbe3983b;p=thirdparty%2FPython%2Fcpython.git Backport of 2.18: Patch for the DEC Alpha under Linux, by Lee Busby. --- diff --git a/Modules/fpectlmodule.c b/Modules/fpectlmodule.c index 843bc165fa78..b6643d0d337d 100644 --- a/Modules/fpectlmodule.c +++ b/Modules/fpectlmodule.c @@ -180,6 +180,14 @@ static void fpe_reset(Sigfunc *handler) ieee_set_fp_control(fp_control); PyOS_setsig(SIGFPE, handler); +/*-- DEC ALPHA LINUX ------------------------------------------------------*/ +#elif defined(__alpha) && defined(linux) +#include + 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) /* UNICOS delivers SIGFPE by default, but no matherr */