From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Hilfinger To: ac131313@cygnus.com Cc: cgf@redhat.com, danny_r_smith_2001@yahoo.co.nz, gdb@sources.redhat.com, mingw-users@lists.sourceforge, dewar@gnat.com Subject: Re: [Mingw-users] Re: _WIN32? Date: Thu, 03 May 2001 23:58:00 -0000 Message-id: <20010504065841.9B122F28A1@nile.gnat.com> References: <200105010009.RAA12115@tully.CS.Berkeley.EDU> <20010503082444.40BDEF28A1@nile.gnat.com> <3AF1C25B.5040304@cygnus.com> X-SW-Source: 2001-05/msg00062.html > Date: Thu, 03 May 2001 16:40:59 -0400 > From: Andrew Cagney > 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