This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Windows sockets


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]