#6416: Fix compilation of the select module on Windows, as well as test_subprocess:
PIPE_BUF is not defined on Windows, and probably has no meaning there.

Anyway the subprocess module uses another way to perform non-blocking reads (with a thread)
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
index c8dcb56..a5bb650 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -418,6 +418,12 @@
     import fcntl
     import pickle
 
+    # When select or poll has indicated that the file is writable,
+    # we can write up to _PIPE_BUF bytes without risk of blocking.
+    # POSIX defines PIPE_BUF as >= 512.
+    _PIPE_BUF = getattr(select, 'PIPE_BUF', 512)
+
+
 __all__ = ["Popen", "PIPE", "STDOUT", "call", "check_call",
            "check_output", "CalledProcessError"]
 
@@ -426,11 +432,6 @@
 except:
     MAXFD = 256
 
-# When select or poll has indicated that the file is writable,
-# we can write up to _PIPE_BUF bytes without risk of blocking.
-# POSIX defines PIPE_BUF as >= 512.
-_PIPE_BUF = getattr(select, 'PIPE_BUF', 512)
-
 _active = []
 
 def _cleanup():
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
index 5add023..1693c6b 100644
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -769,7 +769,7 @@
 
 unit_tests = [ProcessTestCase]
 
-if subprocess._has_poll:
+if getattr(subprocess, '_has_poll', False):
     class ProcessTestCaseNoPoll(ProcessTestCase):
         def setUp(self):
             subprocess._has_poll = False