Branch: refs/heads/smoke-me/khw-env Home: https://github.com/Perl/perl5 Commit: fd723ca513cb6c89b1fcd7efe8f6ecfe086e2ffb https://github.com/Perl/perl5/commit/fd723ca513cb6c89b1fcd7efe8f6ecfe086e2ffb Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024)
Changed paths: M lib/locale.t Log Message: ----------- lib/locale.t: Fixes #21697. On some platforms, a locale name is specified in the code page (or code set) that applies to it, rather than plain ASCII. Windows, and hence MingW, is the prime example. The locale name for a particular Turkish variety found in MingW is "Turkish_T?????.1254" where the question marks represent different characters that have meaning in the 1254 code page, but would look like mojibake if I had reproduced their actual values here. When doing a setlocale() here, if the current code page is incompatible with the new one, it will fail; if compatible it will succeed. On my box running MingW, locales are tried out by this test file in alphabetical order, and the one before this Turkish happens to be Thai, with a code page of 874. Apparently 1254 is not compatible with 874, so switching directly from Thai to Turkish fails. The solution is to switch into a neutral code page before switching into one being trialed. "C" works in this case, and I suspect in all others. Commit: ee8bc0945742378c7c9ed9d85c1225ba380936eb https://github.com/Perl/perl5/commit/ee8bc0945742378c7c9ed9d85c1225ba380936eb Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M charclass_invlists.h M lib/unicore/Makefile M lib/unicore/mktables M lib/unicore/uni_keywords.pl M regcharclass.h M uni_keywords.h Log Message: ----------- mktables more verbose Commit: 6180ec1c319eed702fcc07519d6195455d7b63c1 https://github.com/Perl/perl5/commit/6180ec1c319eed702fcc07519d6195455d7b63c1 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M cpan/Pod-Simple/lib/Pod/Simple/BlackBox.pm Log Message: ----------- BlackBox dont use rare scripts Commit: be7102d6962b239e5a65a7e6649a01da65d3b19c https://github.com/Perl/perl5/commit/be7102d6962b239e5a65a7e6649a01da65d3b19c Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M t/harness Log Message: ----------- XXX t/harness temp tweaks Commit: fc5b1617b0d506223c4843e0d8084a5dbb0e9aa8 https://github.com/Perl/perl5/commit/fc5b1617b0d506223c4843e0d8084a5dbb0e9aa8 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M t/harness Log Message: ----------- XXX skip croak.t under sanitizer Commit: 547e73d5ce5e98a71ef20399947d9608d5d8a304 https://github.com/Perl/perl5/commit/547e73d5ce5e98a71ef20399947d9608d5d8a304 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M t/porting/bincompat.t Log Message: ----------- skip bincompat.t Commit: 320fdd51ab58dc6430611bef9a5a681e69c8dd57 https://github.com/Perl/perl5/commit/320fdd51ab58dc6430611bef9a5a681e69c8dd57 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M t/TEST Log Message: ----------- Skip cpan testing message Commit: 274b504d4fbe6cd59f381b07c699cdbf25d601c7 https://github.com/Perl/perl5/commit/274b504d4fbe6cd59f381b07c699cdbf25d601c7 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M t/TEST Log Message: ----------- Also skip non-thread dist testing Commit: d517c455ab5d7f490129b4f740a232ad226125b9 https://github.com/Perl/perl5/commit/d517c455ab5d7f490129b4f740a232ad226125b9 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M cpan/Archive-Tar/t/02_methods.t Log Message: ----------- XXX skip Archive-Tar because of symlinks Commit: 8085448413a55f219516901c3b382aa21bd4d1e0 https://github.com/Perl/perl5/commit/8085448413a55f219516901c3b382aa21bd4d1e0 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M t/porting/cmp_version.t Log Message: ----------- XXX skip cmp_version.t because of sym links Commit: 22c62b9e0de331b52cc27c6832f120562a45ffb1 https://github.com/Perl/perl5/commit/22c62b9e0de331b52cc27c6832f120562a45ffb1 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M cpan/Sys-Syslog/t/syslog-inet-udp.t M cpan/Sys-Syslog/t/syslog.t Log Message: ----------- XXX skip syslog tests because fail without LC_TIME Commit: 58f71ba6f4dd99b7b22ed95a3fc176a81bacb6d2 https://github.com/Perl/perl5/commit/58f71ba6f4dd99b7b22ed95a3fc176a81bacb6d2 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M dist/Tie-File/t/29a_upcopy.t Log Message: ----------- up timeout for dist/Tie-File/t/29a_upcopy.t Commit: 30b4a0d57b1af98e5e894af15ecc573564c1477e https://github.com/Perl/perl5/commit/30b4a0d57b1af98e5e894af15ecc573564c1477e Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M MANIFEST A t/uni/idstart.pl A t/uni/idstart00.t A t/uni/idstart01.t A t/uni/idstart02.t A t/uni/idstart03.t A t/uni/idstart04.t A t/uni/idstart05.t A t/uni/idstart06.t A t/uni/idstart07.t A t/uni/idstart08.t A t/uni/idstart09.t A t/uni/idstart10.t A t/uni/idstart11.t A t/uni/idstart12.t A t/uni/idstart13.t A t/uni/idstart14.t A t/uni/idstart15.t A t/uni/idstart16.t A t/uni/idstart17.t A t/uni/idstart18.t A t/uni/idstart19.t A t/uni/idstart20.t A t/uni/idstart21.t A t/uni/idstart22.t A t/uni/idstart23.t M t/uni/variables.t Log Message: ----------- Split t/uni/variables.t into multiple tests These can be done in parallel; otherwise this is often the test that finishes last, holding up the test suite completion. Commit: 439c7a3cfb455da8a71cfe65c3d102300586c91e https://github.com/Perl/perl5/commit/439c7a3cfb455da8a71cfe65c3d102300586c91e Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M t/run/locale.t Log Message: ----------- run/locale.t: more debug Commit: 4c35681126b53cc9e332555c9290eb90326c266e https://github.com/Perl/perl5/commit/4c35681126b53cc9e332555c9290eb90326c266e Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M MANIFEST M charclass_invlists.h M lib/unicore/mktables M lib/unicore/uni_keywords.pl M regcharclass.h A t/re/uniprops11.t A t/re/uniprops12.t A t/re/uniprops13.t A t/re/uniprops14.t A t/re/uniprops15.t A t/re/uniprops16.t A t/re/uniprops17.t A t/re/uniprops18.t A t/re/uniprops19.t A t/re/uniprops20.t A t/re/uniprops21.t A t/re/uniprops22.t A t/re/uniprops23.t A t/re/uniprops24.t M uni_keywords.h Log Message: ----------- Make 24 uniprops.t tests Commit: 420f59b7e729b381dcd96b2fba55a9a428f195e0 https://github.com/Perl/perl5/commit/420f59b7e729b381dcd96b2fba55a9a428f195e0 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M perl.h Log Message: ----------- XXX temp to test broken lconv on non-Windows Commit: fc4a61d1a9b90c3a7abf967abde325c742c222da https://github.com/Perl/perl5/commit/fc4a61d1a9b90c3a7abf967abde325c742c222da Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M t/run/locale.t Log Message: ----------- XXX run/locale.t: maybe f move test Commit: db8b421eab3904d2f6a74985094e0875d6d2248f https://github.com/Perl/perl5/commit/db8b421eab3904d2f6a74985094e0875d6d2248f Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M cpan/version/t/07locale.t M t/porting/customized.dat Log Message: ----------- version::07locale.t: Use I18N::Langinfo, not POSIX::localeconv() The former is always present; the latter might not be. Commit: 8352555659e40c4a22ecdd07a9b27e436a3b1993 https://github.com/Perl/perl5/commit/8352555659e40c4a22ecdd07a9b27e436a3b1993 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M t/porting/cmp_version.t Log Message: ----------- XXX skip cmp_version.t prob. due to 5.38 tag issue Commit: 6624b528e0954b61900cee33080c8348083f5593 https://github.com/Perl/perl5/commit/6624b528e0954b61900cee33080c8348083f5593 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M cpan/version/t/07locale.t M t/porting/customized.dat Log Message: ----------- version 07locale.t should use LC_NUMERIC, not ALL These outliers don't belong. This file is working on LC_NUMERIC only. Commit: b744d0556c0d07d19d5f136840662e48e37f662b https://github.com/Perl/perl5/commit/b744d0556c0d07d19d5f136840662e48e37f662b Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M makedef.pl M perl.h Log Message: ----------- XXX temporary: Allow undef LC_ALL Commit: d0168cc64d01366aeb18fa1660a8f8837b620d76 https://github.com/Perl/perl5/commit/d0168cc64d01366aeb18fa1660a8f8837b620d76 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M perl.h Log Message: ----------- perl.h: Fake up win32 compile a bit Commit: 6021cbef2d4b0909d9cb9788c2df9b65740e3d6a https://github.com/Perl/perl5/commit/6021cbef2d4b0909d9cb9788c2df9b65740e3d6a Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M sv.c Log Message: ----------- newSVbool(): Fix compiler warning The parameter was declared const in embed.fnc, but not in the function prototype Commit: fce6c978d8660ffd163025536b82a481d615d057 https://github.com/Perl/perl5/commit/fce6c978d8660ffd163025536b82a481d615d057 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M embed.fnc M proto.h Log Message: ----------- regnode_after(): Fix compiler warning A parameter to this function was declared const in its prototype but not in embed.fnc. Commit: ba72820cfc9a9587de801bd1dc675f408651f0ab https://github.com/Perl/perl5/commit/ba72820cfc9a9587de801bd1dc675f408651f0ab Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M embed.fnc M proto.h M utf8.c Log Message: ----------- uvoffuni_to_utf8_flags_msgs(): Fix compiler warning A parameter to this function was declared const in embed.fnc, but isn't const. This commit also adds a const to another parameter that is constant. Commit: 0efd7dfca10fe7d74e35daea03f2abed01d8958c https://github.com/Perl/perl5/commit/0efd7dfca10fe7d74e35daea03f2abed01d8958c Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M embed.fnc M proto.h Log Message: ----------- S_clear_placeholders(): Fix compiler warning A parameter to this function was declared const in its prototype but not in embed.fnc, and had a different name Commit: f3919f6c48e23a3c4627d3ba97fd6dd559bf2541 https://github.com/Perl/perl5/commit/f3919f6c48e23a3c4627d3ba97fd6dd559bf2541 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M embed.fnc M proto.h M util.c Log Message: ----------- XXX memlog Commit: a0221314dcc69bc6be15046c3668e9c6e9a9fec8 https://github.com/Perl/perl5/commit/a0221314dcc69bc6be15046c3668e9c6e9a9fec8 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M perl.h M t/run/switchDx.t Log Message: ----------- debug thread Commit: 5fd1316fd546a9efe0040fd27d56f4c91d6eeb63 https://github.com/Perl/perl5/commit/5fd1316fd546a9efe0040fd27d56f4c91d6eeb63 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M dist/threads/threads.xs Log Message: ----------- threads.xs DEBUG_U Commit: 78ea988ba9d87f8bb98ab1aaef1a90172afd084f https://github.com/Perl/perl5/commit/78ea988ba9d87f8bb98ab1aaef1a90172afd084f Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M lib/locale.t Log Message: ----------- XXX temp: lib/locale.t: debug Commit: 4f7562c5e693578eca0f4b7d9cc7df2441402dbe https://github.com/Perl/perl5/commit/4f7562c5e693578eca0f4b7d9cc7df2441402dbe Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M lib/locale.t Log Message: ----------- lib/locale.t FILE debug Commit: 38f4ce6cd33fbd0f7779a0f091d449d95dc1e5ed https://github.com/Perl/perl5/commit/38f4ce6cd33fbd0f7779a0f091d449d95dc1e5ed Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M lib/locale.t Log Message: ----------- lib/locale.t Commit: eccd8580e9dc9413f67ba227651ffb2802e5fd5b https://github.com/Perl/perl5/commit/eccd8580e9dc9413f67ba227651ffb2802e5fd5b Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M perl.h Log Message: ----------- XXX perl.h: Debugging mutex lock' Commit: e89a92300c09811ba1c4d68ec51279a58c9674c3 https://github.com/Perl/perl5/commit/e89a92300c09811ba1c4d68ec51279a58c9674c3 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M cpan/version/t/07locale.t M t/porting/customized.dat Log Message: ----------- 07locale.t: Add some Windows locales to try On various windows machines, none of the locales listed in <DATA> exist. This commit copies ones from core's loc_tools.pl to give additional possibilities to try Commit: cd96d3fe0a81c423be41518665b55f6316b34374 https://github.com/Perl/perl5/commit/cd96d3fe0a81c423be41518665b55f6316b34374 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M cpan/version/t/07locale.t Log Message: ----------- cpan/version/07locale.t: drop, bug have to recompute md5 Commit: 25686c03feed557e6794bbda9d87416780b57bcc https://github.com/Perl/perl5/commit/25686c03feed557e6794bbda9d87416780b57bcc Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M t/porting/customized.dat Log Message: ----------- customized.dat Commit: 0f11330a66e67572b3bb91d9ff537de4b480b702 https://github.com/Perl/perl5/commit/0f11330a66e67572b3bb91d9ff537de4b480b702 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M locale.c Log Message: ----------- S_find_locale_from_environment: Handle disparate LC_ALL Prior to this commit, it was possible on some platforms to improperly set a locale category from a locale of "". Consider: export LC_ALL="LC_CTYPE=de_DE;LC_NUMERIC=C;LC_TIME=de_DE;..." and then run print POSIX::setlocale(LC_NUMERIC, ""); It wouldn't know how to extract just the LC_NUMERIC part of the LC_ALL string. There is no test added because I didn't find a shell that allows setting LC_ALL to such a disparate value. Commit: 384f2d3e53b0a7a237bcdc902260bdd54d789ac8 https://github.com/Perl/perl5/commit/384f2d3e53b0a7a237bcdc902260bdd54d789ac8 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M t/loc_tools.pl Log Message: ----------- loc_tools: XXX Debug Commit: 0b815312182a1093120d686737d613ed99a51c02 https://github.com/Perl/perl5/commit/0b815312182a1093120d686737d613ed99a51c02 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M locale.c Log Message: ----------- S_querylocale_2008_i: Add entry assertion Commit: 3e6d274febfa921f227c2d98692097c87c2571e8 https://github.com/Perl/perl5/commit/3e6d274febfa921f227c2d98692097c87c2571e8 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M locale.c Log Message: ----------- S_bool_setlocale_i: Add entry assertion Commit: c8120e18a350ee6445d8274a0301cd500cbf24ed https://github.com/Perl/perl5/commit/c8120e18a350ee6445d8274a0301cd500cbf24ed Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M locale.c Log Message: ----------- savepv if threaded, unused I think Commit: 628421013572a2487d8fe32b4ecf9f6aa29e8a68 https://github.com/Perl/perl5/commit/628421013572a2487d8fe32b4ecf9f6aa29e8a68 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M hints/darwin.sh Log Message: ----------- darwin hints querylocale race in earlier darwins? Commit: 236e8fd870b980739cda0fbd07dc06e0924e1ba4 https://github.com/Perl/perl5/commit/236e8fd870b980739cda0fbd07dc06e0924e1ba4 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M pp.c Log Message: ----------- pp_study: Add memory use debugging Commit: 0a321b2497be0421bb5590b21fb44db711df07bf https://github.com/Perl/perl5/commit/0a321b2497be0421bb5590b21fb44db711df07bf Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M pp.c Log Message: ----------- Revert "pp_study: Add memory use debugging" Commit: 70595b02b33d780d71824b63d08d8d9762c5a7c6 https://github.com/Perl/perl5/commit/70595b02b33d780d71824b63d08d8d9762c5a7c6 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M hints/darwin.sh Log Message: ----------- darwin Commit: 3495250fb4ac346b20b4d62cfd83fd82cf5aa1df https://github.com/Perl/perl5/commit/3495250fb4ac346b20b4d62cfd83fd82cf5aa1df Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M hints/freebsd.sh Log Message: ----------- Enable thread-safe locales on some freebsd versions This had been disabled in the hints file due to bugs, which perl now works around, so reenable (and reformat some lines for clarity) Commit: b8ab83c8012da3fcb97b8795d1a289645ec7f4ad https://github.com/Perl/perl5/commit/b8ab83c8012da3fcb97b8795d1a289645ec7f4ad Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M t/run/locale.t Log Message: ----------- t/run/locale.t: debug Commit: 28a1da5be798bcec98e9d43501e9f25755150708 https://github.com/Perl/perl5/commit/28a1da5be798bcec98e9d43501e9f25755150708 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M lib/locale_threads.t Log Message: ----------- locale_threads: add a commented out yield Commit: 4ec6703fddaf92c20537bf05cb087fc6a3fb8088 https://github.com/Perl/perl5/commit/4ec6703fddaf92c20537bf05cb087fc6a3fb8088 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M lib/locale_threads.t Log Message: ----------- locale_threads: debugging Commit: c14791da0a911464fafea3c38c30f451cf4b48d1 https://github.com/Perl/perl5/commit/c14791da0a911464fafea3c38c30f451cf4b48d1 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M embed.fnc M embed.h M locale.c M proto.h Log Message: ----------- add is_cur_locale_utf8 Commit: 05cc87c87deebf5d99ac45390d3623182b08aef3 https://github.com/Perl/perl5/commit/05cc87c87deebf5d99ac45390d3623182b08aef3 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M cpan/Time-Piece/Piece.xs Log Message: ----------- Time::Piece: Use reentrant API This single line magically makes this work much better under threading, though critical section locks need to be added as well. Commit: c7cab71d7daf692eadec7a1a5080c4907bf62825 https://github.com/Perl/perl5/commit/c7cab71d7daf692eadec7a1a5080c4907bf62825 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M cpan/Time-Piece/Piece.xs Log Message: ----------- Time-Piece: Use foldEQ_locale() if available This core function available since 5.13.2 is thread-safe and knows about Perl internals, so is preferable to the similar libc function, which is now used only as a fallback. This commit also bomb proofs the code by adding an additional fallback, specified in C89, which isn't a great substitute, but far better than nothing. Commit: 64de2c3cdd748eb9a99eb5fb4b422df24dbc00aa https://github.com/Perl/perl5/commit/64de2c3cdd748eb9a99eb5fb4b422df24dbc00aa Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M cpan/Time-Piece/Piece.xs Log Message: ----------- Time-Piece: Use isSPACE_LC, not isspace; etc isDIGIT_LC() does the same thing as isdigit when everything goes well, but is more robust when things get more complicated. The _LC forms are thread safe, for example. But note that this code doesn't work properly for a UTF-8 locale, as it assumes that a byte and character are the same thing. A major overhaul would be needed to handle that. Commit: cd9996eb41ce734072df620c326760d5713a80ed https://github.com/Perl/perl5/commit/cd9996eb41ce734072df620c326760d5713a80ed Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M thread.h Log Message: ----------- thread.h: White space only Indent some nested preproccessor defines Commit: fac3f6d2843cd971c19d154f6504e32ec80c288a https://github.com/Perl/perl5/commit/fac3f6d2843cd971c19d154f6504e32ec80c288a Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M cpan/Time-Piece/Piece.pm M cpan/Time-Piece/Piece.xs M cpan/Time-Piece/Seconds.pm M dist/Module-CoreList/lib/Module/CoreList.pm Log Message: ----------- Time::Piece: Add critical sections This calls various macros to make certain libc calls uninterruptible, so that they can be used safely in threaded applications, when this module is loaded with a perl that supports this. The macros are defined to do nothing if the perl doesn't contain working versions of them. In such perls, the macros are also defined to do nothing except on configurations that could have races. Typically, an extra problem is that the libc calls return in a global static buffer, subject to being overwritten by another thread. But an earlier commit defined PERL_REENTRANT, which makes those functions transparently return in a thread-local buffer instead. That doesn't help if the function gets interrupted by another thread; this commit completes the process. Commit: 2ac745f7f8280bfa2fdfbab8757863a347475ebd https://github.com/Perl/perl5/commit/2ac745f7f8280bfa2fdfbab8757863a347475ebd Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M cpan/Time-Piece/Piece.xs Log Message: ----------- XXX Time::Piece strftime Commit: de365202e4f43fe0c75920770037dffebe24db01 https://github.com/Perl/perl5/commit/de365202e4f43fe0c75920770037dffebe24db01 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M cpan/Time-Piece/Piece.xs Log Message: ----------- Time-Piece: notes to myself Commit: 41fc406f46254c9bfbae4efad4c98d45b1716cf1 https://github.com/Perl/perl5/commit/41fc406f46254c9bfbae4efad4c98d45b1716cf1 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M util.c M win32/perlhost.h Log Message: ----------- XXX Win32 mem log Commit: 918da6b2a40583cc58d758846cef7fba6bff6efd https://github.com/Perl/perl5/commit/918da6b2a40583cc58d758846cef7fba6bff6efd Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M util.c Log Message: ----------- XXX util add thread to mem_log Commit: f69337c8fb0871375b96479197cc32aa80969e0f https://github.com/Perl/perl5/commit/f69337c8fb0871375b96479197cc32aa80969e0f Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M locale.c Log Message: ----------- Debug wrap wset Commit: 84a2775903220f4f25a2afd0abc6d7c720fb6902 https://github.com/Perl/perl5/commit/84a2775903220f4f25a2afd0abc6d7c720fb6902 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M pod/perlhacktips.pod Log Message: ----------- XXX incomplete perlhacktips: Commit: a6e57728fafa28d437aa2e1ddb173e3e4f9c3d15 https://github.com/Perl/perl5/commit/a6e57728fafa28d437aa2e1ddb173e3e4f9c3d15 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M iperlsys.h Log Message: ----------- iperlsys.h: TODO need to look at adding mutexes Commit: b2bd9c69466795d958594cda6ffdf8a6751624c9 https://github.com/Perl/perl5/commit/b2bd9c69466795d958594cda6ffdf8a6751624c9 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M regen/reentr.pl Log Message: ----------- reentr.pl: XXX about needing mutex Commit: 148b11a9ae1a494d38503566d4e19fab0f3a3162 https://github.com/Perl/perl5/commit/148b11a9ae1a494d38503566d4e19fab0f3a3162 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M dist/ExtUtils-ParseXS/lib/perlxs.pod M t/porting/known_pod_issues.dat Log Message: ----------- perlxs Commit: b0cf294e1ca4276a2c92fae9282fa1647fb15a93 https://github.com/Perl/perl5/commit/b0cf294e1ca4276a2c92fae9282fa1647fb15a93 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M pod/perlmod.pod Log Message: ----------- perlmod Commit: 9f063636fca62101a54e7e5083d850a0830073a7 https://github.com/Perl/perl5/commit/9f063636fca62101a54e7e5083d850a0830073a7 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M pod/perllocale.pod Log Message: ----------- perllocale Xxx start of changes Commit: c1e9fbbb64907c58a32441f8b9481845ca161743 https://github.com/Perl/perl5/commit/c1e9fbbb64907c58a32441f8b9481845ca161743 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M win32/config_H.gc M win32/config_h.PL M win32/config_sh.PL Log Message: ----------- XXX config Commit: 7ae7b9b6ab0f8f6d3f2e3d1ca7cd7d7bfa31945c https://github.com/Perl/perl5/commit/7ae7b9b6ab0f8f6d3f2e3d1ca7cd7d7bfa31945c Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M t/run/locale.t Log Message: ----------- XXX t/run/locale.t Commit: 1c6d22bf27c23f8dbb16d5b5f46fe1aa508ee885 https://github.com/Perl/perl5/commit/1c6d22bf27c23f8dbb16d5b5f46fe1aa508ee885 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M pod/perlembed.pod Log Message: ----------- f perlembed Commit: fe4e90ddf211bca402ecffb569d2772ae8c9c5af https://github.com/Perl/perl5/commit/fe4e90ddf211bca402ecffb569d2772ae8c9c5af Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M intrpvar.h M locale.c M perl.h Log Message: ----------- Fixup FAKE_MINGW This is used (by me) to partially emulate MingW on a *nix platform. It was passing all its tests, but I discovered that I had the wrong #if which was hence not enabling crucial parts of the emulation. Commit: 64e38db875a7499b5204a352928b2ae5aafd33d1 https://github.com/Perl/perl5/commit/64e38db875a7499b5204a352928b2ae5aafd33d1 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M lib/locale_threads.t Log Message: ----------- locale_threads: start of using platform locales Commit: 20ad5a0e9ea743f98553fadb2d81175da5aed199 https://github.com/Perl/perl5/commit/20ad5a0e9ea743f98553fadb2d81175da5aed199 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M lib/locale_threads.t Log Message: ----------- Revert "locale_threads: start of using platform locales" This reverts commit a7a8dea3aabb81a05aacaf3a26c49854a5854111. Commit: 125201da5e6d236e3f9d2c853bcf86856ad424e9 https://github.com/Perl/perl5/commit/125201da5e6d236e3f9d2c853bcf86856ad424e9 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M locale.c M perl.c M sv.c Log Message: ----------- define numeric values to be C when no USE_NUMERIC Commit: 8efe2d5df50e71d62196ae1fa24106bcfa2b2f44 https://github.com/Perl/perl5/commit/8efe2d5df50e71d62196ae1fa24106bcfa2b2f44 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M locale.c M perl.c M sv.c Log Message: ----------- Revert "define numeric values to be C when no USE_NUMERIC" This reverts commit 9bb7ff6531bf9e28d635a71e6d55c752a995da2d. Commit: 3041d645881c99b41b071a2813dd111b9e075511 https://github.com/Perl/perl5/commit/3041d645881c99b41b071a2813dd111b9e075511 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M locale.c Log Message: ----------- locale.c: Add #define to separate label from declaration This is designed to be mostly self-documenting. Commit: 85f7b71b07ea7fc650a458327b3d0437c282881b https://github.com/Perl/perl5/commit/85f7b71b07ea7fc650a458327b3d0437c282881b Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M embed.fnc M embed.h M locale.c M proto.h Log Message: ----------- locale.c: Generalize save_to_buffer() This adds a parameter to the function to give the length of the input string to save; when -1, it acts as it did before this commit. This will allow a string that contains embedded NUL characters to be used with this function. And that is needed because it turns out that nl_langinfo() returns such a string, and Perl has never handled it properly. This is the first step in fixing that. Commit: 83bcd300cff33d9c2f1a05e5f1499f50a8deb93e https://github.com/Perl/perl5/commit/83bcd300cff33d9c2f1a05e5f1499f50a8deb93e Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M embed.fnc M embed.h M locale.c M proto.h Log Message: ----------- Revert "locale.c: Generalize save_to_buffer()" This reverts commit be8fa81d301b9db351876a3738b93b1450c590d0. Commit: b3832f52b9a5d6d65b4e5a42404091081600d7a7 https://github.com/Perl/perl5/commit/b3832f52b9a5d6d65b4e5a42404091081600d7a7 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M locale.c Log Message: ----------- rulereeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee Commit: 66d0109e5e3e27bff83fb3e9ecea0b9d633922a2 https://github.com/Perl/perl5/commit/66d0109e5e3e27bff83fb3e9ecea0b9d633922a2 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M embed.fnc M embed.h M locale.c M proto.h Log Message: ----------- locale.c: Silence compiler warning This tightens when this function is compiled to the actual Configurations it is needed in. Commit: 22b5eebbf0e46059f34beb2757c228b651f7a16a https://github.com/Perl/perl5/commit/22b5eebbf0e46059f34beb2757c228b651f7a16a Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M locale.c Log Message: ----------- C_thous better ifdef Commit: bd261f1efc5040eff6675071059f18a782caab96 https://github.com/Perl/perl5/commit/bd261f1efc5040eff6675071059f18a782caab96 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M ext/POSIX/t/posix.t M ext/POSIX/t/time.t M ext/XS-APItest/t/locale.t M lib/locale.t M lib/locale_threads.t Log Message: ----------- skip tests if no strftime Commit: d09898fc24c68c7c282f1631bc5fc93e7d8c449c https://github.com/Perl/perl5/commit/d09898fc24c68c7c282f1631bc5fc93e7d8c449c Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M t/loc_tools.pl Log Message: ----------- loctools use if dumper Commit: d858e47ef42343cd82bd4725f495c78f077d712d https://github.com/Perl/perl5/commit/d858e47ef42343cd82bd4725f495c78f077d712d Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M lib/locale.t Log Message: ----------- XXX lib/locale.t dont scan for LC_NUMERIC Commit: 7a447554e140b4c80ebf9067d403202a131e1a37 https://github.com/Perl/perl5/commit/7a447554e140b4c80ebf9067d403202a131e1a37 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M locale.c Log Message: ----------- locale.c: Combine some preprocessor directives This function is full of #if conditionals, due to the high variance in what the capabilities of platforms are. I tried various methods to lessen the cognitive load, like turning it into separate functions that each suit a particular Configuration, but it was just as complicated as before. The code is doing set up, then the actual operation, then teardown. The actual operation is invariant. What this commit does is for some of the setup conditionals to define its own teardown macro. The result is the teardown looks much cleaner, and there is no possibility that it will get out-of-sync with the setup. Commit: dad042f1d2454c2dd91349d8b3154419e0f9e759 https://github.com/Perl/perl5/commit/dad042f1d2454c2dd91349d8b3154419e0f9e759 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M hints/freebsd.sh M locale.c Log Message: ----------- Avoid unnecessary mutex lock on Windows It turns out that Windows since VS 2015 has a completely thread-safe localeconv() function, with its result stored in a per-thread buffer. MingW when built with the Universal C Run Time (UCRT) also has this property. These are the only implementations of localeconv() I know of like this. There is thus no need to have a critical section on these platforms. This commit abstracts this, so that other platforms can be added if found to be thread-safe. Commit: 4567d10f85484754c20761c29a9c28f97e05181b https://github.com/Perl/perl5/commit/4567d10f85484754c20761c29a9c28f97e05181b Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M locale.c Log Message: ----------- XXX msg: locale.c: Combine some more (WIn32) preprocessor directives Commit: 5c28a1b81922ebcb76e46c8166520af9880e3f4e https://github.com/Perl/perl5/commit/5c28a1b81922ebcb76e46c8166520af9880e3f4e Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M locale.c Log Message: ----------- locale.c: White space only Commit: a9c2c6154c0ffb91d2b2723ae1bbe416235eee08 https://github.com/Perl/perl5/commit/a9c2c6154c0ffb91d2b2723ae1bbe416235eee08 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M locale.c Log Message: ----------- locale.c: Do simple adjustment in a critical section This adjustment was deferred until after the critical section, but it is only an extra conditional and variable set, whose time should be dwarfed by the store to the hash, so I think it's all right to add it to the critical section. Commit: ef67604b7d4ef2d0db608e186f45a2df912e5f06 https://github.com/Perl/perl5/commit/ef67604b7d4ef2d0db608e186f45a2df912e5f06 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M locale.c Log Message: ----------- Do localeconv() adjustments immediately unthreaded localeconv() must be called and its struct processed in a critical section when other threads or embedded perls could also be using it. Something like StructCopy can't be used to save its values, as a deep copy is needed. Some of the processing can be expensive, so is deferred to a separate pass after the critical section. But if no critical section is needed, it's cheaper to do the processing as we go along doing the copy. A comment removed in this commit said that the reason this wasn't done was because of an extra maintenance cost (having to maintain the code in two places). But when I actually looked at what it would like like to do this, I found it is essentially just an extra function call, not enough "extra" to worry about. Commit: 31e70bb4afb251408735c120088c55999bd3c872 https://github.com/Perl/perl5/commit/31e70bb4afb251408735c120088c55999bd3c872 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M ext/POSIX/lib/POSIX.pod Log Message: ----------- start of pod for localeconv Commit: 309edbbc18d55b87a76dd6161c8673be3137cb27 https://github.com/Perl/perl5/commit/309edbbc18d55b87a76dd6161c8673be3137cb27 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M locale.c Log Message: ----------- locale.c: Add struct definition as a fallback If we ever encountered a platform that didn't have localeconv(), nor its structure definition, this could be used to get things to work. Commit: 295afbb7bf1d6ff727d9360f15595e5d49895e09 https://github.com/Perl/perl5/commit/295afbb7bf1d6ff727d9360f15595e5d49895e09 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M locale.c Log Message: ----------- debug populate localeconv Commit: 09f02bb3b9f72c4828fbafddc518d2b211f4fb38 https://github.com/Perl/perl5/commit/09f02bb3b9f72c4828fbafddc518d2b211f4fb38 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M dist/threads/threads.xs Log Message: ----------- debug thread xs Commit: e9355fc638cc4448c9465368ebfb780a55355d41 https://github.com/Perl/perl5/commit/e9355fc638cc4448c9465368ebfb780a55355d41 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M lib/locale_threads.t Log Message: ----------- lib/locale_threads.t: Change variable names Using 'set' as opposed to 'group' is clearer. Commit: e6308f2c259fe42a8b1e60a5354bd395968904ba https://github.com/Perl/perl5/commit/e6308f2c259fe42a8b1e60a5354bd395968904ba Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M lib/locale_threads.t Log Message: ----------- lib/locale_threads.t: Add debugging info Commit: 1c47837c0d94783ab726bf733fe8d823d61bc577 https://github.com/Perl/perl5/commit/1c47837c0d94783ab726bf733fe8d823d61bc577 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M locale.c Log Message: ----------- Don't mortalize my_localeconv() for internal use For external consumption, retain the mortalization; but for internal explicitly decrement the reference count when done. Commit: 0c50625c2f99b87fa865d752a9682915826ae699 https://github.com/Perl/perl5/commit/0c50625c2f99b87fa865d752a9682915826ae699 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M locale.c Log Message: ----------- locale.c: Use stable copy to compare instead of temporary We make a copy of this temporary. Use that going foward, and free the temporary earlier. Commit: 0b22119a9668c6b20d8088eb22e5742dc9f96861 https://github.com/Perl/perl5/commit/0b22119a9668c6b20d8088eb22e5742dc9f96861 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M embedvar.h M intrpvar.h M perl.c M sv.c Log Message: ----------- PL_strftime_buf Commit: 7d27e725289f3535602da07829b552c3fff19c00 https://github.com/Perl/perl5/commit/7d27e725289f3535602da07829b552c3fff19c00 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M embedvar.h M intrpvar.h M perl.c M sv.c Log Message: ----------- Revert "PL_strftime_buf" This reverts commit 640625a4d9cdf9c3d8b0ff45865be221632ab8cd. Commit: 3648d0c6d341159c64dff7ec0d288f8283f2bee5 https://github.com/Perl/perl5/commit/3648d0c6d341159c64dff7ec0d288f8283f2bee5 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M locale_table.h Log Message: ----------- C preprocessor doesn't understand 'false' means 0 So use 0 instead; 1 instead of 'true' Commit: 404da8b06d091d1eaf75ddca6393e58e55d58d70 https://github.com/Perl/perl5/commit/404da8b06d091d1eaf75ddca6393e58e55d58d70 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M perl.h Log Message: ----------- perl.h: Move #include to earlier The next commit will want this header's information to be available for perl_langinfo.h. Commit: 1c1a916cdf07adc505636393fa1743d57cb5984c https://github.com/Perl/perl5/commit/1c1a916cdf07adc505636393fa1743d57cb5984c Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M locale.c M perl_langinfo.h Log Message: ----------- locale.c: Compile/call S_emulate_langinfo in more Configurations This will not compile if -DNO_LOCALE is specified, as well as some other Configurations where various locale categories are missing or confined to be the C locale. Commit: c7c1b3182a18aa34f47e95142a41eb496c1a2267 https://github.com/Perl/perl5/commit/c7c1b3182a18aa34f47e95142a41eb496c1a2267 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M locale.c Log Message: ----------- locale.c: Avoid unused param warnings Under some configurations the three declarations here warned; the #ifdef was missing a term Commit: 3ac9d00c62e88e22650ab01fa3cee37f64518df4 https://github.com/Perl/perl5/commit/3ac9d00c62e88e22650ab01fa3cee37f64518df4 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M embed.fnc M embed.h M proto.h Log Message: ----------- locale.c: Don't compile unused function Since 0b52bb633d8c55bb15f05cdb19a4b7cb071ea271, this function isn't used unless localeconv() is available. Don't compile it unless that is true. Commit: 050fdc60f07e32cdb8a8a2ce806f9da7b20b4885 https://github.com/Perl/perl5/commit/050fdc60f07e32cdb8a8a2ce806f9da7b20b4885 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M embed.fnc M embed.h M locale.c M proto.h Log Message: ----------- locale.c: Don't compile unused function Since 60e050beb2e45ebd7ead7f1bf93f845b23c474b5, this function is no longer called if -DNO_LOCALE has been specified. Don't compile it when not called. Commit: 44db0f0f304539c6e311c0c2ea57d57ebc6e74cb https://github.com/Perl/perl5/commit/44db0f0f304539c6e311c0c2ea57d57ebc6e74cb Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M locale.c Log Message: ----------- locale.c: Fix bug when -DNO_LOCALE_TIME The logic for these preprocessor conditionals is wrong. We must change LC_CTYPE to match LC_TIME (if the platform requires it) even when LC_TIME is confined to be the C locale, as happens when -DNO_LOCALE_TIME is in effect in a Configuration. But doing so allows for simplification and hence the complete removal of these preprocessor conditionals, as the logic is already available in the DEALING macros that this commit replaces the previous code with Commit: 5002f702c8783ce2ff4402fa78c3fc97b87fb353 https://github.com/Perl/perl5/commit/5002f702c8783ce2ff4402fa78c3fc97b87fb353 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M embed.fnc M embed.h M locale.c M proto.h Log Message: ----------- locale.c: Change API for static strftime-related functions This changes these functions to be called with an additional SV parameter; their return becomes a bool success/fail. This presents a couple of advantages: libc strftime() now writes directly to the SV's PV, eliminating copying or using sv_usepvn(). For internal calls where the result is immediately consumed entirely in this file, we can use the already-existing scratch SV as the destination. This SV gets reused over and over, and likely will soon reach a large enough size so that it doesn't have to grow. Prior to this commit, a size was guessed each time and the space freed immediately after each use. Commit: 085b46840fe146a4d1f28ea4e2bdc3dfed2d58ea https://github.com/Perl/perl5/commit/085b46840fe146a4d1f28ea4e2bdc3dfed2d58ea Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M embed.fnc M locale.c M proto.h Log Message: ----------- locale.c: Change formal parameter name The previous commit makes the current name somewhat ambiguous; so change it and add comments clarifying its use. Commit: 325942fe33585abe0b9e9acc7034dca7f90946cb https://github.com/Perl/perl5/commit/325942fe33585abe0b9e9acc7034dca7f90946cb Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M embed.fnc M embed.h M proto.h M sv.c Log Message: ----------- Add newSVpvz() to create a sized SvPV. There's no current trivial method to create a non-zero length SV that will hold a PV. Commit: 8b281f0054d4b73f38264c332a5b5d5f8505650a https://github.com/Perl/perl5/commit/8b281f0054d4b73f38264c332a5b5d5f8505650a Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M locale.c Log Message: ----------- fstrftime z Commit: 8d1bbba379135b3f93f2c4293ca8fe903dd45100 https://github.com/Perl/perl5/commit/8d1bbba379135b3f93f2c4293ca8fe903dd45100 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M sv.c Log Message: ----------- more pvz Commit: cc13b00981b903851ee542258b6ebeaaa7a100c3 https://github.com/Perl/perl5/commit/cc13b00981b903851ee542258b6ebeaaa7a100c3 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M sv.c Log Message: ----------- more svpvz Commit: 8c62802c08c6ff32f0aaca5f97e698cf3176bc44 https://github.com/Perl/perl5/commit/8c62802c08c6ff32f0aaca5f97e698cf3176bc44 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M locale.c Log Message: ----------- f newpvz Commit: 6feb60477ea4a9f4c40a2be0c82aa6c450a86d81 https://github.com/Perl/perl5/commit/6feb60477ea4a9f4c40a2be0c82aa6c450a86d81 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M sv.c Log Message: ----------- pvz Commit: 17cc910fef3b82bb670e6739e8b4a416cbcd4b03 https://github.com/Perl/perl5/commit/17cc910fef3b82bb670e6739e8b4a416cbcd4b03 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M locale.c Log Message: ----------- locale.c: Each toggle locale must have matching restore The next commit will want this symmetry, which until now hasn't mattered. Commit: 648dedcfa9187dc91dc2d09827850b3c313ce74c https://github.com/Perl/perl5/commit/648dedcfa9187dc91dc2d09827850b3c313ce74c Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M locale.c Log Message: ----------- locale.c: Use a critical section when locale is toggled Sometimes the locale for a category has to be toggled to some other locale, when the desired value is for a locale that isn't the current one. This doesn't present any problem when locales are thread-safe. The locale gets toggled back before any other work is done. But when locales are not thread-safe and we have threads, another thread can execute in the now-wrong locale. Perl, for a few releases now, tries to mitigate the issues with running locales under threads when yhread-safe locales are not in use, for mitigations that are easy to do. These very well may make things work for applications that don't change locales very much; say only on startup. But now perl itself changes locales briefly behind an application's back. It turns out it is easy to add a lock that will keep threads that otherwise would work to continue to work. That's what this commit does, by adding TOGGLE_LOCK and TOGGLE_UNLOCK macros that are no-ops for all but the unsafe-threaded locale implementation. The unused parameter to the macros is for future use. Commit: 0dfb310135b845459a261ce7d0f156bb3fa9b8d9 https://github.com/Perl/perl5/commit/0dfb310135b845459a261ce7d0f156bb3fa9b8d9 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M locale.c Log Message: ----------- locale.c: Swap the order of two functions The new ordering will make the diffs less in the next commit, and will make just as much sense going forward as the previous ordering. Commit: fc8f9db8328bed1293a5c1053c5631c675def21c https://github.com/Perl/perl5/commit/fc8f9db8328bed1293a5c1053c5631c675def21c Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M embed.fnc M embed.h M locale.c M proto.h Log Message: ----------- locale.c: Pass locale to strftime functions Commit: 3517d13154bf001f054dfe1457fe5d3835d12cf1 https://github.com/Perl/perl5/commit/3517d13154bf001f054dfe1457fe5d3835d12cf1 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M locale.c Log Message: ----------- querylocale Maybe use C in the callers Commit: aa1f837eafcf3c7f90a3ce713400346ad6ec6681 https://github.com/Perl/perl5/commit/aa1f837eafcf3c7f90a3ce713400346ad6ec6681 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M locale.c Log Message: ----------- Revert "querylocale" This reverts commit b6ea27aa76a1c8785e84df9a1a42f1a71dcc81e2. Commit: 667dcd4794c6d967ca9af73304cd31ae25f18009 https://github.com/Perl/perl5/commit/667dcd4794c6d967ca9af73304cd31ae25f18009 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M locale.c Log Message: ----------- toggle2 Commit: 318ea24f296eafab556a8e0b0010c4ff76c7dd2e https://github.com/Perl/perl5/commit/318ea24f296eafab556a8e0b0010c4ff76c7dd2e Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M locale.c Log Message: ----------- locale.c: Fix ALT_DIGITS on Alpine Alpine, for the C and equivalent locales, doesn't return anything like what the Posix Standard says it should for nl_langinfo(ALT_DIGITS). It's supposed to be a string of up to 99 semi-colon-separated values. Instead, it is a string "0123456789". There are no separators and these are standard digits, not alternate. This commit causes any platform that returns any digit [1-9] when alternates are requested to instead return the empty string, which is used elsewhere, and now here, to indicate there are no alternate digits for this locale. The first alternate digit is allowed to be 0 in case the locale doesn't have a zero in it, such as Roman numerals. Commit: 3f5882f83402e59bd663a9c5698d1b6da2baed68 https://github.com/Perl/perl5/commit/3f5882f83402e59bd663a9c5698d1b6da2baed68 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M perl.h Log Message: ----------- Add DEBUG_SETLOCALE_INCONSISTENCIES Commit: dbbb27a6840debdeecc47e710e9b7b2cd3d457b1 https://github.com/Perl/perl5/commit/dbbb27a6840debdeecc47e710e9b7b2cd3d457b1 Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M perl.h Log Message: ----------- Enable DEBUG_SETLOCALE_INCONSISTENCIES Commit: e95f929c617d213b3771771835cc626cedbbd34b https://github.com/Perl/perl5/commit/e95f929c617d213b3771771835cc626cedbbd34b Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M locale.c Log Message: ----------- Make numeric standard inconsistent Commit: 3742f557366efb992bb705afe59317e79ee8a22f https://github.com/Perl/perl5/commit/3742f557366efb992bb705afe59317e79ee8a22f Author: Karl Williamson <k...@cpan.org> Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M embed.fnc M embed.h M embedvar.h M handy.h M inline.h M intrpvar.h M locale.c M makedef.pl M mg.c M perl.c M perl.h M pod/perlvar.pod M proto.h M sv.c Log Message: ----------- Add ability to emulate thread-safe locale operations Locale information was originally global for an entire process. Later, it was realized that different threads could want to be running in different locales. Windows added this ability, and POSIX 2008 followed suit (though using a completely different API). When available, perl automatically uses these capabilities. But many platforms have neither, or their implementation, such as on Darwin, is buggy. This commit adds the capability for Perl programs to operate as if the platform were thread-safe. This implementation is based on the observation that the underlying locale matters only to relatively few libc calls, and only during their execution. It can be anything at all at any other time. perl keeps what the proper locale should be for each category in a a per-thread array. Each locale-dependent operation must be wrapped in mutex lock/unlock operations. The lock additionally compares what libc knows the locale to be, and what it should be for this thread at this time, and changes the actual locale to the proper value if necessary. That's all that is needed. This commit adds macros to perl.h, for example "MBTOWC_LOCK_", that expand to do the mutex lock, and change the global locale to the expected value. On perls built without this emulation capability, they are no-ops. All code in the perl core (unless I've missed something), are changed to use these macros (there weren't actually many places that needed this). Thus, any pure perl program will automatically become locale-thread-safe under this Configuration. In order for XS code to also become locale-thread-safe, it must use these macros to wrap calls to locale-dependent functions. Relatively few modules call such functions. For example, the only one I found that ships with the perl core is Time::Piece, and it has more fundamental issues with running under threads than this. I am preparing pull requests for it. Thus, this is not completely transparent to code like native-thread-safe locale handling is. Therefore ${^SAFE_LOCALES} returns 2 (instead of 1) for this type of thread-safety. Another deficiency compared to the native thread safety is when a thread calls a non-perl library that accesses the locale. The typical example is Gtk (though this particular application can be configured to not be problematic). With the native safe threads, everything works as long as only one such thread is used per Perl program. That thread would then be the only one operating in the global locale, hence there are no conflicts. With this emulation, all threads are operating in the global locale, and mutexes would have to be used to prevent conflicts. To minimize those, the code added in this commit restores the global locale when through to the state it was in when started. A major concern is the performance impact. This is after all trading speed for accuracy. lib/locale_threads.t is noticeably slower when this is being used. But that is doing multiple threads constantly using locale-dependent operations. I don't notice any change with the rest of the test suite. In pure perl, this only comes into play while in the scope of 'use locale' or when using some of the few POSIX:: functions that are locale-dependent. And to some extent when formatting, but the regular overhead there should dwarf what this adds. This commit leaves this feature off by default. The next commit changes that for the next few 5.39 development releases, so we can see if there is actually an issue. Compare: https://github.com/Perl/perl5/compare/4c38ca0fcc69...3742f557366e