Alexandre Julliard wrote:
"Dimitrie O. Paun" dpaun@rogers.com writes:
With this patch, we can get rid of the stdarg.h
include from winbase.h if it weren't for the
FormatMessage() functions:
DWORD WINAPI FormatMessageA(DWORD,LPCVOID,DWORD,DWORD,LPSTR,DWORD,va_list*);
DWORD WINAPI FormatMessageW(DWORD,LPCVOID,DWORD,DWORD,LPWSTR,DWORD,va_list*);
Alexandre, how do we handle this one?
We have to include stdarg.h everywhere we include winbase.h, about 650
files at last count. That's why we need some kind of script...
if someone wants to work on this, here's a little comparison of wine's
headers (on left hand side) and windows (on the right hand side).
I only listed the headers I add on both sides.
it's rather easy to derive from it the list of the things we include in
our header when we shouldn't.
as the modification on .c files would be minimal (between doing only
winbase.h compared to do the rest...), it might be better to do it at
once (we might end up including stdarg, windef and winbase in most of
our compilation units)
Notes: I dropped windows.h in the comparison, and I didn't have any
directX SDK at hand to make the comparison with this part of the
"platform SDK". I also removed all the header inclusion related to packing
A+
--
Eric Pouech
./accctrl.h:#include "wtypes.h" ./accctrl.h:#include "wtypes.h"
./comcat.h:#include "rpc.h" ./comcat.h:#include "rpc.h"
./comcat.h:#include "rpcndr.h" ./comcat.h:#include "rpcndr.h"
./comcat.h:#include "windows.h" ./comcat.h:#include "windows.h"
./comcat.h:#include "ole2.h" ./comcat.h:#include "ole2.h"
./comcat.h:#include "unknwn.h" ./comcat.h:#include "unknwn.h"
./comcat.h:#include "wine/obj_enumguid.h" <
./comcat.h:#include "wine/obj_comcat.h" <
./commctrl.h:#include "windef.h" <
./commctrl.h:#include "winbase.h" <
./commctrl.h:#include "wingdi.h" <
./commctrl.h:#include "winuser.h" <
./commctrl.h:#include "winnls.h" <
./commctrl.h:#include "prsht.h" ./commctrl.h:#include "prsht.h"
./commdlg.h:#include "prsht.h" ./commdlg.h:#include "prsht.h"
./compobj.h:#include "objbase.h" ./compobj.h:#include "objbase.h"
./dbghelp.h:#include "windef.h" <
./dbghelp.h:#include "winbase.h" <
./dbghelp.h:#include "ver.h" <
<
./dde.h:#include "windef.h" ./dde.h:#include "windef.h"
./digitalv.h:#include "mmsystem.h" <
./digitalv.h:#include "windef.h" <
<
./docobj.h:#include "rpc.h" ./docobj.h:#include "rpc.h"
./docobj.h:#include "rpcndr.h" ./docobj.h:#include "rpcndr.h"
./docobj.h:#include "windows.h" ./docobj.h:#include "windows.h"
./docobj.h:#include "ole2.h" ./docobj.h:#include "ole2.h"
./docobj.h:#include "winbase.h" | ./docobj.h:#include "ocidl.h"
./docobj.h:#include "windef.h" |
./docobj.h:#include "wingdi.h" | ./fci.h:#include "basetsd.h"
./docobj.h:#include "winuser.h" |
./docobj.h:#include "ole2.h" | ./guiddef.h:#include "string.h"
./docobj.h:#include "oaidl.h" |
> ./imagehlp.h:#include "wintrust.h"
./imagehlp.h:#include "windef.h" <
./imagehlp.h:#include "winbase.h" <
./imagehlp.h:#include "ver.h" <
./initguid.h:#include "guiddef.h" ./initguid.h:#include "guiddef.h"
./iphlpapi.h:#include "iprtrmib.h" ./iphlpapi.h:#include "iprtrmib.h"
./iphlpapi.h:#include "ipexport.h" ./iphlpapi.h:#include "ipexport.h"
./iphlpapi.h:#include "iptypes.h" ./iphlpapi.h:#include "iptypes.h"
> ./iprtrmib.h:#include "mprapi.h"
./iprtrmib.h:#include "ipifcons.h" ./iprtrmib.h:#include "ipifcons.h"
./iptypes.h:#include "time.h" ./iptypes.h:#include "time.h"
./lmaccess.h:#include "lmcons.h" ./lmaccess.h:#include "lmcons.h"
./lm.h:#include "lmcons.h" ./lm.h:#include "lmcons.h"
./lm.h:#include "lmerr.h" ./lm.h:#include "lmerr.h"
./lm.h:#include "lmbrowsr.h" <
./lm.h:#include "lmaccess.h" ./lm.h:#include "lmaccess.h"
> ./lm.h:#include "lmalert.h"
> ./lm.h:#include "lmshare.h"
> ./lm.h:#include "lmmsg.h"
> ./lm.h:#include "lmremutl.h"
> ./lm.h:#include "lmrepl.h"
> ./lm.h:#include "lmserver.h"
> ./lm.h:#include "lmsvc.h"
> ./lm.h:#include "lmuse.h"
./lm.h:#include "lmwksta.h" ./lm.h:#include "lmwksta.h"
./lm.h:#include "lmapibuf.h" ./lm.h:#include "lmapibuf.h"
> ./lm.h:#include "lmerrlog.h"
> ./lm.h:#include "lmconfig.h"
> ./lm.h:#include "lmstats.h"
> ./lm.h:#include "lmaudit.h"
> ./lm.h:#include "lmjoin.h"
./lmwksta.h:#include "lmcons.h" ./lmwksta.h:#include "lmcons.h"
> ./lmwksta.h:#include "lmuseflg.h"
./mapicode.h:#include "winerror.h" ./mapicode.h:#include "winerror.h"
./mapidefs.h:#include "windef.h" <
./mapidefs.h:#include "windows.h" ./mapidefs.h:#include "windows.h"
./mapidefs.h:#include "winerror.h" ./mapidefs.h:#include "winerror.h"
./mapidefs.h:#include "objbase.h" ./mapidefs.h:#include "objbase.h"
| ./mapidefs.h:#include "compobj.h"
./msacm.h:#include "windef.h" | ./mapidefs.h:#include "stddef.h"
./msacm.h:#include "mmsystem.h" <
./msacm.h:#include "mmreg.h" <
<
./msdos.h:#include "wine/windef16.h" <
<
./ntsecapi.h:#include "winnt.h" <
./oaidl.h:#include "rpc.h" ./oaidl.h:#include "rpc.h"
./oaidl.h:#include "rpcndr.h" ./oaidl.h:#include "rpcndr.h"
> ./oaidl.h:#include "windows.h"
> ./oaidl.h:#include "ole2.h"
./oaidl.h:#include "objidl.h" ./oaidl.h:#include "objidl.h"
./objbase.h:#include "rpc.h" ./objbase.h:#include "rpc.h"
./objbase.h:#include "rpcndr.h" ./objbase.h:#include "rpcndr.h"
./objbase.h:#include "objidl.h" <
./objbase.h:#include "stdlib.h" ./objbase.h:#include "stdlib.h"
> ./objbase.h:#include "wtypes.h"
> ./objbase.h:#include "unknwn.h"
> ./objbase.h:#include "objidl.h"
> ./objbase.h:#include "guiddef.h"
./objbase.h:#include "cguid.h" ./objbase.h:#include "cguid.h"
| ./objbase.h:#include "urlmon.h"
./objidl.h:#include "rpc.h" | ./objbase.h:#include "propidl.h"
./objidl.h:#include "rpcndr.h" <
./objidl.h:#include "unknwn.h" <
./ocidl.h:#include "rpc.h" ./ocidl.h:#include "rpc.h"
./ocidl.h:#include "rpcndr.h" ./ocidl.h:#include "rpcndr.h"
./ocidl.h:#include "windows.h" ./ocidl.h:#include "windows.h"
./ocidl.h:#include "ole2.h" ./ocidl.h:#include "ole2.h"
./ocidl.h:#include "oleidl.h" ./ocidl.h:#include "oleidl.h"
./ocidl.h:#include "oaidl.h" ./ocidl.h:#include "oaidl.h"
./ocidl.h:#include "wine/obj_olefont.h" | ./ocidl.h:#include "servprov.h"
./ocidl.h:#include "wine/obj_picture.h" | ./ocidl.h:#include "urlmon.h"
./ocidl.h:#include "wine/obj_control.h" <
./ocidl.h:#include "wine/obj_connection.h" <
./ocidl.h:#include "wine/obj_property.h" <
./ocidl.h:#include "wine/obj_oleundo.h" <
./ole2.h:#include "windef.h" <
./ole2.h:#include "winerror.h" ./ole2.h:#include "winerror.h"
./ole2.h:#include "objbase.h" ./ole2.h:#include "objbase.h"
./ole2.h:#include "oleauto.h" ./ole2.h:#include "oleauto.h"
./ole2.h:#include "oleidl.h" ./ole2.h:#include "oleidl.h"
./oleauto.h:#include "winbase.h" <
./oleauto.h:#include "oaidl.h" ./oleauto.h:#include "oaidl.h"
./olectl.h:#include "windef.h" <
./olectl.h:#include "ocidl.h" ./olectl.h:#include "ocidl.h"
> ./oledlg.h:#include "windows.h"
> ./oledlg.h:#include "shellapi.h"
./oledlg.h:#include "commdlg.h" ./oledlg.h:#include "commdlg.h"
./oledlg.h:#include "prsht.h" <
./oledlg.h:#include "windef.h" <
./oledlg.h:#include "ole2.h" ./oledlg.h:#include "ole2.h"
> ./oledlg.h:#include "string.h"
> ./oledlg.h:#include "tchar.h"
> ./oledlg.h:#include "dlgs.h"
> ./oledlg.h:#include "prsht.h"
./oleidl.h:#include "rpc.h" ./oleidl.h:#include "rpc.h"
./oleidl.h:#include "rpcndr.h" ./oleidl.h:#include "rpcndr.h"
./oleidl.h:#include "windows.h" ./oleidl.h:#include "windows.h"
./oleidl.h:#include "ole2.h" ./oleidl.h:#include "ole2.h"
./oleidl.h:#include "objbase.h" | ./oleidl.h:#include "objidl.h"
./oleidl.h:#include "wine/obj_inplace.h" <
./oleidl.h:#include "wine/obj_cache.h" <
./oleidl.h:#include "wine/obj_oleobj.h" <
./oleidl.h:#include "wine/obj_oleview.h" <
./oleidl.h:#include "wine/obj_dragdrop.h" <
> ./propidl.h:#include "rpc.h"
./propidl.h:#include "rpcndr.h" ./propidl.h:#include "rpcndr.h"
./propidl.h:#include "windows.h" ./propidl.h:#include "windows.h"
./propidl.h:#include "ole2.h" ./propidl.h:#include "ole2.h"
./propidl.h:#include "objidl.h" ./propidl.h:#include "objidl.h"
./propidl.h:#include "oaidl.h" ./propidl.h:#include "oaidl.h"
./prsht.h:#include "windef.h" <
./prsht.h:#include "wingdi.h" <
./prsht.h:#include "winuser.h" <
./psapi.h:#include "windef.h" <
<
./ras.h:#include "windef.h" <
./ras.h:#include "lmcons.h" ./ras.h:#include "lmcons.h"
./rpcdce.h:#include "windef.h" <
./rpcdce.h:#include "rpc.h" <
./rpcdce.h:#include "guiddef.h" ./rpcdce.h:#include "guiddef.h"
./rpcdce.h:#include "rpcdcep.h" ./rpcdce.h:#include "rpcdcep.h"
./rpc.h:#include "windows.h" ./rpc.h:#include "windows.h"
> ./rpc.h:#include "basetsd.h"
> ./rpc.h:#include "setjmp.h"
> ./rpc.h:#include "rpcdce.h"
> ./rpc.h:#include "rpcnsi.h"
> ./rpc.h:#include "rpcerr.h"
> ./rpc.h:#include "rpcmac.h"
./rpc.h:#include "rpcdce.h" ./rpc.h:#include "rpcdce.h"
./rpc.h:/* #include "rpcnsi.h" */ | ./rpc.h:#include "rpcnsi.h"
./rpc.h:#include "rpcnterr.h" ./rpc.h:#include "rpcnterr.h"
./rpc.h:#include "excpt.h" ./rpc.h:#include "excpt.h"
./rpc.h:#include "winerror.h" ./rpc.h:#include "winerror.h"
> ./rpc.h:#include "rpcasync.h"
./rpcndr.h:#include "basetsd.h" ./rpcndr.h:#include "basetsd.h"
./rpcndr.h:#include "rpcdcep.h" | ./rpcndr.h:#include "rpcnsip.h"
./rpcproxy.h:#include "basetsd.h" ./rpcproxy.h:#include "basetsd.h"
./rpcproxy.h:#include "guiddef.h" ./rpcproxy.h:#include "guiddef.h"
./rpcproxy.h:#include "winnt.h" <
./rpcproxy.h:#include "rpc.h" ./rpcproxy.h:#include "rpc.h"
./rpcproxy.h:#include "rpcndr.h" ./rpcproxy.h:#include "rpcndr.h"
> ./rpcproxy.h:#include "string.h"
> ./rpcproxy.h:#include "memory.h"
./servprov.h:#include "rpc.h" ./servprov.h:#include "rpc.h"
./servprov.h:#include "rpcndr.h" ./servprov.h:#include "rpcndr.h"
./servprov.h:#include "windows.h" ./servprov.h:#include "windows.h"
./servprov.h:#include "ole2.h" ./servprov.h:#include "ole2.h"
./servprov.h:#include "objbase.h" | ./servprov.h:#include "objidl.h"
./setupapi.h:#include "commctrl.h" ./setupapi.h:#include "commctrl.h"
./shellapi.h:#include "windef.h" | ./shlguid.h:#include "isguids.h"
> ./shlguid.h:#include "exdisp.h"
> ./shlguid.h:#include "shldisp.h"
./shlguid.h:#include "objbase.h" <
<
./shlobj.h:#include "windef.h" <
./shlobj.h:#include "winbase.h" /* WIN32_FIND_* */ <
./shlobj.h:#include "ole2.h" ./shlobj.h:#include "ole2.h"
./shlobj.h:#include "oleauto.h" <
./shlobj.h:#include "commctrl.h" <
./shlobj.h:#include "prsht.h" ./shlobj.h:#include "prsht.h"
./shlobj.h:#include "wincon.h" | ./shlobj.h:#include "commctrl.h"
./shlobj.h:#include "shlguid.h" ./shlobj.h:#include "shlguid.h"
./shlobj.h:#include "wine/obj_enumidlist.h" | ./shlobj.h:#include "shtypes.h"
./shlobj.h:#include "wine/obj_shellfolder.h" | ./shlobj.h:#include "shobjidl.h"
./shlobj.h:#include "wine/obj_shellview.h" <
./shlobj.h:#include "wine/obj_shelllink.h" <
./shlobj.h:#include "wine/obj_shellbrowser.h" <
./shlobj.h:#include "wine/obj_contextmenu.h" <
./shlobj.h:#include "wine/obj_shellextinit.h" <
./shlobj.h:#include "wine/obj_extracticon.h" <
./shlobj.h:#include "wine/obj_commdlgbrowser.h" <
./shlobj.h:#include "wine/obj_dockingwindowframe.h" <
./shlobj.h:#include "wine/obj_dragdrophelper.h" <
./sipbase.h:#include "mssip.h" ./sipbase.h:#include "mssip.h"
./storage.h:#include "objbase.h" ./storage.h:#include "objbase.h"
./tapi.h:#include "windef.h" | ./tapi.h:#include "windows.h"
> ./tapi.h:#include "basetsd.h"
> ./tapi.h:#include "oaidl.h"
./unknwn.h:#include "rpc.h" ./unknwn.h:#include "rpc.h"
./unknwn.h:#include "rpcndr.h" ./unknwn.h:#include "rpcndr.h"
> ./unknwn.h:#include "windows.h"
> ./unknwn.h:#include "ole2.h"
./unknwn.h:#include "wtypes.h" ./unknwn.h:#include "wtypes.h"
./urlmon.h:#include "rpc.h" ./urlmon.h:#include "rpc.h"
./urlmon.h:#include "rpcndr.h" ./urlmon.h:#include "rpcndr.h"
./urlmon.h:#include "windows.h" ./urlmon.h:#include "windows.h"
./urlmon.h:#include "ole2.h" ./urlmon.h:#include "ole2.h"
./urlmon.h:#include "winbase.h" | ./urlmon.h:#include "objidl.h"
./urlmon.h:#include "objbase.h" | ./urlmon.h:#include "oleidl.h"
> ./urlmon.h:#include "servprov.h"
> ./urlmon.h:#include "msxml.h"
./vfw.h:#include "windef.h" <
./vfw.h:#include "mmsystem.h" ./vfw.h: #include "mmsystem.h"
./vfw.h:#include "wingdi.h" | ./vfw.h: #include "mmreg.h"
./vfw.h:#include "ole2.h" ./vfw.h:#include "ole2.h"
> ./vfw.h: #include "msacm.h"
./winbase.h:#include "stdarg.h" <
./winbase.h:#include "basetsd.h" <
./winbase.h:#include "windef.h" <
./winbase.h:#include "winerror.h" ./winbase.h:#include "winerror.h"
./windef.h:#include "winnt.h" ./windef.h:#include "winnt.h"
./winioctl.h:#include "winnt.h" <
<
./winnt.h:#include "basetsd.h" <
./winnt.h:#include "ctype.h" ./winnt.h:#include "ctype.h"
./winnt.h:#include "stddef.h" | ./winnt.h:#include "basetsd.h"
./winnt.h:#include "string.h" <
./winnt.h:#include "ntstatus.h" <
./winnt.h:#include "guiddef.h" ./winnt.h:#include "guiddef.h"
> ./winnt.h:#include "string.h"
> ./winnt.h:#include "string.h"
./winreg.h:#include "winbase.h" | ./winreg.h:#include "reason.h"
./winreg.h:#include "winnt.h" <
<
./winres.h:#include "winresrc.h" <
./winresrc.h:#include "winuser.h" | ./winresrc.h:#include "winuser.rh"
./winresrc.h:#include "commctrl.h" | ./winresrc.h:#include "commctrl.rh"
./winresrc.h:#include "dde.h" | ./winresrc.h:#include "dde.rh"
./winresrc.h:#include "winnt.h" | ./winresrc.h:#include "winnt.rh"
./winresrc.h:#include "dlgs.h" ./winresrc.h:#include "dlgs.h"
./winresrc.h:#include "winver.h" ./winresrc.h:#include "winver.h"
./winsock2.h:#include "winsock.h" | ./winsock2.h:#include "windows.h"
> ./winsock2.h:#include "qos.h"
./winsock2.h:#include "guiddef.h" ./winsock2.h:#include "guiddef.h"
> ./winsock2.h:#include "wsipv6ok.h"
./winsock.h:# include "sys/types.h" <
./winsock.h:# include "time.h" <
./winsock.h:# include "stdlib.h" <
./winsock.h:# include "sys/types.h" <
./winsock.h:# include "stdlib.h" <
./winsock.h:# include "windows.h" ./winsock.h:#include "windows.h"
./winsock.h:# include "windef.h" <
./winsock.h:#include "mswsock.h" <
./winuser.h:#include "stdarg.h" ./winuser.h:#include "stdarg.h"
> ./winuser.h:#include "tvout.h"
./ws2spi.h:#include "winsock2.h" ./ws2spi.h:#include "winsock2.h"
./wtypes.h:#include "rpc.h" ./wtypes.h:#include "rpc.h"
./wtypes.h:#include "rpcndr.h" ./wtypes.h:#include "rpcndr.h"
./wtypes.h:#include "basetsd.h" ./wtypes.h:#include "basetsd.h"
./wtypes.h:#include "guiddef.h" ./wtypes.h:#include "guiddef.h"
>