PageRenderTime 364ms CodeModel.GetById 131ms app.highlight 1ms RepoModel.GetById 230ms app.codeStats 1ms

/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
 3#include "Python.h"
 4
 5#ifdef __FreeBSD__
 6#include <ieeefp.h>
 7#endif
 8
 9int
10main(int argc, char **argv)
11{
12	/* 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
23	return Py_Main(argc, argv);
24}