This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: [Mingw-users] Re: _WIN32?
> Has anyone considered going even further, and eliminating explicit
> conditionals in .c files in favor of host/target-dependent #defines?
> It's not always possible, of course, but I can see something like
Multi-arch is largely already doing this on the target side.
On the host side, as Eli just pointed out, things sometimes are ok but
other times (e.g. terminal handling) can get tricky.
> For reference, there are ~38 uses of _WIN32 in the sources, ~18 don't
>> appear to be accompanied by #ifdef MSDOS, CYGWIN or GO32. It is those 18
>> that I think should be deleted.
>
>
> Is there any particular rush? There are apparently a couple of groups who
> intend to spruce up the WIN32 stuff and get it working in GDB5. Why don't
> we just agree that part of their sprucing up effort should be the removal of
> these unsightly _WIN32 conditionalizations?
Largely, no rush. There is, however, the bit of code main.c that is
getting up my nose. Per earlier e-mail, to the best of my knowledge it
is a hang over from WinGDB so should be deleted. Hmm,
1.130 (sac 15-Jan-95): /* The default command loop.
1.130 (sac 15-Jan-95): The WIN32 Gui calls this main to set up gdb's state, and
1.130 (sac 15-Jan-95): has its own command loop. */
1.130 (sac 15-Jan-95): #if !defined (WIN32)
so it has nothing to do with mingw. I'll delete it.
Andrew