[Python-checkins] cpython (merge 3.5 -> default): merge 3.5 (#27656)

benjamin.peterson python-checkins at python.org
Sun Jul 31 02:22:34 EDT 2016


https://hg.python.org/cpython/rev/64b763290da9
changeset:   102500:64b763290da9
parent:      102498:313e8fdb0d0c
parent:      102499:095b424127e7
user:        Benjamin Peterson <benjamin at python.org>
date:        Sat Jul 30 23:22:24 2016 -0700
summary:
  merge 3.5 (#27656)

files:
  Misc/NEWS             |  2 ++
  Modules/posixmodule.c |  6 ++++++
  2 files changed, 8 insertions(+), 0 deletions(-)


diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -41,6 +41,8 @@
 - 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
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -12938,9 +12938,15 @@
 #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

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list