From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: Paul Hilfinger 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: Fri, 04 May 2001 09:04:00 -0000 Message-id: <3AF2D310.9060308@cygnus.com> References: <200105010009.RAA12115@tully.CS.Berkeley.EDU> <20010503082444.40BDEF28A1@nile.gnat.com> <3AF1C25B.5040304@cygnus.com> <20010504065841.9B122F28A1@nile.gnat.com> X-SW-Source: 2001-05/msg00068.html > 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