This MR attempts to bring Wine's handling of `setlocale` and `_create_locale` more in line with the behavior of native >= `msvcr110`. It does this by replacing the usage of the LCID based `GetLocaleInfo` with the sname based `GetLocaleInfoEx`. `GetLocaleInfo` doesn't support neutral locales, even on native, which causes problems with neutral Chinese locales like `zh-Hans` and `zh-Hant`.
It also improves the accuracy of the internal `__lc_locale_name_func`, as tests indicate that it returns `LOCALE_SNAME`s instead of ISO 639 language names.
Potential future improvements:
* Modifying the generation of the `pclmap` and `pcumap` fields of `threadlocaleinfostruct` to work on WCHARs.
* I've done some changes to `__thread_data` which make it not fully match native, I'll submit a follow up which fixes this.
--
v4: make_unicode: rename Hong Kong SAR China to Hong Kong SAR to match native behavior.
msvcrt: Use GetLocaleInfoEx to compare locale info.
msvcrt: Remap synonyms to snames.
msvcrt: Skip exhaustive locale search with valid snames.
msvcrt: Convert locale_to_LCID to snames.
msvcrt: Use snames instead of LCIDs in create_locinfo.
msvcr120/tests: Check ___lc_locale_name_func with neutral Chinese locales.
msvcr110/tests: Add tests for new setlocale behaviors.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3050
--
v2: Release 8.0.2.
winedump: Fix out of bounds access (spotted by GCC13).
wordpad: Resize buttons of toolbar to make them align with height of the font list combox.
winemenubuilder: Skip desktop integration for certain associations.
wine.inf: Put the Clients key in the right place.
winemac: Initialize retina_on to avoid incorrect cached display data in high-res/retina mode.
winemac.drv: Force a window in front of its peers if its level is decreased.
threadpoolwinrt: Forward a Release() to a Release() method.
ntdll: Avoid integer overflow in block_get_subheap().
mfreadwrite: Fix an address of operator typo.
winemac: Don't constrain surface dimensions to the onscreen part of a window.
winemac: Set the Cocoa window contentMaxSize to the size limits from constrain_window_frame().
winemac: Refactor constrain_window_frame() to use separate origin and size arguments.
include: Fix IDirectXVideoDecoderService declaration in dxva2api.idl.
include: Fix c++ compiler error with msxml2.idl.
activeds: Free memory on error paths (coverity).
mshtml: Store minimum compat mode required for events in the ctor table.
mshtml: Fix URI leak in NewURI on failure.
mshtml: Fix nsIFile dir leak in init_xpcom.
mshtml: Fix factory leak in init_nsio.
winemac: Fix memory leak in UpdateDisplayDevices.
mshtml: Fix nsparser leak if script_elem_from_nsscript failed.
mshtml: Fix nsuri leak if create_channelbsc failed.
mshtml: Fix nsscript leak in bind_event_scripts.
mshtml: Fix nsevent leak in create_document_event.
evr: Fix incorrect integral computation.
msvcrt: Fix crash when rethrowing after a non-C++ exception on x86_64.
winedbg: Don't crash when no search path has been set.
ntdll: Open application manifest files with FILE_SHARE_DELETE.
kernel32/tests: Test for manifest file open share mode in CreateActCtxW.
wined3d: Add GPU information for AMD Raphael.
shlwapi: Implement StrFormatByteSizeEx.
ntdll: Fix typo in the check for hidden files.
ntdll: Set xattr in NtCreateFile if inferred and requested attributes don't match.
ntdll: Only infer hidden attribute from file name if xattr is not present.
ntdll: Handle hidden file names inside get_file_info instead of after it.
ntdll/tests: Add test for file attributes of files with names beginning with a dot.
ntdll: Make fd_set_file_info() static.
mfplat: Implement MFCreatePathFromURL().
dxdiag: Ignore option /64bit on the commandline.
findstr: Add basic functionality.
include/msvcrt: Add __WINE_(DEALLOC|MALLOC) attributes to _strdup and _wcsdup.
This merge request has too many patches to be relayed via email.
Please visit the URL below to see the contents of the merge request.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3168
In HttpSendRequestW and HttpSendRequestExW, if the header pointer is not
null but the length parameter is 0, the header length should be derived
from the string length instead.
In HttpSendRequestA and HttpSendRequestExA, on the same scenario, the
function should fail instead.
--
v2: wininet: Handle http headers correctly when length is 0
https://gitlab.winehq.org/wine/wine/-/merge_requests/3269
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55187
With this patch winedbg does from a user point of view
not silently exit, instead it can at least give this information
which might be at least better than nothing:
```
Process of pid=0020 has terminated
No process loaded, cannot execute 'echo Modules:'
Cannot get info on module while no process is loaded
No process loaded, cannot execute 'echo Threads:'
process tid prio name (all IDs are in hex)
... (list of still running processes)
System information:
Wine build: wine-8.11-146-gb0faa6fb042
Platform: i386
Version: Windows 10
Host system: Linux
Host version: 6.1.0-9-amd64
```
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3231
On Sat Jul 8 06:37:56 2023 +0000, Mohamad Al-Jaf wrote:
> That makes sense, it indeed duplicates the string on Windows based on
> the test I added. I'm not sure but there might be an issue with the way
> Wine handles HSTRING duplication as it's failing to create the right HSTRING.
> https://testbot.winehq.org/JobDetails.pl?Key=134593
> All I did was change it to `WindowsDuplicateString( name, &impl->rawname
> );` and add `WindowsDeleteString( impl->rawname );` under `IHostName::Release()`.
You should only call `WindowsDeleteString` if the refcount gets to 0 (and then you should also free the hostname, which I also missed).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3249#note_38391