This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: [Mingw-users] Re: _WIN32?
- To: Andrew Cagney <ac131313 at cygnus dot com>
- Subject: Re: [Mingw-users] Re: _WIN32?
- From: Danny Smith <danny_r_smith_2001 at yahoo dot co dot nz>
- Date: Fri, 4 May 2001 07:15:02 +1000 (EST)
- Cc: gdb at sources dot redhat dot com, mingw-users at lists dot sourceforge
--- Andrew Cagney <ac131313@cygnus.com> wrote: > > ACT, Inc. is also committed
to producing or assisting in a MINGW32
> > port of GDB5, and contributing the necessary patches. However, I
> > don't have a timetable for this yet.
> >
> > In any case, again this argues against removing the _WIN32 conditionals.
>
> I'm not so sure. It depends on why/how the tests are there. For instance:
>
>
> #if defined(_WIN32) || defined(__MSDOS__) || defined(__CYGWIN__):
>
> Remember, GDB is moving away from OS specific tests and towards
> autoconf/feature based tests. Things like this should be replaced by
> something like WITH_REALLY_TRICKY_FILESYSTEM_SUPPORT test (and
> eventually changed to a runtime switch?).
>
>
> main.c:
> /* The default command loop.
> The WIN32 Gui calls this main to set up gdb's state, and
> has its own command loop. */
> #if !defined _WIN32 || defined __GNUC__
> /* GUIs generally have their own command loop, mainloop, or
> whatever. This is a good place to gain control because many
> error conditions will end up here via longjmp(). */
> The _WIN32 test here is probably for wingdb (and old, long dead, MS
> Windows based GDB) and not for mingw. There are plenty of other
> examples of the same thing.
>
> 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.
>
> Andrew
>
>
In trying to get GDB to work under mingw, I have found the #if(n)def _WIN32
useful as tags to look for potential trouble spots, but let me ask you to
clarify something:
You are proposing that something like this in inflow.c
#ifndef _WIN32
kill (PIDGET (inferior_pid), SIGINT);
#endif
would be replaced with something like this:
#ifndef _N0_KILL_
kill (PIDGET (inferior_pid), SIGINT);
#endif
with configure defining _NO_KILL for me.
Is that correct? If so, then I have no objections to replacing the _WIN32
conditionals with something more specific.
Danny
_____________________________________________________________________________
http://store.yahoo.com.au - Yahoo! Store
- It's time you had your business online!