https://bugs.winehq.org/show_bug.cgi?id=53845
Bug ID: 53845 Summary: Regression in GetCalendarInfoEx et al Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: kernel32 Assignee: wine-bugs@winehq.org Reporter: elpochodelagente@gmail.com Distribution: ---
Created attachment 73375 --> https://bugs.winehq.org/attachment.cgi?id=73375 test case, succeeds in Windows and wine 6.0
The following line succeeds in Windows and used to work in Wine 6, but not in Wine 7.19. Attached is a complete program test
GetCalendarInfoEx(0, CAL_GREGORIAN_US, 0, CAL_ITWODIGITYEARMAX | CAL_RETURN_NUMBER, 0, 0, dwData); // returns 0
Looking at dlls/kernelbase/locale.c current git master I can see that now there is an explicit check against CAL_GREGORIAN, and if I change the CAL_GREGORIAN_US parameter in the call to CAL_GREGORIAN then GetCalendarInfoEx succeeds.
https://bugs.winehq.org/show_bug.cgi?id=53845
--- Comment #1 from Nikolay Sivov bunglehead@gmail.com --- This is probably a regression from switching to locale.nls data, in https://source.winehq.org/git/wine.git/commit/a074d0c3a8bd06bfbab4c98e4f8b24....
https://bugs.winehq.org/show_bug.cgi?id=53845
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Version|unspecified |7.19 Status|UNCONFIRMED |NEW
--- Comment #2 from Nikolay Sivov bunglehead@gmail.com --- Confirming. I think you're right about id check you mentioned, it should test for _US calid instead.
https://bugs.winehq.org/show_bug.cgi?id=53845
--- Comment #3 from Javier elpochodelagente@gmail.com --- I'm not particularly an expert in this function, but I'm not even sure if the implementation should check for that value in this case, considering that it is being passed CAL_RETURN_NUMBER, which means it is not going to return a string anyway.
https://bugs.winehq.org/show_bug.cgi?id=53845
--- Comment #4 from Nikolay Sivov bunglehead@gmail.com --- (In reply to Javier from comment #3)
I'm not particularly an expert in this function, but I'm not even sure if the implementation should check for that value in this case, considering that it is being passed CAL_RETURN_NUMBER, which means it is not going to return a string anyway.
No, that's a modifier for return value. CALID is a calendar type to use, GREGORIAN_US appears to be a neutral one, if I'm reading make_unicode script correctly.
I'm not 100% sure though.
https://bugs.winehq.org/show_bug.cgi?id=53845
Alex Henrie alexhenrie24@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1| |a074d0c3a8bd06bfbab4c98e4f8 | |b244bfaef62ed Keywords| |regression CC| |alexhenrie24@gmail.com
--- Comment #5 from Alex Henrie alexhenrie24@gmail.com --- I can confirm, and `git bisect` says that Nikolay was right in comment #1:
a074d0c3a8bd06bfbab4c98e4f8b244bfaef62ed is the first bad commit commit a074d0c3a8bd06bfbab4c98e4f8b244bfaef62ed Author: Alexandre Julliard julliard@winehq.org Date: Tue Apr 5 16:59:09 2022 +0200
kernelbase: Reimplement GetCalendarInfoEx/W using the locale.nls data.
Signed-off-by: Alexandre Julliard julliard@winehq.org
dlls/kernel32/lcformat.c | 10 +- dlls/kernelbase/locale.c | 394 ++++++++++++++++++++++++++--------------------- include/winnls.h | 1 + 3 files changed, 226 insertions(+), 179 deletions(-)
https://bugs.winehq.org/show_bug.cgi?id=53845
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |7cd2821d67727b5dff985b482dd | |838137096c31c Resolution|--- |FIXED Status|NEW |RESOLVED
--- Comment #6 from Alexandre Julliard julliard@winehq.org --- Fixed by 7cd2821d67727b5dff985b482dd838137096c31c.
https://bugs.winehq.org/show_bug.cgi?id=53845
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #7 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 9.0-rc2.