From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5667 invoked by alias); 26 Mar 2005 19:06:18 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 5650 invoked from network); 26 Mar 2005 19:06:14 -0000 Received: from unknown (HELO mail.codesourcery.com) (65.74.133.9) by sourceware.org with SMTP; 26 Mar 2005 19:06:14 -0000 Received: (qmail 13251 invoked from network); 26 Mar 2005 19:06:13 -0000 Received: from localhost (HELO ?192.168.0.5?) (mitchell@127.0.0.1) by mail.codesourcery.com with SMTP; 26 Mar 2005 19:06:13 -0000 Message-ID: <4245B29B.203@codesourcery.com> Date: Sat, 26 Mar 2005 19:06:00 -0000 From: Mark Mitchell Organization: CodeSourcery, LLC User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) MIME-Version: 1.0 To: Christopher Faylor CC: gdb-patches@sources.redhat.com Subject: Re: PATCH: Windows sockets References: <200503260127.j2Q1R59a022152@sethra.codesourcery.com> <200503260845.j2Q8jlLC019248@elgar.sibelius.xs4all.nl> <42459E07.9020201@codesourcery.com> <20050326174821.GA12793@trixie.casa.cgf.cx> In-Reply-To: <20050326174821.GA12793@trixie.casa.cgf.cx> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2005-03/txt/msg00345.txt.bz2 Christopher Faylor wrote: > I guess you could only check for the existence of ws2_32 when the host > is mingw, but that seems sort of redundant given that there is a > preprocessor test which precisely tells what needs to be done. Right. > While > I'm normally a big fan of using conditionals like "HAVE_WINSOCK", it > doesn't seem like it makes the code any clearer to use these types of > conditionals in this case unless we really anticipate that there will > be another OS out there with some of the pecularities os Windows but > not all of them. > > One observation is that maybe you could do something like: > > #if defined (__WIN32__) && !defined (__CYGWIN__) > # define MINGW > #endif > > and use #ifdef MINGW where appropriate. If people would prefer that to WINAPI, that's fine by me. (I'm not quite sure what we would call an environment in which the compiler was Visual C, or some other non-GCC Windows compiler. Would that still be MinGW? If not, then MINGW might not be as good a name, which is why I went with WINAPI. But, I'm not concerned about how to spell the conditional; whatever seems best to people is fine with me!) -- Mark Mitchell CodeSourcery, LLC mark@codesourcery.com (916) 791-8304