summaryrefslogtreecommitdiffstats
path: root/Modules/socketmodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1993-11-23 17:53:17 (GMT)
committerGuido van Rossum <guido@python.org>1993-11-23 17:53:17 (GMT)
commitb376a4ad1848d1319245f440c85ef265e1fef401 (patch)
treedc431ee0a195eb95dacec0edd25fdc1f1b7edd8e /Modules/socketmodule.c
parent83eb962528e61dadd75cfc38e0aa6469d91d1a66 (diff)
downloadcpython-b376a4ad1848d1319245f440c85ef265e1fef401.zip
cpython-b376a4ad1848d1319245f440c85ef265e1fef401.tar.gz
cpython-b376a4ad1848d1319245f440c85ef265e1fef401.tar.bz2
* timemodule.c: Add hack for Solaris 2.
* posixmodule.c: don't prototype getcwd() -- it's not portable... * mappingobject.c: double-check validity of last_name_char in dict{lookup,insert,remove}. * arraymodule.c: need memmove only for non-STDC Suns. * Makefile: comment out HTML_LIBS and XT_USE by default * pythonmain.c: don't prototype getopt() -- it's not standardized * socketmodule.c: cast flags arg to {get,set}sockopt() and addrbuf arg to recvfrom() to (ANY*). * pythonrun.c (initsigs): fix prototype, make it static * intobject.c (LONG_BIT): only #define it if not already defined * classobject.[ch]: remove all references to unused instance_convert() * mappingobject.c (getmappingsize): Don't return NULL in int function.
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r--Modules/socketmodule.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index dfdf97b..3fc8755 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -388,7 +388,7 @@ sock_allowbroadcast(s, args)
if (!getargs(args, "i", &flag))
return NULL;
res = setsockopt(s->sock_fd, SOL_SOCKET, SO_BROADCAST,
- &flag, sizeof flag);
+ (ANY *)&flag, sizeof flag);
if (res < 0)
return socket_error();
INCREF(None);
@@ -422,7 +422,7 @@ sock_setsockopt(s, args)
if (!getargs(args, "(iis#)", &level, &optname, &buf, &buflen))
return NULL;
}
- res = setsockopt(s->sock_fd, level, optname, buf, buflen);
+ res = setsockopt(s->sock_fd, level, optname, (ANY *)buf, buflen);
if (res < 0)
return socket_error();
INCREF(None);
@@ -450,7 +450,8 @@ sock_getsockopt(s, args)
if (getargs(args, "(ii)", &level, &optname)) {
int flag = 0;
int flagsize = sizeof flag;
- res = getsockopt(s->sock_fd, level, optname, &flag, &flagsize);
+ res = getsockopt(s->sock_fd, level, optname,
+ (ANY *)&flag, &flagsize);
if (res < 0)
return socket_error();
return newintobject(flag);
@@ -465,8 +466,8 @@ sock_getsockopt(s, args)
buf = newsizedstringobject((char *)NULL, buflen);
if (buf == NULL)
return NULL;
- res = getsockopt(s->sock_fd, level, optname, getstringvalue(buf),
- &buflen);
+ res = getsockopt(s->sock_fd, level, optname,
+ (ANY *)getstringvalue(buf), &buflen);
if (res < 0) {
DECREF(buf);
return socket_error();
@@ -720,7 +721,7 @@ sock_recvfrom(s, args)
return NULL;
BGN_SAVE
n = recvfrom(s->sock_fd, getstringvalue(buf), len, flags,
- addrbuf, &addrlen);
+ (ANY *)addrbuf, &addrlen);
END_SAVE
if (n < 0)
return socket_error();