delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT sources DOT redhat DOT com |
Delivered-To: | mailing list cygwin AT sources DOT redhat DOT com |
Date: | Fri, 29 Dec 2000 11:36:06 +0100 |
From: | Corinna Vinschen <cygwin AT cygwin DOT com> |
To: | cygwin <cygwin AT cygwin DOT com> |
Subject: | Re: gethostbyname & uname question, help! |
Message-ID: | <20001229113606.B4278@cygbert.vinschen.de> |
Mail-Followup-To: | cygwin <cygwin AT cygwin DOT com> |
References: | <3A4C577C DOT FCE6D935 AT mail DOT rdcps DOT ac DOT cn> <20001229110348 DOT A4278 AT cygbert DOT vinschen DOT de> |
Mime-Version: | 1.0 |
User-Agent: | Mutt/1.2.5i |
In-Reply-To: | <20001229110348.A4278@cygbert.vinschen.de>; from cygwin@cygwin.com on Fri, Dec 29, 2000 at 11:03:48AM +0100 |
On Fri, Dec 29, 2000 at 11:03:48AM +0100, Corinna Vinschen wrote: > On Fri, Dec 29, 2000 at 05:21:00PM +0800, crazyyao wrote: > > 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. I forgot the difference: winsock.h is the Windows specific header. Windows uses an extra socket lib called Winsock which is based on the BSD implementation with several incompatible Windows additions. Cygwin has it's own socket interface which tries to be POSIX compatible. This implementation uses Winsock as it's base. You will get in trouble when mixing both. Cygwin has it's own `socket' call for example which uses the Winsock `socket' call. However, they are not interchangable. You can't call the Winsock `recv' with a Cygwin socket descriptor and vice versa. You will find more information in the online docs under http://www.cygwin.com/docs.html Hope, that helps, Corinna -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |