blob: ab0ef83ead094acf287ca54cff1c33ed1630b895 [file] [log] [blame]
Martin v. Löwis4f1cd8b2001-07-26 13:41:06 +00001#include "pyconfig.h"
Guido van Rossum0ae748d1997-02-14 22:58:07 +00002#include "pyfpe.h"
Serhiy Storchaka009b8112015-03-18 21:53:15 +02003/*
Guido van Rossum0ae748d1997-02-14 22:58:07 +00004 * The signal handler for SIGFPE is actually declared in an external
5 * module fpectl, or as preferred by the user. These variable
6 * definitions are required in order to compile Python without
7 * getting missing externals, but to actually handle SIGFPE requires
8 * defining a handler and enabling generation of SIGFPE.
9 */
10
11#ifdef WANT_SIGFPE_HANDLER
12jmp_buf PyFPE_jbuf;
13int PyFPE_counter = 0;
Guido van Rossum1a8791e1998-08-04 22:46:29 +000014#endif
Guido van Rossumd0dc5b01998-08-25 17:48:25 +000015
Serhiy Storchaka009b8112015-03-18 21:53:15 +020016/* Have this outside the above #ifdef, since some picky ANSI compilers issue a
Guido van Rossumd0dc5b01998-08-25 17:48:25 +000017 warning when compiling an empty file. */
18
19double
Thomas Woutersf70ef4f2000-07-22 18:47:25 +000020PyFPE_dummy(void *dummy)
Guido van Rossumd0dc5b01998-08-25 17:48:25 +000021{
22 return 1.0;
23}