I think this patch should not be applied.
Including each header manually surely is not normal practice on Windows, but the nice thing is that it lets us detect bugs in our header dependencies. If we just include windows.h we will completely miss those and thus reduces the value of the test.
Francois Gouget wrote:
Including each header manually surely is not normal practice on Windows, but the nice thing is that it lets us detect bugs in our header dependencies. If we just include windows.h we will completely miss those and thus reduces the value of the test.
These tests don't compile in MSVC 6 without this fix.
Mike
On Thu, 26 Oct 2006, Mike McCormack wrote:
Francois Gouget wrote:
Including each header manually surely is not normal practice on Windows, but the nice thing is that it lets us detect bugs in our header dependencies. If we just include windows.h we will completely miss those and thus reduces the value of the test.
These tests don't compile in MSVC 6 without this fix.
Precisely. And this is very useful information!
The right fix is to: * fix the Wine headers so these tests fail to compile with Wine exactly the same way they fail to compile with the Windows headers. This is the only way to make sure this problem won't come back later. * then add the missing include directives or fix their order so the tests compile both with the Windows headers and the Wine ones.
I have started to look at why some of these tests were not compiling on Windows and this is how I stumbled on the COM_NO_WINDOWS_H issue which has side-tracked me a bit. I know of issues in, at least, advpub.h and objbase.h. I hope to get back to them soon, but there's certainly room for someone else to fix them in the meantime.
Also note that it's important to use the very latest SDK headers when compiling the Wine tests. A number of them won't compile with the stock VC6 headers.
On Do, 2006-10-26 at 17:05 +0200, Francois Gouget wrote:
Also note that it's important to use the very latest SDK headers when compiling the Wine tests. A number of them won't compile with the stock VC6 headers.
It seems, that you are familar with SDK / VC6.
Waht do you think about adding something like that?
#ifndef A_CONST_FROM_THE_NEWEST_HEADER #error To build this code, an updated SDK from MS is needed. #endif
Possible reaction from Joe User: "failed to compile -> there code is buggy" against "They told me, that an update is needed. Great Code."
On Thu, 26 Oct 2006, Detlef Riekenberg wrote: [...]
What do you think about adding something like that?
#ifndef A_CONST_FROM_THE_NEWEST_HEADER #error To build this code, an updated SDK from MS is needed. #endif
If we put it only in the tests that really need the latest headers, and we can test for exactly what we need, then we could do something like that. Another alternative would be to use the #ifndef to disable the relevant sections of code.
But I'm not sure it's worth it.