diff options
author | Guido van Rossum <guido@python.org> | 1998-08-04 22:53:56 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-08-04 22:53:56 (GMT) |
commit | bcc207484a0f8f27a684e11194e7430c0710f66d (patch) | |
tree | 506ce2d793a619a92e78faa89032878ea4a43461 /Modules/selectmodule.c | |
parent | 1a8791e0b875df8e9428c2d9969f64e5967ac0b4 (diff) | |
download | cpython-bcc207484a0f8f27a684e11194e7430c0710f66d.zip cpython-bcc207484a0f8f27a684e11194e7430c0710f66d.tar.gz cpython-bcc207484a0f8f27a684e11194e7430c0710f66d.tar.bz2 |
Changes for BeOS, QNX and long long, by Chris Herborth.
Diffstat (limited to 'Modules/selectmodule.c')
-rw-r--r-- | Modules/selectmodule.c | 9 |
1 files changed, 8 insertions, 1 deletions
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 @@ PERFORMANCE OF THIS SOFTWARE. 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 @@ extern void bzero(); #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 @@ list2set(list, set, fd2obj) "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) { |