[Python-checkins] cpython (merge 3.6 -> default): Issue #28153: Merge from 3.6

berker.peksag python-checkins at python.org
Wed Sep 14 11:16:43 EDT 2016


https://hg.python.org/cpython/rev/6c5f9c6c25ea
changeset:   103805:6c5f9c6c25ea
parent:      103803:56294e03ad89
parent:      103804:57ff729e923f
user:        Berker Peksag <berker.peksag at gmail.com>
date:        Wed Sep 14 18:17:32 2016 +0300
summary:
  Issue #28153: Merge from 3.6

files:
  Modules/selectmodule.c |  18 ++++++++++++++++++
  1 files changed, 18 insertions(+), 0 deletions(-)


diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c
--- a/Modules/selectmodule.c
+++ b/Modules/selectmodule.c
@@ -2533,13 +2533,21 @@
     /* event filters */
     PyModule_AddIntConstant(m, "KQ_FILTER_READ", EVFILT_READ);
     PyModule_AddIntConstant(m, "KQ_FILTER_WRITE", EVFILT_WRITE);
+#ifdef EVFILT_AIO
     PyModule_AddIntConstant(m, "KQ_FILTER_AIO", EVFILT_AIO);
+#endif
+#ifdef EVFILT_VNODE
     PyModule_AddIntConstant(m, "KQ_FILTER_VNODE", EVFILT_VNODE);
+#endif
+#ifdef EVFILT_PROC
     PyModule_AddIntConstant(m, "KQ_FILTER_PROC", EVFILT_PROC);
+#endif
 #ifdef EVFILT_NETDEV
     PyModule_AddIntConstant(m, "KQ_FILTER_NETDEV", EVFILT_NETDEV);
 #endif
+#ifdef EVFILT_SIGNAL
     PyModule_AddIntConstant(m, "KQ_FILTER_SIGNAL", EVFILT_SIGNAL);
+#endif
     PyModule_AddIntConstant(m, "KQ_FILTER_TIMER", EVFILT_TIMER);
 
     /* event flags */
@@ -2550,16 +2558,23 @@
     PyModule_AddIntConstant(m, "KQ_EV_ONESHOT", EV_ONESHOT);
     PyModule_AddIntConstant(m, "KQ_EV_CLEAR", EV_CLEAR);
 
+#ifdef EV_SYSFLAGS
     PyModule_AddIntConstant(m, "KQ_EV_SYSFLAGS", EV_SYSFLAGS);
+#endif
+#ifdef EV_FLAG1
     PyModule_AddIntConstant(m, "KQ_EV_FLAG1", EV_FLAG1);
+#endif
 
     PyModule_AddIntConstant(m, "KQ_EV_EOF", EV_EOF);
     PyModule_AddIntConstant(m, "KQ_EV_ERROR", EV_ERROR);
 
     /* READ WRITE filter flag */
+#ifdef NOTE_LOWAT
     PyModule_AddIntConstant(m, "KQ_NOTE_LOWAT", NOTE_LOWAT);
+#endif
 
     /* VNODE filter flags  */
+#ifdef EVFILT_VNODE
     PyModule_AddIntConstant(m, "KQ_NOTE_DELETE", NOTE_DELETE);
     PyModule_AddIntConstant(m, "KQ_NOTE_WRITE", NOTE_WRITE);
     PyModule_AddIntConstant(m, "KQ_NOTE_EXTEND", NOTE_EXTEND);
@@ -2567,8 +2582,10 @@
     PyModule_AddIntConstant(m, "KQ_NOTE_LINK", NOTE_LINK);
     PyModule_AddIntConstant(m, "KQ_NOTE_RENAME", NOTE_RENAME);
     PyModule_AddIntConstant(m, "KQ_NOTE_REVOKE", NOTE_REVOKE);
+#endif
 
     /* PROC filter flags  */
+#ifdef EVFILT_PROC
     PyModule_AddIntConstant(m, "KQ_NOTE_EXIT", NOTE_EXIT);
     PyModule_AddIntConstant(m, "KQ_NOTE_FORK", NOTE_FORK);
     PyModule_AddIntConstant(m, "KQ_NOTE_EXEC", NOTE_EXEC);
@@ -2578,6 +2595,7 @@
     PyModule_AddIntConstant(m, "KQ_NOTE_TRACK", NOTE_TRACK);
     PyModule_AddIntConstant(m, "KQ_NOTE_CHILD", NOTE_CHILD);
     PyModule_AddIntConstant(m, "KQ_NOTE_TRACKERR", NOTE_TRACKERR);
+#endif
 
     /* NETDEV filter flags */
 #ifdef EVFILT_NETDEV

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


More information about the Python-checkins mailing list