X-Spam-Check-By: sourceware.org
Date: Fri, 7 Jul 2006 09:56:31 +0200
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: change in 20060704 snap
Message-ID: <20060707075631.GA11454@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <20060707015943.GA7409@ns1.anodized.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20060707015943.GA7409@ns1.anodized.com>
User-Agent: Mutt/1.4.2i
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Jul  6 18:59, clayne@anodized.com wrote:
> -/* undocumented in wsock32.dll */
> -extern "C" unsigned int WINAPI inet_network (const char *);
> -
>  extern "C" unsigned int
>  cygwin_inet_network (const char *cp)
> @@ -157,7 +152,5 @@ cygwin_inet_network (const char *cp)
>    if (efault.faulted (EFAULT))
>      return INADDR_NONE;
> -  unsigned int res = inet_network (cp);
> -
> -  return res;
> +  return ntohl (inet_addr (cp));
>  }
> 
> Won't this be returning a full host address rather than a network address
> now?

Yeah, right.

> If need be, I could contribute by writing cygwin-native versions of
> inet_pton, inet_ntop, inet_aton, inet_ntoa, etc. rather than calling the
> windows variants. inet_addr on it's own is already pretty bitrotted at
> this point as well.

Thanks for the offer.  However, I'm in the process of restructuring
the network stuff.  I'm just testing inet_aton, inet_ntoa and
inet_network from FreeBSD which seem to be fine for Cygwin, too,
so I will use them.  inet_pton and inet_ntop are using these functions
so the are on the safe side.  New AF_INET6 capable versions of inet_pton
and inet_ntop are already in the loop, too.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

