$OpenBSD: patch-Modules_socketmodule_c,v 1.1.1.1 2003/12/31 17:38:33 sturm Exp $
--- Modules/socketmodule.c.orig	2003-10-20 16:34:47.000000000 +0200
+++ Modules/socketmodule.c	2003-12-31 15:46:10.000000000 +0100
@@ -63,9 +63,6 @@ Local naming conventions:
 
 #include "Python.h"
 
-#undef MAX
-#define MAX(x, y) ((x) < (y) ? (y) : (x))
-
 /* Socket object documentation */
 PyDoc_STRVAR(sock_doc,
 "socket([family[, type[, proto]]]) -> socket object\n\
@@ -2818,7 +2815,7 @@ Convert a 32-bit integer from network to
 static PyObject *
 socket_htons(PyObject *self, PyObject *args)
 {
-	unsigned long x1, x2;
+	int x1, x2;
 
 	if (!PyArg_ParseTuple(args, "i:htons", &x1)) {
 		return NULL;
@@ -2889,7 +2886,7 @@ socket_inet_aton(PyObject *self, PyObjec
 	struct in_addr buf;
 #else
 	/* Have to use inet_addr() instead */
-	unsigned long packed_addr;
+	int packed_addr;
 #endif
 	char *ip_addr;
 
@@ -3020,7 +3017,7 @@ socket_inet_ntop(PyObject *self, PyObjec
 #endif
 	
 	/* Guarantee NUL-termination for PyString_FromString() below */
-	memset((void *) &ip[0], '\0', sizeof(ip) + 1);
+	memset((void *) &ip[0], '\0', sizeof(ip));
 
 	if (!PyArg_ParseTuple(args, "is#:inet_ntop", &af, &packed, &len)) {
 		return NULL;
