Many Wine headers are not including winerror.h when they should. This causes code that compiles on Windows to fail to compile in Wine (e.g. the sock.c winsock test). I cannot bring myself to systematically include winerror.h in these headers (I hate the 'include one header get them all' philosophy). So I include them only if __WINE__ is not defined, i.e. for Winelib, which is where source-level compatibility counts. Changelog: * include/mapicode.h, include/mapidefs.h, include/winbase.h Include winerror.h if in Winelib mode -- Francois Gouget fgouget@free.fr http://fgouget.free.fr/ "Only wimps use tape backup: _real_ men just upload their important stuff on ftp, and let the rest of the world mirror it ;)" -- Linus Torvalds Index: include/mapicode.h =================================================================== RCS file: /home/wine/wine/include/mapicode.h,v retrieving revision 1.2 diff -u -r1.2 mapicode.h --- include/mapicode.h 10 Mar 2002 00:02:34 -0000 1.2 +++ include/mapicode.h 20 May 2002 23:14:38 -0000 @@ -21,6 +21,10 @@ #ifndef MAPICODE_H #define MAPICODE_H +#ifndef __WINE__ +#include "winerror.h" +#endif + #define MAKE_MAPI_SCODE(sev,fac,code) \ ( (((ULONG)(sev)<<31) | ((ULONG)(fac)<<16) | ((ULONG)(code))) ) Index: include/mapidefs.h =================================================================== RCS file: /home/wine/wine/include/mapidefs.h,v retrieving revision 1.6 diff -u -r1.6 mapidefs.h --- include/mapidefs.h 10 Mar 2002 00:02:34 -0000 1.6 +++ include/mapidefs.h 20 May 2002 22:43:40 -0000 @@ -20,6 +20,13 @@ #define __WINE_MAPIDEFS_H #include "windef.h" +#ifndef __WINE__ +#include "windows.h" +#include "winerror.h" +#ifndef _OBJBASE_H_ +#include "objbase.h" +#endif +#endif /* Some types */ Index: include/winbase.h =================================================================== RCS file: /home/wine/wine/include/winbase.h,v retrieving revision 1.145 diff -u -r1.145 winbase.h --- include/winbase.h 19 May 2002 22:20:09 -0000 1.145 +++ include/winbase.h 20 May 2002 22:43:42 -0000 @@ -25,9 +25,8 @@ #include "basetsd.h" #include "windef.h" - -#ifndef RC_INVOKED -#include <stdarg.h> +#ifndef __WINE__ +#include "winerror.h" #endif #ifdef __cplusplus