From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19098 invoked by alias); 26 Mar 2005 21:03:10 -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 19087 invoked from network); 26 Mar 2005 21:03:07 -0000 Received: from unknown (HELO cgf.cx) (66.30.17.189) by sourceware.org with SMTP; 26 Mar 2005 21:03:07 -0000 Received: by cgf.cx (Postfix, from userid 201) id 8A55B13C1F8; Sat, 26 Mar 2005 16:03:07 -0500 (EST) Date: Sat, 26 Mar 2005 21:03:00 -0000 From: Christopher Faylor To: Mark Mitchell , gdb-patches@sources.redhat.com Subject: Re: PATCH: Windows sockets Message-ID: <20050326210307.GA14720@trixie.casa.cgf.cx> Mail-Followup-To: Mark Mitchell , gdb-patches@sources.redhat.com References: <200503260127.j2Q1R59a022152@sethra.codesourcery.com> <200503260845.j2Q8jlLC019248@elgar.sibelius.xs4all.nl> <42459E07.9020201@codesourcery.com> <20050326174821.GA12793@trixie.casa.cgf.cx> <4245B29B.203@codesourcery.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4245B29B.203@codesourcery.com> User-Agent: Mutt/1.5.6i X-SW-Source: 2005-03/txt/msg00346.txt.bz2 On Sat, Mar 26, 2005 at 11:06:03AM -0800, Mark Mitchell wrote: >Christopher Faylor wrote: >>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!) Huh. I don't know. I didn't even consider that gdb would build with Visual C. Actually, for the last four or five years, Cygwin's gcc hasn't defined __WIN32__, so just using __WIN32__ would probably be sufficient. Otherwise, I guess you're right, WINAPI makes the most sense. cgf