Hi, On Tue, 18 Aug 2009, Frank Li wrote: > > 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(); > >> #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