Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Message-ID: <3A5B23FC.59E103E4@mip.sdu.dk>
Date: Tue, 09 Jan 2001 15:45:16 +0100
From: =?iso-8859-1?Q?Ren=E9=20M=F8ller?= Fonseca <fonseca@mip.sdu.dk>
Organization: MIP, University of Southern Denmark
X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: prototype of bind in sys/socket.h
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

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

