[RFC] __WINESRC__ & public headers
Alexandre Julliard
julliard at winehq.com
Sun Jan 5 17:38:34 CST 2003
"Dimitrie O. Paun" <dpaun at rogers.com> writes:
> -- Why do we need this undef?
> include/objidl.h:#ifdef __WINESRC__
> include/objidl.h-#undef GetObject
> include/objidl.h-#endif
Because GetObject is a WINELIB_NAME_AW #define, and these cause a
(deliberate) syntax error when building Wine.
> -- Why are these Wine specific?
> include/winbase.h:#ifdef __WINESRC__
> include/winbase.h-#define GetCurrentProcess() ((HANDLE)0xffffffff)
> include/winbase.h-#define GetCurrentThread() ((HANDLE)0xfffffffe)
> include/winbase.h-#endif
That's simply an optimization; maybe we could use an inline function
instead.
> -- This one's a bugger. It make no sense to define these things conditionally on the
> -- version of the compiler. One's code is written one way or another.
> -- I suggest we remove these completely, and we defined the NONAMELESS* explicitly
> -- in the files that need them.
The idea is that you can then use the NONAMELESS defines to write more
portable code, without having to duplicate the compiler checks. So the
user's code can do something like:
#include <winnt.h>
#ifdef NONAMELESSUNION
#define U(x) u.x
#else
#define U(x) x
#endif
--
Alexandre Julliard
julliard at winehq.com
More information about the wine-devel
mailing list