This is the mail archive of the
cygwin@sources.redhat.com
mailing list for the Cygwin project.
prototype of bind in sys/socket.h
- To: cygwin at cygwin dot com
- Subject: prototype of bind in sys/socket.h
- From: René Møller Fonseca <fonseca at mip dot sdu dot dk>
- Date: Tue, 09 Jan 2001 15:45:16 +0100
- Organization: MIP, University of Southern Denmark
Hi,
The prototype of bind in /usr/include/sys/socket.h is:
int bind (int, struct sockaddr *__my_addr, int __addrlen);
Without knowing what the standard exactly suggests, I think this should
have been:
int bind (int, const struct sockaddr *__my_addr, int __addrlen);
bind is not allowed to modify the socket address! The operating systems,
that I have checked, use const in the prototype of bind.
Cheers,
René
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple