Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 286191 | Differences between
and this patch

Collapse All | Expand All

(-)file_not_specified_in_diff (-1 / +17 lines)
Line  Link Here
0
-- Modules/python.c
0
++ Modules/python.c
Lines 2-7 Link Here
2
2
3
#include "Python.h"
3
#include "Python.h"
4
4
5
#include <stdlib.h>
6
7
#ifdef __linux__
8
#include <linux/prctl.h>
9
#include <sys/prctl.h>
10
#endif
11
5
#ifdef __FreeBSD__
12
#ifdef __FreeBSD__
6
#include <floatingpoint.h>
13
#include <floatingpoint.h>
7
#endif
14
#endif
Lines 9-14 Link Here
9
int
16
int
10
main(int argc, char **argv)
17
main(int argc, char **argv)
11
{
18
{
19
	char *process_name;
20
12
	/* 754 requires that FP exceptions run in "no stop" mode by default,
21
	/* 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,
22
	 * and until C vendors implement C99's ways to control FP exceptions,
14
	 * Python requires non-stop mode.  Alas, some platforms enable FP
23
	 * Python requires non-stop mode.  Alas, some platforms enable FP
Lines 20-24 Link Here
20
	m = fpgetmask();
29
	m = fpgetmask();
21
	fpsetmask(m & ~FP_X_OFL);
30
	fpsetmask(m & ~FP_X_OFL);
22
#endif
31
#endif
32
33
#ifdef __linux__
34
	if ((process_name = getenv("PYTHON_PROCESS_NAME"))) {
35
		prctl(PR_SET_NAME, process_name);
36
	}
37
#endif
38
23
	return Py_Main(argc, argv);
39
	return Py_Main(argc, argv);
24
}
40
}

Return to bug 286191