diff Modules/socketmodule.c @ 20654:edd9d0b3c47e legacy-trunk

SF patch #474590 -- RISC OS support
author Guido van Rossum <guido@python.org>
date Wed, 24 Oct 2001 20:42:55 +0000
parents fec950d8c25d
children f7009167dd67
line wrap: on
line diff
--- a/Modules/socketmodule.c	Wed Oct 24 20:22:40 2001 +0000
+++ b/Modules/socketmodule.c	Wed Oct 24 20:42:55 2001 +0000
@@ -130,20 +130,6 @@
 #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 @@
 #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 @@
 
 	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) {