[Python-checkins] CVS: python/dist/src/Modules selectmodule.c,2.48,2.49

Tim Peters python-dev@python.org
Mon, 11 Dec 2000 17:18:43 -0800


Update of /cvsroot/python/python/dist/src/Modules
In directory slayer.i.sourceforge.net:/tmp/cvs-serv14057/python/dist/src/Modules

Modified Files:
	selectmodule.c 
Log Message:
SF bug 110843:  Low FD_SETSIZE limit on Win32 (PR#41).  Boosted to 512.


Index: selectmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/selectmodule.c,v
retrieving revision 2.48
retrieving revision 2.49
diff -C2 -r2.48 -r2.49
*** selectmodule.c	2000/09/28 21:33:44	2.48
--- selectmodule.c	2000/12/12 01:18:41	2.49
***************
*** 1,3 ****
- 
  /* select - Module containing unix select(2) call.
     Under Unix, the file descriptors are small integers.
--- 1,2 ----
***************
*** 9,12 ****
--- 8,21 ----
  
  #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