This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [boehm-gc] Import 6.3 alpha 1


Thanks.

I had actually meant to remove the WINAPI in the declaration and defns, but I missed one place.
On second thought, I marginally prefer your patch, in case the define precedes a
declaration CreateThread.

I applied your patch to my tree.  Please check it into the gcc trunk once your testing completes.

Hans

> -----Original Message-----
> From: Danny Smith [mailto:danny_r_smith_2001@yahoo.co.nz]
> Sent: Tuesday, July 29, 2003 11:54 AM
> To: Boehm, Hans; 'Jeff Sturm'
> Cc: gcc-patches@gcc.gnu.org; java-patche@gcc.gnu.org; Boehm, Hans
> Subject: RE: [boehm-gc] Import 6.3 alpha 1
> 
> 
>  --- "Boehm, Hans" <hans_boehm@hp.com> wrote: > Thanks.
> > 
> > I just want to make sure I understand this correctly.  What 
> goes wrong if WINAPI is not used?
> > 
> 
> Currently in 3.4 the declaration of GC_CreateThread in the 
> header lacks WINAPI (stdcall).  The
> definition has it. GCC correctly refuses to compile
> 
> > Is the problem that the Windows headers are sometimes 
> included after the GC_headers, and this
> > generates an inconsistent declaration for GC_CreateThread, 
> due to the
> > 
> > #define CreateThread GC_CreateThread
> > 
> > in gc.h? 
> 
> Not really.   If code calls CreateThread, it expects callee
> to pop the stack.  If it gets GC_CreateThread beacuse of that define, 
> GC_CreateThread had better pop the stack too.
> 
> 
>  Otherwise I don't see why this needs to match the standard 
> Windows API calling
> > convention ...
> 
> The definition needs to match the decalaration.  In older 
> version it was declared
> and defined as WINAPI.
> 
> Danny  
> 
> > 
> > Hans
> > 
> > > -----Original Message-----
> > > From: Jeff Sturm [mailto:jsturm@one-point.com]
> > > Sent: Tuesday, July 29, 2003 7:55 AM
> > > To: Danny Smith
> > > Cc: gcc-patches@gcc.gnu.org; java-patche@gcc.gnu.org; 
> > > hans_boehm@hp.com
> > > Subject: Re: [boehm-gc] Import 6.3 alpha 1
> > > 
> > > 
> > > On Tue, 29 Jul 2003, [iso-8859-1] Danny Smith wrote:
> > > > 2003-07-29  Danny Smith  <dannysmith@users.sourceforge.net>
> > > >
> > > > 	* include/gc.h (GC_CreateThread): Declare with WINAPI
> > > > 	attribute.
> > > > 	* win32_threads.c (GC_CreateThread): Make 
> definitions consistent
> > > > 	with declaration.
> > > 
> > > Thanks.  I'd like to say this is an obvious fix since it was 
> > > broken by the
> > > merge.  Ideally it would also go into Hans' tree to 
> prevent another
> > > divergence.  If Hans accepts this, please check it in.
> > > 
> > > I assuming combining GC_API and WINAPI is harmless?
> > > 
> > > Jeff
> > >  
> 
> http://personals.yahoo.com.au - Yahoo! Personals
> -  New people, new possibilities! Try Yahoo! Personals, FREE 
> for a limited period!
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]