/Modules/python.c

http://unladen-swallow.googlecode.com/ · C · 24 lines · 14 code · 4 blank · 6 comment · 0 complexity · d222a733d9a697ceaaac11322f1c5924 MD5 · raw file

  1. /* Minimal main program -- everything is loaded from the library */
  2. #include "Python.h"
  3. #ifdef __FreeBSD__
  4. #include <ieeefp.h>
  5. #endif
  6. int
  7. main(int argc, char **argv)
  8. {
  9. /* 754 requires that FP exceptions run in "no stop" mode by default,
  10. * and until C vendors implement C99's ways to control FP exceptions,
  11. * Python requires non-stop mode. Alas, some platforms enable FP
  12. * exceptions by default. Here we disable them.
  13. */
  14. #ifdef __FreeBSD__
  15. fp_except_t m;
  16. m = fpgetmask();
  17. fpsetmask(m & ~FP_X_OFL);
  18. #endif
  19. return Py_Main(argc, argv);
  20. }