Mailing-List: contact cygwin-developers-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT cygwin DOT com Delivered-To: mailing list cygwin-developers AT cygwin DOT com Date: Fri, 10 Jan 2003 13:55:45 +0100 From: Corinna Vinschen To: cygwin-developers AT cygwin DOT com Subject: Re: gethostname() patch Message-ID: <20030110135545.I1401@cygbert.vinschen.de> Reply-To: cygwin-developers AT cygwin DOT com Mail-Followup-To: cygwin-developers AT cygwin DOT com References: <20030110130259 DOT E1401 AT cygbert DOT vinschen DOT de> <005801c2b8a2$5217f630$0201a8c0 AT sos> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <005801c2b8a2$5217f630$0201a8c0@sos> User-Agent: Mutt/1.3.22.1i On Fri, Jan 10, 2003 at 07:18:01AM -0500, Sergey Okhapkin wrote: > Two notes: > > 1. Why do you call set_winsock_errno() but not set_errno() if > GetComputerName() failed? set_winsock_errno() sets errno. Gethostname() is a network function, so... > 2. You're comparing the return value of gethostname() with SOCKET_ERROR. > What the return value will be if TCPIP is not installed? Ooh, is there still any machine out there which hasn't TCP/IP installed? It would have raised a fatal error message so far. I've changed that so that in case the function can't get loaded, the return value is != 0. > > My questions is: Shouldn't uname call this function as well? Uname > > still uses the upper case value returned from GetComputerName(). What about my question? Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developer mailto:cygwin AT cygwin DOT com Red Hat, Inc.