Files
MSYS2-packages/python3/013-3.4-select-cygwin.patch
2015-05-07 10:37:54 +03:00

37 lines
1.2 KiB
Diff

--- Python-3.4.3/Modules/selectmodule.c.orig 2015-02-25 05:27:46.000000000 -0600
+++ Python-3.4.3/Modules/selectmodule.c 2015-05-05 13:58:58.914394500 -0500
@@ -4,6 +4,16 @@
have any value except INVALID_SOCKET.
*/
+/* Windows #defines FD_SETSIZE to 64 if FD_SETSIZE isn't already defined.
+ 64 is too small (too many people have bumped into that limit).
+ Here we boost it.
+ Users who want even more than the boosted limit should #define
+ FD_SETSIZE higher before this; e.g., via compiler /D switch.
+*/
+#if (defined(MS_WINDOWS) || defined(__CYGWIN__)) && !defined(FD_SETSIZE)
+#define FD_SETSIZE 512
+#endif
+
#include "Python.h"
#include <structmember.h>
@@ -22,16 +32,6 @@
#undef HAVE_BROKEN_POLL
#endif
-/* Windows #defines FD_SETSIZE to 64 if FD_SETSIZE isn't already defined.
- 64 is too small (too many people have bumped into that limit).
- Here we boost it.
- Users who want even more than the boosted limit should #define
- FD_SETSIZE higher before this; e.g., via compiler /D switch.
-*/
-#if defined(MS_WINDOWS) && !defined(FD_SETSIZE)
-#define FD_SETSIZE 512
-#endif
-
#if defined(HAVE_POLL_H)
#include <poll.h>
#elif defined(HAVE_SYS_POLL_H)