blob: 2739b8b11098ee799ff86b1a3d6c3f51ab8fc899 [file] [log] [blame]
Guido van Rossum4c04be61997-07-19 19:25:33 +00001/* Minimal main program -- everything is loaded from the library */
2
Guido van Rossumbe10c201998-08-08 20:01:22 +00003#include "Python.h"
4
Tim Peters4643bd92002-12-28 21:56:08 +00005#ifdef __FreeBSD__
6#include <floatingpoint.h>
7#endif
8
Guido van Rossum7c141031997-08-15 02:52:08 +00009int
Fredrik Lundhfaa209d62000-07-09 20:35:15 +000010main(int argc, char **argv)
Guido van Rossum4c04be61997-07-19 19:25:33 +000011{
Tim Peters4643bd92002-12-28 21:56:08 +000012 /* 754 requires that FP exceptions run in "no stop" mode by default,
13 * and until C vendors implement C99's ways to control FP exceptions,
14 * Python requires non-stop mode. Alas, some platforms enable FP
15 * exceptions by default. Here we disable them.
16 */
17#ifdef __FreeBSD__
18 fp_except_t m;
19
20 m = fpgetmask();
21 fpsetmask(m & ~FP_X_OFL);
22#endif
Guido van Rossum4c04be61997-07-19 19:25:33 +000023 return Py_Main(argc, argv);
24}