Changes for BeOS, QNX and long long, by Chris Herborth.
diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c
index 3913181..dfc765c 100644
--- a/Modules/selectmodule.c
+++ b/Modules/selectmodule.c
@@ -33,6 +33,8 @@
    Under Unix, the file descriptors are small integers.
    Under Win32, select only exists for sockets, and sockets may
    have any value except INVALID_SOCKET.
+   Under BeOS, we suffer the same dichotomy as Win32; sockets can be anything
+   >= 0.
 */
 
 #include "Python.h"
@@ -56,9 +58,14 @@
 #ifdef MS_WINDOWS
 #include <winsock.h>
 #else
+#ifdef __BEOS__
+#include <net/socket.h>
+#define SOCKET int
+#else
 #include "myselect.h" /* Also includes mytime.h */
 #define SOCKET int
 #endif
+#endif
 
 static PyObject *SelectError;
 
@@ -134,7 +141,7 @@
 			"argument must be an int, or have a fileno() method.");
 			goto finally;
 		}
-#ifdef _MSC_VER
+#if defined(_MSC_VER) || defined(__BEOS__)
 		max = 0;		     /* not used for Win32 */
 #else  /* !_MSC_VER */
 		if (v < 0 || v >= FD_SETSIZE) {