On January 5, 2003 06:38 pm, Alexandre Julliard wrote:
"Dimitrie O. Paun" dpaun@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.
Which means this ifdef is OK, it will not cause problems with other headers.
-- 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.
Ditto, right?
-- 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
Right. But it seems to me the NONAMELESS* names are a bit overloaded: on one hand, they are used to signal how some structures are defined, on the other they describe the capabilities of the compiler.
For example, what if one decides to use names on _all_ gcc versions? This thing gets in the way, no?
What about all the other things I've mentioned? Should we do anything about them? And if yes, what?