Files

22 lines
520 B
C
Raw Permalink Normal View History

2010-09-20 02:36:32 +00:00
/* Minimal main program -- everything is loaded from the library */
#include "Python.h"
#ifdef __FreeBSD__
2022-12-10 20:46:47 +00:00
#include <fenv.h>
2010-09-20 02:36:32 +00:00
#endif
int
main(int argc, char **argv)
{
/* 754 requires that FP exceptions run in "no stop" mode by default,
* and until C vendors implement C99's ways to control FP exceptions,
* Python requires non-stop mode. Alas, some platforms enable FP
* exceptions by default. Here we disable them.
*/
#ifdef __FreeBSD__
2022-12-10 20:46:47 +00:00
fedisableexcept(FE_OVERFLOW);
2010-09-20 02:36:32 +00:00
#endif
return Py_Main(argc, argv);
}