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
Date: Fri, 29 Dec 2000 11:03:48 +0100
From: Corinna Vinschen <cygwin@cygwin.com>
To: cygwin <cygwin@cygwin.com>
Subject: Re: gethostbyname & uname question, help!
Message-ID: <20001229110348.A4278@cygbert.vinschen.de>
Mail-Followup-To: cygwin <cygwin@cygwin.com>
References: <3A4C577C.FCE6D935@mail.rdcps.ac.cn>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <3A4C577C.FCE6D935@mail.rdcps.ac.cn>; from crazyyao@mail.rdcps.ac.cn on Fri, Dec 29, 2000 at 05:21:00PM +0800

On Fri, Dec 29, 2000 at 05:21:00PM +0800, crazyyao wrote:
> I am a green hand in cygwin programming.
> Would someone tell me how to get the network program compiled on cygwin?
> 
> I can't find which lib contains the function "uname" and
> the function "gethostbyname" can't return the right value, either.

I don't understand. Both functions are part of the standard
library and are linked in without giving any additional lib
when linking. gethostbynmae returns what Winsock returns
except the given name is a x.x.x.x address in which case
this address is returned.

> Which head file should I include, winsock.h or sys/socket.h?
> What's the differenc between them?

Don't include the winsock headers by yourself when creating a
Cygwin application.

> Which libs should I use?

libcygwin.a which is linked in by default. No commandline switch
necessary.

> Where are they?

/lib

> I used to work on Linux.

Congratulations.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

