Merged revisions 69519 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r69519 | gregory.p.smith | 2009-02-11 15:45:25 -0800 (Wed, 11 Feb 2009) | 3 lines

  Issue #1008086: Fixes socket.inet_aton() to always return 4 bytes even
  on LP64 platforms (most 64-bit Linux, bsd, unix systems).
........
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 9591c12..b1b7141 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -3745,8 +3745,11 @@
 #endif
 
 #if !defined(HAVE_INET_ATON) || defined(USE_INET_ATON_WEAKLINK)
+#if (SIZEOF_INT != 4)
+#error "Not sure if in_addr_t exists and int is not 32-bits."
+#endif
 	/* Have to use inet_addr() instead */
-	unsigned long packed_addr;
+	unsigned int packed_addr;
 #endif
 	char *ip_addr;
 
@@ -5284,7 +5287,10 @@
 inet_pton(int af, const char *src, void *dst)
 {
 	if (af == AF_INET) {
-		long packed_addr;
+#if (SIZEOF_INT != 4)
+#error "Not sure if in_addr_t exists and int is not 32-bits."
+#endif
+		unsigned int packed_addr;
 		packed_addr = inet_addr(src);
 		if (packed_addr == INADDR_NONE)
 			return 0;