Re: [PATCH 08/11] Place __stdcall to correct position.
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Aug 18, 2009, 09:36 UTC
- Message-ID
- <alpine.DEB.1.00.0908181134500.4680@intel-tinevez-2-302>
- In-Reply-To
- <1976ea660908171851n16b8b56j378ace9ecf0ce272@mail.gmail.com>
Hi,
On Tue, 18 Aug 2009, Frank Li wrote:
Show 8 quoted lines
> > How about "... to the correct ..." and "MSVC requires _stdcall to be > > between return value..." and "All Win32 API functions are declared with > > the WINAPI attribute."? > > WINAPI always like > > BOOL WINAPI function_name(xxx); > It compile fail if WINAPI BOOL function_name(xxx);
Oh, okay, so let's say
Furthermore, Microsoft Visual C++ requires the order
BOOL WINAPI function();
instead of
WINAPI BOOL function();
Show 14 quoted lines
> >> #if defined(__MINGW32__) || defined(_MSC_VER)
> >> -static __stdcall unsigned run_thread(void *data)
> >> +static unsigned __stdcall run_thread(void *data)
> >> {
> >> struct async *async = data;
> >> return async->proc(async->fd_for_proc, async->data);
> >> }
> >> -#endif
> >> +#endif /* __MINGW32__ || _MSC_VER */
> >
> > I do not think this is necessary. There are only 5 lines wrapped into
> > those #ifdef guards, the developer should be able to see that far.
> >
> Do you means remove /* __MINGW32__ || _MSC_VER */?I was talking about this change:
> -#endif > +#endif /* __MINGW32__ || _MSC_VER */
which is IMHO distracting rather than helpful.
Ciao, Dscho