at master 1.4 kB view raw
1--- Python-2.6.5.orig/Modules/selectmodule.c 2012-02-02 22:35:21.835125000 -0500 2+++ Python-2.6.5/Modules/selectmodule.c 2012-02-02 22:41:41.210125000 -0500 3@@ -6,6 +6,21 @@ 4 >= 0. 5 */ 6 7+/* Windows #defines FD_SETSIZE to 64 if FD_SETSIZE isn't already defined. 8+ 64 is too small (too many people have bumped into that limit). 9+ Here we boost it. 10+ 11+ Cygwin also defines FD_SETSIZE to 64, so also increase the limit on 12+ Cygwin. We must do this before sys/types.h is included, which otherwise 13+ sets FD_SETSIZE to the default. 14+ 15+ Users who want even more than the boosted limit should #define 16+ FD_SETSIZE higher before this; e.g., via compiler /D switch. 17+*/ 18+#if (defined(MS_WINDOWS) || defined(__CYGWIN__)) && !defined(FD_SETSIZE) 19+#define FD_SETSIZE 512 20+#endif 21+ 22 #include "Python.h" 23 #include <structmember.h> 24 25@@ -16,16 +31,6 @@ 26 #undef HAVE_BROKEN_POLL 27 #endif 28 29-/* Windows #defines FD_SETSIZE to 64 if FD_SETSIZE isn't already defined. 30- 64 is too small (too many people have bumped into that limit). 31- Here we boost it. 32- Users who want even more than the boosted limit should #define 33- FD_SETSIZE higher before this; e.g., via compiler /D switch. 34-*/ 35-#if defined(MS_WINDOWS) && !defined(FD_SETSIZE) 36-#define FD_SETSIZE 512 37-#endif 38- 39 #if defined(HAVE_POLL_H) 40 #include <poll.h> 41 #elif defined(HAVE_SYS_POLL_H)