Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com To: cygwin-developers AT sourceware DOT cygnus DOT com Subject: Re: cygwin_bind bug. References: <19991124192413 DOT A12159 AT cygnus DOT com> <19991124205652 DOT B15777 AT cygnus DOT com> <19991124213743 DOT A16356 AT cygnus DOT com> <383D046F DOT FF903EF8 AT vinschen DOT de> <19991125105027 DOT A746 AT cygnus DOT com> Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=US-ASCII From: Kazuhiro Fujieda Date: 26 Nov 1999 10:18:22 +0900 In-Reply-To: Chris Faylor's message of Thu, 25 Nov 1999 10:50:27 -0500 Message-ID: Lines: 32 X-Mailer: Gnus v5.3/Emacs 19.34 >>> On Thu, 25 Nov 1999 10:50:27 -0500 >>> Chris Faylor said: > Take a look at the recent snapshot patch. I've fixed this in a different > way. Hopefully, it is equivalent. Unfortunately, there is a bug in the patch. cygwin_bind() with an address other than AF_UNIX always return -1. The following patch revert the last part of cygwin_bind() to Sergey's code. --- net.cc- Thu Nov 25 15:50:57 1999 +++ net.cc Fri Nov 26 10:14:38 1999 @@ -814,8 +814,12 @@ cygwin_bind (int fd, struct sockaddr *my } #undef un_addr } - else if (bind (sock->get_socket (), my_addr, addrlen)) - set_winsock_errno (); + else + { + res = bind (sock->get_socket (), my_addr, addrlen); + if (res) + set_winsock_errno (); + } } out: ____ | AIST Kazuhiro Fujieda | HOKURIKU School of Information Science o_/ 1990 Japan Advanced Institute of Science and Technology