Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Unsubscribe: <mailto:cygwin-developers-unsubscribe-archive-cygwin-developers=delorie DOT com AT sourceware DOT cygnus DOT com> List-Subscribe: <mailto:cygwin-developers-subscribe AT sourceware DOT cygnus DOT com> List-Archive: <http://sourceware.cygnus.com/ml/cygwin-developers/> List-Post: <mailto:cygwin-developers AT sourceware DOT cygnus DOT com> List-Help: <mailto:cygwin-developers-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs> 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: <s1s903npgry DOT fsf AT jaist DOT ac DOT jp> <19991124192413 DOT A12159 AT cygnus DOT com> <s1s4sebpcyz DOT fsf AT jaist DOT ac DOT jp> <19991124205652 DOT B15777 AT cygnus DOT com> <s1s1z9fpand DOT fsf AT jaist DOT ac DOT jp> <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 <fujieda AT jaist DOT ac DOT jp> 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: <s1svh6qnj8h.fsf@jaist.ac.jp> Lines: 32 X-Mailer: Gnus v5.3/Emacs 19.34 >>> On Thu, 25 Nov 1999 10:50:27 -0500 >>> Chris Faylor <cgf AT cygnus DOT com> 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 <fujieda AT jaist DOT ac DOT jp> | HOKURIKU School of Information Science o_/ 1990 Japan Advanced Institute of Science and Technology