delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2001/02/06/15:32:06

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-developers-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com
X-Apparently-From: <earnie?boyd AT yahoo DOT com>
Message-ID: <3A805F11.A86C8A8E@yahoo.com>
Date: Tue, 06 Feb 2001 15:31:13 -0500
From: Earnie Boyd <earnie_boyd AT yahoo DOT com>
Reply-To: Earnie Boyd <cygwin-developers AT cygwin DOT com>
X-Mailer: Mozilla 4.76 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: cygwin-developers AT cygwin DOT com
Subject: Re: [Fwd: [MinGW-dvlpr] winsock2.h]
References: <3A7F737F DOT 31746D8E AT yahoo DOT com> <20010205233217 DOT A4786 AT redhat DOT com> <20010206211152 DOT E15821 AT cygbert DOT vinschen DOT de> <20010206151724 DOT E9005 AT redhat DOT com>

Christopher Faylor wrote:
> 
> On Tue, Feb 06, 2001 at 09:11:52PM +0100, Corinna Vinschen wrote:
> >On Mon, Feb 05, 2001 at 11:32:17PM -0500, Christopher Faylor wrote:
> >> On Mon, Feb 05, 2001 at 10:46:07PM -0500, Earnie Boyd wrote:
> >> >Danny Smith wrote:
> >> >
> >> >> This is what's in windows.h now.
> >> >>
> >> >> #ifndef WIN32_LEAN_AND_MEAN
> >> >> #include <commdlg.h>
> >> >> #include <cderr.h>
> >> >> #include <dde.h>
> >> >> #include <ddeml.h>
> >> >> #include <dlgs.h>
> >> >> #include <lzexpand.h>
> >> >> #include <mmsystem.h>
> >> >> #include <nb30.h>
> >> >> #include <rpc.h>
> >> >> #include <shellapi.h>
> >> >> #include <winperf.h>
> >> >> #include <winspool.h>
> >> >> #if defined(Win32_Winsock) ||
> >> >>  !(defined(__INSIDE_CYGWIN__) || defined(__CYGWIN__) || defined
> >> >> (__CYGWIN32__) || defined(_UWIN))
> >> >> #include <winsock.h>
> >> >> #endif
> >> >> #endif /* WIN32_LEAN_AND_MEAN */
> >> >
> >> >Is this __INSIDE_CYGWIN__ needed?  Danny's trying to clean up the winsock.h and
> >> >winsock2.h header files.
> >>
> >> Dunno.  Should be pretty simple to find out.  Try building Cygwin with it
> >> removed.
> >
> >AFAIK, it's needed. If you build an application using native windows
> >calls you need to include windows.h. But you _never_ should include
> >winsock.h when linking against cygwin1.dll since the socket calls
> >colide then. Except inside of Cygwin which obviously needs winsock.h.
> >
> >So the problem here is not building cygwin itself but to build a cygwin
> >application using both, native windows calls and cygwin socket calls.
> 
> I don't understand the logic, though.  When is __INSIDE_CYGWIN__ defined when
> __CYGWIN__ is not defined?
> 

The more I study this the more I think we can remove the whole !(...)
test anyway.  If you don't want the winsock.h header just undef
Win32_Winsock if you want it undef WIN32_LEAN_AND_MEAN and define
Win32_Winsock.

Earnie.

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019