Some more MSVC fixes

Patrik Stridvall ps at
Wed Feb 6 13:08:24 CST 2002

> On Wed, 6 Feb 2002, Patrik Stridvall wrote:
> [...]
> > I also so got some other strange error with PCONTEXT
> > in winnt.h which in didn't understand.
>    You must define _X86_ before including 'winnt.h'. 
> Otherwise it won't
> known on which architecture it's being compile and it won't define

Yes, I realized that slighty after sending the mail.
_M_IX86 is defined by the complier but 
_X86_ is defined by windows.h iif _M_IX86 is defined.

>    And you must also include 'windef.h'. Otherwise CONST is 
> not getting
> defined and again, errors ensue.
> #define _X86_
> #include <windef.h>
> #include <winnt.h>
>    Defining _X86_ is done in 'windows.h' which means that it is
> virtually impossible to use these headers without including the big
> beast itself.

Yes. I have noticed that. However it is not that bad.

#include "windef.h"
#include "winnt.h"
#include "stdarg.h"
#include "winbase.h" 
Seems to do the trick.

Another thing. It seems that all files will need to include "config.h"
anyway because of issues like MSC doesn't support inline only __inline
so a #define inline __inline is needed for anything reasonable to work

Adding #include "config.h" at the top of each .c files is not that bad
and things like #define _X86_ from windows.h could be there as well.

More information about the wine-devel mailing list