diff options
author | Skip Montanaro <skip@pobox.com> | 2007-08-16 14:35:24 (GMT) |
---|---|---|
committer | Skip Montanaro <skip@pobox.com> | 2007-08-16 14:35:24 (GMT) |
commit | 7a98be2efbdc44a6271e3bf6117a1e6c77828414 (patch) | |
tree | 64b6306494f992605ef5bd854dfc9e4922f8b967 /Modules/socketmodule.c | |
parent | c5aba174477a4bdbda31d859ce407c6ee7cef293 (diff) | |
download | cpython-7a98be2efbdc44a6271e3bf6117a1e6c77828414.zip cpython-7a98be2efbdc44a6271e3bf6117a1e6c77828414.tar.gz cpython-7a98be2efbdc44a6271e3bf6117a1e6c77828414.tar.bz2 |
Remove RISCOS support
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r-- | Modules/socketmodule.c | 89 |
1 files changed, 0 insertions, 89 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 3ddb0a7..d8ea423 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -251,15 +251,7 @@ typedef size_t socklen_t; # include <arpa/inet.h> # endif -# ifndef RISCOS # include <fcntl.h> -# else -# include <sys/ioctl.h> -# include <socklib.h> -# define NO_DUP -int h_errno; /* not used */ -# define INET_ADDRSTRLEN 16 -# endif #else @@ -417,11 +409,6 @@ static PyObject *socket_herror; static PyObject *socket_gaierror; static PyObject *socket_timeout; -#ifdef RISCOS -/* Global variable which is !=0 if Python is running in a RISC OS taskwindow */ -static int taskwindow; -#endif - /* A forward reference to the socket type object. The sock_type variable contains pointers to various functions, some of which call new_sockobject(), which uses sock_type, so @@ -582,18 +569,6 @@ set_error(void) } #endif -#if defined(RISCOS) - if (_inet_error.errnum != NULL) { - PyObject *v; - v = Py_BuildValue("(is)", errno, _inet_err()); - if (v != NULL) { - PyErr_SetObject(socket_error, v); - Py_DECREF(v); - } - return NULL; - } -#endif - return PyErr_SetFromErrno(socket_error); } @@ -670,11 +645,9 @@ sendsegmented(int sock_fd, char *buf, int len, int flags) static int internal_setblocking(PySocketSockObject *s, int block) { -#ifndef RISCOS #ifndef MS_WINDOWS int delay_flag; #endif -#endif Py_BEGIN_ALLOW_THREADS #ifdef __BEOS__ @@ -682,7 +655,6 @@ internal_setblocking(PySocketSockObject *s, int block) setsockopt(s->sock_fd, SOL_SOCKET, SO_NONBLOCK, (void *)(&block), sizeof(int)); #else -#ifndef RISCOS #ifndef MS_WINDOWS #if defined(PYOS_OS2) && !defined(PYCC_GCC) block = !block; @@ -702,10 +674,6 @@ internal_setblocking(PySocketSockObject *s, int block) block = !block; ioctlsocket(s->sock_fd, FIONBIO, (u_long*)&block); #endif /* MS_WINDOWS */ -#else /* RISCOS */ - block = !block; - socketioctl(s->sock_fd, FIONBIO, (u_long*)&block); -#endif /* RISCOS */ #endif /* __BEOS__ */ Py_END_ALLOW_THREADS @@ -778,9 +746,6 @@ PyMODINIT_FUNC init_sockobject(PySocketSockObject *s, SOCKET_T fd, int family, int type, int proto) { -#ifdef RISCOS - int block = 1; -#endif s->sock_fd = fd; s->sock_family = family; s->sock_type = type; @@ -792,10 +757,6 @@ init_sockobject(PySocketSockObject *s, if (defaulttimeout >= 0.0) internal_setblocking(s, 0); -#ifdef RISCOS - if (taskwindow) - socketioctl(s->sock_fd, 0x80046679, (u_long*)&block); -#endif } @@ -1700,30 +1661,6 @@ Returns the timeout in floating seconds associated with socket \n\ operations. A timeout of None indicates that timeouts on socket \n\ operations are disabled."); -#ifdef RISCOS -/* s.sleeptaskw(1 | 0) method */ - -static PyObject * -sock_sleeptaskw(PySocketSockObject *s,PyObject *arg) -{ - int block; - block = PyInt_AsLong(arg); - if (block == -1 && PyErr_Occurred()) - return NULL; - Py_BEGIN_ALLOW_THREADS - socketioctl(s->sock_fd, 0x80046679, (u_long*)&block); - Py_END_ALLOW_THREADS - - Py_INCREF(Py_None); - return Py_None; -} -PyDoc_STRVAR(sleeptaskw_doc, -"sleeptaskw(flag)\n\ -\n\ -Allow sleeps in taskwindows."); -#endif - - /* s.setsockopt() method. With an integer third argument, sets an integer option. With a string third argument, sets an option from a buffer; @@ -2749,10 +2686,6 @@ static PyMethodDef sock_methods[] = { setsockopt_doc}, {"shutdown", (PyCFunction)sock_shutdown, METH_O, shutdown_doc}, -#ifdef RISCOS - {"sleeptaskw", (PyCFunction)sock_sleeptaskw, METH_O, - sleeptaskw_doc}, -#endif {NULL, NULL} /* sentinel */ }; @@ -2963,11 +2896,7 @@ gethost_common(struct hostent *h, struct sockaddr *addr, int alen, int af) if (h == NULL) { /* Let's get real error message to return */ -#ifndef RISCOS set_herror(h_errno); -#else - PyErr_SetString(socket_error, "host not found"); -#endif return NULL; } @@ -4016,24 +3945,6 @@ static PyMethodDef socket_methods[] = { }; -#ifdef RISCOS -#define OS_INIT_DEFINED - -static int -os_init(void) -{ - _kernel_swi_regs r; - - r.r[0] = 0; - _kernel_swi(0x43380, &r, &r); - taskwindow = r.r[0]; - - return 1; -} - -#endif /* RISCOS */ - - #ifdef MS_WINDOWS #define OS_INIT_DEFINED |