summaryrefslogtreecommitdiffstats
path: root/Modules/socketmodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-10-24 20:42:55 (GMT)
committerGuido van Rossum <guido@python.org>2001-10-24 20:42:55 (GMT)
commite2ae77b8b8a62e648bb1864a9b36ef3280984404 (patch)
treee03ad6f126a16529b2fb43671903e357bcb05835 /Modules/socketmodule.c
parentc6ac8a78f668123ec5c2c3d5a824e7886e9a1c60 (diff)
downloadcpython-e2ae77b8b8a62e648bb1864a9b36ef3280984404.zip
cpython-e2ae77b8b8a62e648bb1864a9b36ef3280984404.tar.gz
cpython-e2ae77b8b8a62e648bb1864a9b36ef3280984404.tar.bz2
SF patch #474590 -- RISC OS support
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r--Modules/socketmodule.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 377c792..1d9a13d 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -130,20 +130,6 @@ Socket methods:
#include <os2.h>
#endif
-#ifdef RISCOS
-#define NO_DUP
-#undef off_t
-#undef uid_t
-#undef gid_t
-#undef errno
-#include <signal.h>
-#include "socklib.h"
-#include "inetlib.h"
-#include "netdb.h"
-#include "unixlib.h"
-#include "netinet/in.h"
-#include "sys/ioctl.h"
-#else /*RISCOS*/
#include <sys/types.h>
@@ -165,13 +151,18 @@ Socket methods:
#endif
#endif
+#ifndef RISCOS
#include <fcntl.h>
#else
+#include <sys/fcntl.h>
+#define NO_DUP
+int h_errno; /* not used */
+#endif
+#else
#include <winsock.h>
#include <fcntl.h>
#endif
-#endif /*RISCOS*/
#ifdef HAVE_SYS_UN_H
#include <sys/un.h>
@@ -1804,7 +1795,11 @@ 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
PyH_Err(h_errno);
+#else
+ PyErr_SetString(PySocket_Error, "host not found");
+#endif
return NULL;
}
if (h->h_addrtype != af) {