From: Paul G. <pga...@at...> - 2002-05-31 00:56:59
|
Kill them puppies...;-) On 31 May 2002 at 10:47, Danny Smith wrote: > The w32api and mingw-runtime each conatin a file called excpt.h > The one in the w32api just defines __try, __except, __finally as > no-ops and lets some code "at least" compile. I would like to get rid of that > file, so mingw has only one excpt.h and we don't have the perennial problem > of one overwriting the other, depending on order of installation. > > This patch puts the no-op defines in windef.h, so that they are still > available to cygwin users of w32api and to mingw. Alternative option > is to put them in the mingw-runtime version of excpt.h and thus remove > them from cygwin. > > I think they should go in the rubbish, but others may like to have code > that compiles and links fine and then crashes at runtime. > > No, I don't mean to stir up a long debate over this, I just want to get rid of > the file somehow. > > > 2002-05-31 Danny Smith <dan...@us...> > > * include/windef.h: Add no-op __try, __except, __finally > defines from ... > * include/excpt.h: Remove file. > * include/windows.h: Don't include excpt.h. > > Index: include/windef.h > =================================================================== > RCS file: /cvs/src/src/winsup/w32api/include/windef.h,v > retrieving revision 1.10 > diff -u -p -r1.10 windef.h > --- include/windef.h 6 May 2002 23:37:52 -0000 1.10 > +++ include/windef.h 30 May 2002 23:17:50 -0000 > @@ -184,6 +184,19 @@ extern "C" { > #endif > #endif > > +/* FIXME: This will make some code compile. The programs will most > + likely crash when an exception is raised, but at least they will > + compile. */ > +#if defined ( __GNUC__ ) /* && defined (__SEH_NOOP) */ > +#define __try > +#define __except(x) if (0) /* don't execute handler */ > +#define __finally > + > +#define _try __try > +#define _except __except > +#define _finally __finally > +#endif > + > typedef unsigned long DWORD; > typedef int WINBOOL,*PWINBOOL,*LPWINBOOL; > /* FIXME: Is there a good solution to this? */ > Index: include/windows.h > =================================================================== > RCS file: /cvs/src/src/winsup/w32api/include/windows.h,v > retrieving revision 1.10 > diff -u -p -r1.10 windows.h > --- include/windows.h 6 May 2002 23:37:52 -0000 1.10 > +++ include/windows.h 30 May 2002 23:17:50 -0000 > @@ -48,7 +48,6 @@ > #include <windef.h> > #include <wincon.h> > #include <basetyps.h> > -#include <excpt.h> > #include <winbase.h> > #ifndef _WINGDI_H > #include <wingdi.h> > > http://www.sold.com.au - The Sold.com.au Big Brand Sale > - New PCs, notebooks, digital cameras, phones and more ... Sale ends June 12 > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > _______________________________________________ > MinGW-dvlpr mailing list > Min...@li... > https://lists.sourceforge.net/lists/listinfo/mingw-dvlpr |