I recently noticed problems with building with clang in msvc mode when using my distro clang. It seems specific to its configuration, I think that it doesn't affect default clang.
One problem is that --rtlib=libgcc is specified in /etc/clang, which causes clang to produce:
```
clang-15: error: unsupported runtime library 'libgcc' for platform 'MSVC'
```
I think it's a clang bug here:
https://github.com/llvm/llvm-project/blob/main/clang/lib/Driver/ToolChains/…
It should probably check for -nodefaultlibs in addition to -nostdlib. It's easy to handle on Wine side by using -nostdlib.
The other problem is that clang for some reason doesn't define `_MSV_VER` by default. I found that it's defined only if I pass `-fuse-ld=lld` to the command line. That's weird because it shouldn't affect compilation step, it should matter only for linking and that's when we pass it. I didn't track it down in clang code itself, but if we can't depend on clang providing it by default, we need to make sure to pass `-fms-compatibility-version` ourselves. The exact version doesn't really matter, we mostly need to make sure that it's defined at all so that our #ifdefs work correctly.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1549
As Wine currently does not have a way to set captions, returning the default value should suffice for most applications.
It looks like Windows does not do error checking for the *value parameter.
For the computed properties, they return E_INVALIDARG when all the captions are set as Default. But they return S_OK if any of the caption settings have been modified, regardless of whether a valid *value parameter is passed.
I expected it to at least return the computed values for the default properties but this does not appear to be the case. I guess there's no reason to keep the checks for each member of the computed color struct? Perhaps keep the checks for E_INVALIDARG and S_OK? I haven't come across an application that uses the functions so I didn't implement them.
For the rest of the properties, the if (0) test was added just to show that it crashes with a NULL value. Also, if the wrong type is passed, the function does not crash on Windows and the value remains unchanged, but it returns S_OK.
--
v5: windows.media: Partially implement IClosedCaptionPropertiesStatics_get_RegionOpacity.
windows.media: Partially implement IClosedCaptionPropertiesStatics_get_RegionColor.
windows.media: Partially implement IClosedCaptionPropertiesStatics_get_BackgroundOpacity.
windows.media: Partially implement IClosedCaptionPropertiesStatics_get_BackgroundColor.
windows.media: Partially implement IClosedCaptionPropertiesStatics_get_FontEffect.
windows.media: Partially implement IClosedCaptionPropertiesStatics_get_FontStyle.
windows.media: Partially implement IClosedCaptionPropertiesStatics_get_FontSize.
windows.media: Partially implement IClosedCaptionPropertiesStatics_get_FontOpacity.
windows.media: Partially implement IClosedCaptionPropertiesStatics_get_FontColor.
windows.media/tests: Add Closed Caption Properties tests.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1537