This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: [Mingw-users] Re: _WIN32?
- To: ac131313 at cygnus dot com
- Subject: Re: [Mingw-users] Re: _WIN32?
- From: Paul Hilfinger <hilfingr at gnat dot com>
- Date: Fri, 4 May 2001 02:58:41 -0400 (EDT)
- Cc: cgf at redhat dot com, danny_r_smith_2001 at yahoo dot co dot nz,gdb at sources dot redhat dot com, mingw-users at lists dot sourceforge, dewar at gnat dot com
- References: <200105010009.RAA12115@tully.CS.Berkeley.EDU> <20010503082444.40BDEF28A1@nile.gnat.com> <3AF1C25B.5040304@cygnus.com>
> Date: Thu, 03 May 2001 16:40:59 -0400
> From: Andrew Cagney <ac131313@cygnus.com>
> 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?).
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
if ((b->type == bp_catch_load)
#if defined(SOLIB_HAVE_LOAD_EVENT)
&& (!SOLIB_HAVE_LOAD_EVENT (inferior_pid)
|| ((b->dll_pathname != NULL)
&& (strcmp (b->dll_pathname,
SOLIB_LOADED_LIBRARY_PATHNAME (inferior_pid))
!= 0)))
#endif
)
turning instead into
if (b->type == bp_catch_load)
&& SOLIB_MAY_HAVE_LOADED (inferior_pid, b->dll_pathname))
> 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?
Paul Hilfinger