|
|
On 4/24/23 11:34 imacarthur wrote:
On Friday, 21 April 2023 at 15:05:03 UTC+1
Albrecht Schlosser wrote:
I propose to define _WIN32_IE (as in your example) right
before '#include <shlobj.h>' to avoid other potential
side effects. Please test attached diff if it works for you.
Tested in various configs; seems to be working fine, at
least for me!
Thanks for testing!
There's one issue with this patch though: it could
happen that it would #undef _WIN32_IE if it's not defined.
Is this acceptable or would it perhaps issue compiler
warnings? I tested such a case with 'gcc -Wall -W
-Wpedantic -Wextra' and didn't get warnings, but I don't
know if the standard "allows" it and didn't test with MS
compilers. We could make sure that this doesn't happen with
another #if defined(_WIN32_IE) but if it's not necessary we
could just use my patch as-is.
I do not know for sure - I have never (as far as I can
recall, anyway!) ever seen a warning from #undef'ing a macro
that was not actually defined, but TBH I have no idea what the
standards say, or whether there may be some compiler that
would complain.
OK, I left it as-is. Let's see if someone complains.
Ian, if you test the patch and it works, would it be OK
if I committed it?
I'm happy with the patch, so go ahead with the commit.
If you are interested in a trivial "improvement" it might
be to adjust the comment:
// notably header versions 5.3.0 and earlier, whereas
5.4.2 seems to define _WIN32_IE as needed.
Because I see it fail with mingw32 header version 5.0.2
also. But that's a minor observation so feel free to ignore!
Thanks again, done in commit 6f77f40aadaaec8a including your
modification.
--
You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkcoredev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/b740f2c3-59c0-6299-f79d-19915b47c26b%40online.de.
[ Direct Link to Message ] | |
|
| |