Guido van Rossum | 0ae748d | 1997-02-14 22:58:07 +0000 | [diff] [blame] | 1 | #include "config.h" |
| 2 | #include "pyfpe.h" |
Guido van Rossum | 0ae748d | 1997-02-14 22:58:07 +0000 | [diff] [blame] | 3 | /* |
| 4 | * 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 |
| 12 | jmp_buf PyFPE_jbuf; |
| 13 | int PyFPE_counter = 0; |
Guido van Rossum | 1a8791e | 1998-08-04 22:46:29 +0000 | [diff] [blame] | 14 | #endif |
Guido van Rossum | d0dc5b0 | 1998-08-25 17:48:25 +0000 | [diff] [blame] | 15 | |
| 16 | /* Have this outside the above #ifdef, since some picky ANSI compilers issue a |
| 17 | warning when compiling an empty file. */ |
| 18 | |
| 19 | double |
Thomas Wouters | f70ef4f | 2000-07-22 18:47:25 +0000 | [diff] [blame] | 20 | PyFPE_dummy(void *dummy) |
Guido van Rossum | d0dc5b0 | 1998-08-25 17:48:25 +0000 | [diff] [blame] | 21 | { |
| 22 | return 1.0; |
| 23 | } |