/Python/pyfpe.c

http://unladen-swallow.googlecode.com/ · C · 23 lines · 11 code · 3 blank · 9 comment · 0 complexity · e77085a1642fcbc15ec277ded2aa56aa MD5 · raw file

  1. #include "pyconfig.h"
  2. #include "pyfpe.h"
  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. #ifdef WANT_SIGFPE_HANDLER
  11. jmp_buf PyFPE_jbuf;
  12. int PyFPE_counter = 0;
  13. #endif
  14. /* Have this outside the above #ifdef, since some picky ANSI compilers issue a
  15. warning when compiling an empty file. */
  16. double
  17. PyFPE_dummy(void *dummy)
  18. {
  19. return 1.0;
  20. }