summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2016-07-31 06:22:24 (GMT)
committerBenjamin Peterson <benjamin@python.org>2016-07-31 06:22:24 (GMT)
commitbf5868d2c5a9bc742b69172820a34ea88bfe2591 (patch)
treee47a64c7135d2e362f659fa1c2fd9a9969fe0383
parent607e1c4c44131fd77e714620d127151149152345 (diff)
parentdbaa559b7fc6b80c1f230119f609b99b5b3844f3 (diff)
downloadcpython-bf5868d2c5a9bc742b69172820a34ea88bfe2591.zip
cpython-bf5868d2c5a9bc742b69172820a34ea88bfe2591.tar.gz
cpython-bf5868d2c5a9bc742b69172820a34ea88bfe2591.tar.bz2
merge 3.5 (#27656)
-rw-r--r--Misc/NEWS2
-rw-r--r--Modules/posixmodule.c6
2 files changed, 8 insertions, 0 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index 9b41b74..a6bc778 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -41,6 +41,8 @@ Library
- Issue #7063: Remove dead code from the "array" module's slice handling.
Patch by Chuck.
+- Issue #27656: Do not assume sched.h defines any SCHED_* constants.
+
- Issue #27130: In the "zlib" module, fix handling of large buffers
(typically 4 GiB) when compressing and decompressing. Previously, inputs
were limited to 4 GiB, and compression and decompression operations did not
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 424daac..54685ae 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -12938,9 +12938,15 @@ all_ins(PyObject *m)
#endif
#ifdef HAVE_SCHED_H
+#ifdef SCHED_OTHER
if (PyModule_AddIntMacro(m, SCHED_OTHER)) return -1;
+#endif
+#ifdef SCHED_FIFO
if (PyModule_AddIntMacro(m, SCHED_FIFO)) return -1;
+#endif
+#ifdef SCHED_RR
if (PyModule_AddIntMacro(m, SCHED_RR)) return -1;
+#endif
#ifdef SCHED_SPORADIC
if (PyModule_AddIntMacro(m, SCHED_SPORADIC) return -1;
#endif