summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2000-12-12 01:18:41 (GMT)
committerTim Peters <tim.peters@gmail.com>2000-12-12 01:18:41 (GMT)
commitd92dfe0ef52880ea1fb54620c0c1250a58c126c6 (patch)
treecc987534253be2207140c2d4542951768fb73e99 /Modules
parentf377d5732853d9e5d5c8da9ab1102de86b3fc0f1 (diff)
downloadcpython-d92dfe0ef52880ea1fb54620c0c1250a58c126c6.zip
cpython-d92dfe0ef52880ea1fb54620c0c1250a58c126c6.tar.gz
cpython-d92dfe0ef52880ea1fb54620c0c1250a58c126c6.tar.bz2
SF bug 110843: Low FD_SETSIZE limit on Win32 (PR#41). Boosted to 512.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/selectmodule.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c
index 008ffa4..de910c6 100644
--- a/Modules/selectmodule.c
+++ b/Modules/selectmodule.c
@@ -1,4 +1,3 @@
-
/* select - Module containing unix select(2) call.
Under Unix, the file descriptors are small integers.
Under Win32, select only exists for sockets, and sockets may
@@ -9,6 +8,16 @@
#include "Python.h"
+/* 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
+
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif