Branch: refs/heads/smoke-me/khw-env Home: https://github.com/Perl/perl5 Commit: 8b9c80e9392f640d69c4f3c2b5eb2c47060140ed https://github.com/Perl/perl5/commit/8b9c80e9392f640d69c4f3c2b5eb2c47060140ed Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023)
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: fbead68eff1cd65483ef0f902d4c2a379882ee25 https://github.com/Perl/perl5/commit/fbead68eff1cd65483ef0f902d4c2a379882ee25 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M cpan/Pod-Simple/lib/Pod/Simple/BlackBox.pm Log Message: ----------- BlackBox dont use rare scripts Commit: 589b0d3ab5b650f27bcaa11cc178f154019cf214 https://github.com/Perl/perl5/commit/589b0d3ab5b650f27bcaa11cc178f154019cf214 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M t/harness Log Message: ----------- XXX t/harness temp tweaks Commit: ac6391f9b8ac006895715a940b2813f017f6fa2b https://github.com/Perl/perl5/commit/ac6391f9b8ac006895715a940b2813f017f6fa2b Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M t/harness Log Message: ----------- XXX skip croak.t under sanitizer Commit: 2fe8d0b907a91d348a2638ffd79f23a10a5abe64 https://github.com/Perl/perl5/commit/2fe8d0b907a91d348a2638ffd79f23a10a5abe64 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M t/porting/bincompat.t Log Message: ----------- skip bincompat.t Commit: 0f521a71bfa712f92430c5b5f8ba30a329082c74 https://github.com/Perl/perl5/commit/0f521a71bfa712f92430c5b5f8ba30a329082c74 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M t/TEST Log Message: ----------- XXX skip cpan testing Commit: 572550b90cd7c279b4ac906c186b38b0b1a0fe1a https://github.com/Perl/perl5/commit/572550b90cd7c279b4ac906c186b38b0b1a0fe1a Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M MANIFEST M charclass_invlists.h M dist/Tie-File/t/29a_upcopy.t 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: ----------- XXX temp: dist/Tie-File/t/29a_upcopy.t: Up alarm Commit: ae8b1347e5903a1c0a30b12c5c37d2ea307423a8 https://github.com/Perl/perl5/commit/ae8b1347e5903a1c0a30b12c5c37d2ea307423a8 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) 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: db420f7095315f5fd7adab4205a23ae0d3238cfd https://github.com/Perl/perl5/commit/db420f7095315f5fd7adab4205a23ae0d3238cfd Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M t/test.pl Log Message: ----------- XXX test.pl: dont unlink temps Commit: b24b65351f14f15b1ee1374ce0700d1fc00f0d67 https://github.com/Perl/perl5/commit/b24b65351f14f15b1ee1374ce0700d1fc00f0d67 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M t/test.pl Log Message: ----------- Revert "XXX test.pl: dont unlink temps" This reverts commit 1579ce0dbce549cb594214ba27d4e2fa389f891b. Commit: db7c2ab4639d42aa1079f55f61c6ad57ce214363 https://github.com/Perl/perl5/commit/db7c2ab4639d42aa1079f55f61c6ad57ce214363 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M t/run/locale.t Log Message: ----------- run/locale.t: more debug Commit: a83221027de7a6655808af22f37b52f5fe0ce3cc https://github.com/Perl/perl5/commit/a83221027de7a6655808af22f37b52f5fe0ce3cc Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M t/run/locale.t Log Message: ----------- XXX run/locale.t: maybe f move test Commit: 2ac808ec86b09e50808b66d7f071b304ffd7f263 https://github.com/Perl/perl5/commit/2ac808ec86b09e50808b66d7f071b304ffd7f263 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) 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: 330ecb3ab6b0bb253371579acd5f9edacd25acd2 https://github.com/Perl/perl5/commit/330ecb3ab6b0bb253371579acd5f9edacd25acd2 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M t/porting/cmp_version.t Log Message: ----------- XXX skip cmp_version.t prob. due to 5.38 tag issue Commit: 84689c3883d6362dae6225a7acc3af79b3189463 https://github.com/Perl/perl5/commit/84689c3883d6362dae6225a7acc3af79b3189463 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) 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: 30d5753c090a76b43a7c986d10c55d06bf37d289 https://github.com/Perl/perl5/commit/30d5753c090a76b43a7c986d10c55d06bf37d289 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M cpan/Archive-Tar/t/02_methods.t Log Message: ----------- XXX skip Archive-Tar because of symlinks Commit: 0ce7248a1198e6362f7bab797138b3236f60d7e9 https://github.com/Perl/perl5/commit/0ce7248a1198e6362f7bab797138b3236f60d7e9 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M t/porting/cmp_version.t Log Message: ----------- XXX skip cmp_version.t because of sym links Commit: bd545b1b51eff4d1b5174c2628dbba16b84b0436 https://github.com/Perl/perl5/commit/bd545b1b51eff4d1b5174c2628dbba16b84b0436 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M perl.h Log Message: ----------- XXX temp to test broken lconv on non-Windows Commit: 97579c05cb44234b1db7f3e1519c55fc72ab443d https://github.com/Perl/perl5/commit/97579c05cb44234b1db7f3e1519c55fc72ab443d Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) 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: d93fb2c909a36f7c67f63f76842c52164887184d https://github.com/Perl/perl5/commit/d93fb2c909a36f7c67f63f76842c52164887184d Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M makedef.pl M perl.h Log Message: ----------- XXX temporary: Allow undef LC_ALL Commit: 41f6e66308f03a3f4de4564f337e03f8f77e63a6 https://github.com/Perl/perl5/commit/41f6e66308f03a3f4de4564f337e03f8f77e63a6 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M perl.h Log Message: ----------- perl.h: Fake up win32 compile a bit Commit: f871e500bde8ceec0b3aea61e3c6b3bde68b98cf https://github.com/Perl/perl5/commit/f871e500bde8ceec0b3aea61e3c6b3bde68b98cf Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- ruler Commit: 2499f3659165ea92339919a36849dbaa5647c6bb https://github.com/Perl/perl5/commit/2499f3659165ea92339919a36849dbaa5647c6bb Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) 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: b9b7afe014995529b08595c736a38c38003906eb https://github.com/Perl/perl5/commit/b9b7afe014995529b08595c736a38c38003906eb Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) 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: da089590152a88e28a16b873c15c6002ff313cb7 https://github.com/Perl/perl5/commit/da089590152a88e28a16b873c15c6002ff313cb7 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) 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: fa79a40d8be721628191a4a365ce49112fbea8ce https://github.com/Perl/perl5/commit/fa79a40d8be721628191a4a365ce49112fbea8ce Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) 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: 1a0316d8aa4dda15f9fef05bc05dba668600a43a https://github.com/Perl/perl5/commit/1a0316d8aa4dda15f9fef05bc05dba668600a43a Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M embed.fnc M proto.h M util.c Log Message: ----------- XXX memlog Commit: 3f9305c12fff381d8d4b0dddf5004a1ff3c31fc3 https://github.com/Perl/perl5/commit/3f9305c12fff381d8d4b0dddf5004a1ff3c31fc3 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M perl.h M t/run/switchDx.t Log Message: ----------- debug thread Commit: 780266a8bae8203d126f2c902368259b60b139ad https://github.com/Perl/perl5/commit/780266a8bae8203d126f2c902368259b60b139ad Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M dist/threads/threads.xs Log Message: ----------- threads.xs DEBUG_U Commit: e93c61b491a471a9f2615c9cf12c49af47763f85 https://github.com/Perl/perl5/commit/e93c61b491a471a9f2615c9cf12c49af47763f85 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M lib/locale.t Log Message: ----------- XXX temp: lib/locale.t: debug Commit: b1d29010e1759529fdd559155367ec43f720518d https://github.com/Perl/perl5/commit/b1d29010e1759529fdd559155367ec43f720518d Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M lib/locale.t Log Message: ----------- lib/locale.t FILE debug Commit: 07345db846345b8843d7d0e6c990c65651f5533a https://github.com/Perl/perl5/commit/07345db846345b8843d7d0e6c990c65651f5533a Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M lib/locale.t Log Message: ----------- lib/locale.t Commit: 8429d5a5375fbabfb911921824c88883369166fd https://github.com/Perl/perl5/commit/8429d5a5375fbabfb911921824c88883369166fd Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M perl.h Log Message: ----------- XXX perl.h: Debugging mutex lock' Commit: bfb6b5bc8874ddbf668a2ef8cc8d84379cfed94c https://github.com/Perl/perl5/commit/bfb6b5bc8874ddbf668a2ef8cc8d84379cfed94c Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) 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: dc5e9381ad2a3bc018dcacb126003968e257a243 https://github.com/Perl/perl5/commit/dc5e9381ad2a3bc018dcacb126003968e257a243 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M cpan/version/t/07locale.t Log Message: ----------- drop, bug have to recompute md5 Commit: d5e4f4f6dcb3d5bb229e7f2d41d339e0b4de6527 https://github.com/Perl/perl5/commit/d5e4f4f6dcb3d5bb229e7f2d41d339e0b4de6527 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M t/porting/customized.dat Log Message: ----------- customized.dat Commit: 4c074729f158c808e3424f46508b7090e1b293ea https://github.com/Perl/perl5/commit/4c074729f158c808e3424f46508b7090e1b293ea Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) 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: be25fe770a04c242d14272ea4889bbeb1121822f https://github.com/Perl/perl5/commit/be25fe770a04c242d14272ea4889bbeb1121822f Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M t/loc_tools.pl Log Message: ----------- loc_tools: XXX Debug Commit: ec2c4abf6116afba596b359d5234db035b8511bd https://github.com/Perl/perl5/commit/ec2c4abf6116afba596b359d5234db035b8511bd Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- S_querylocale_2008_i: Add entry assertion Commit: 83dbc1f4dc5cc5f9af4f81c4d6847741adfce93f https://github.com/Perl/perl5/commit/83dbc1f4dc5cc5f9af4f81c4d6847741adfce93f Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- S_bool_setlocale_i: Add entry assertion Commit: 1de2be5ce441c008036e8d35894c871ad27cb30f https://github.com/Perl/perl5/commit/1de2be5ce441c008036e8d35894c871ad27cb30f Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- savepv if threaded, unused I think Commit: ba1e7a6a26d1f7e8c59077e897c67819334eba05 https://github.com/Perl/perl5/commit/ba1e7a6a26d1f7e8c59077e897c67819334eba05 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Add a debugging statement This can be helpful in tracing what's happening with nl_langinfo() calls. Commit: bb7d54482242c72715494b23861e4db796591833 https://github.com/Perl/perl5/commit/bb7d54482242c72715494b23861e4db796591833 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- XXX experimental: Define setlocale_i() on unsafe threaded builds On threaded Configurations where thread-safe locale handling is not available, perl automatically does a modicum of prevention of races by executing locale changes in a critical section, and copying the results to a thread-safe location. This commit defines setlocale_i() on such builds. This macro is used to bypass more complex handling required in fully thread-safe builds. I don't see how this changes thread-safeness on the unsafe builds, and it passes the tests, but I'm considering it experimental for now, until later in the development cycle. Commit: 720adfe101654c06dc78201834fd5a1b56fb5102 https://github.com/Perl/perl5/commit/720adfe101654c06dc78201834fd5a1b56fb5102 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M hints/darwin.sh Log Message: ----------- darwin hints querylocale race in earlier darwins? Commit: 71a92ab0ab29ba20a257fe03067cac2cadf6ae08 https://github.com/Perl/perl5/commit/71a92ab0ab29ba20a257fe03067cac2cadf6ae08 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M pp.c Log Message: ----------- pp.c Commit: 35cbf7d2d18bc80287be759082efad72c6260afb https://github.com/Perl/perl5/commit/35cbf7d2d18bc80287be759082efad72c6260afb Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M hints/darwin.sh Log Message: ----------- darwin Commit: b349d4b8c855fff9357052ffdfbe0c3ac6d5021e https://github.com/Perl/perl5/commit/b349d4b8c855fff9357052ffdfbe0c3ac6d5021e Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) 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: f07276d692bd0d9ca9d2d32d2a849fccde84f8b7 https://github.com/Perl/perl5/commit/f07276d692bd0d9ca9d2d32d2a849fccde84f8b7 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M t/run/locale.t Log Message: ----------- t/run/locale.t: debug Commit: d99f7075a6bc4c08d0e685d77e026a720c76b5e7 https://github.com/Perl/perl5/commit/d99f7075a6bc4c08d0e685d77e026a720c76b5e7 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M lib/locale_threads.t Log Message: ----------- locale_threads: add a commented out yield Commit: f5dc1b0f4c073e881297ab2a12521ed5b28715c4 https://github.com/Perl/perl5/commit/f5dc1b0f4c073e881297ab2a12521ed5b28715c4 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M lib/locale_threads.t Log Message: ----------- locale_threads: debugging Commit: 126bfca5b28733427a8f8b3519096d824ff1f2c9 https://github.com/Perl/perl5/commit/126bfca5b28733427a8f8b3519096d824ff1f2c9 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M t/porting/customized.dat Log Message: ----------- customized.dat for before Time Piece Commit: 9dfd1fdd504079596ef59f3f44941288e78d5c20 https://github.com/Perl/perl5/commit/9dfd1fdd504079596ef59f3f44941288e78d5c20 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M embed.fnc M embed.h M locale.c M proto.h Log Message: ----------- add is_cur_locale_utf8 Commit: 9108158784bef8194f7a0f865e74859e84fc32c6 https://github.com/Perl/perl5/commit/9108158784bef8194f7a0f865e74859e84fc32c6 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) 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: a66a49b5cf6e3adbe9dd1129fff0179c5574af37 https://github.com/Perl/perl5/commit/a66a49b5cf6e3adbe9dd1129fff0179c5574af37 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) 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: 3fe472e72dcf2086b4ee4024341a58777d1f4b43 https://github.com/Perl/perl5/commit/3fe472e72dcf2086b4ee4024341a58777d1f4b43 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) 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: 0c04887c1ca6945e8bd29c72250919af8a66077a https://github.com/Perl/perl5/commit/0c04887c1ca6945e8bd29c72250919af8a66077a Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M thread.h Log Message: ----------- thread.h: White space only Indent some nested preproccessor defines Commit: 6736685515f6786900b6232c247fdb07acc7ae7a https://github.com/Perl/perl5/commit/6736685515f6786900b6232c247fdb07acc7ae7a Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) 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: 0285b6db0dc65820cf10e706030819628d2c1f59 https://github.com/Perl/perl5/commit/0285b6db0dc65820cf10e706030819628d2c1f59 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M cpan/Time-Piece/Piece.xs Log Message: ----------- XXX Time::Piece strftime Commit: 39fefb113942311c167acdaeda0f6eaf052329ee https://github.com/Perl/perl5/commit/39fefb113942311c167acdaeda0f6eaf052329ee Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M cpan/Time-Piece/Piece.xs Log Message: ----------- Time-Piece: notes to myself Commit: 52b5a1b5e656968b50cb7759e33a6eaa6f28f723 https://github.com/Perl/perl5/commit/52b5a1b5e656968b50cb7759e33a6eaa6f28f723 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Slightly change wording of DEBUG messages This makes them more consistent with the other messages in this file. Commit: 528027ccd441f145a216c8f039c4456115935a50 https://github.com/Perl/perl5/commit/528027ccd441f145a216c8f039c4456115935a50 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M util.c M win32/perlhost.h Log Message: ----------- XXX Win32 mem log Commit: 6b20e3a85885f305a73a2244df5c4f64471e00b7 https://github.com/Perl/perl5/commit/6b20e3a85885f305a73a2244df5c4f64471e00b7 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M util.c Log Message: ----------- XXX util add thread to mem_log Commit: 6ec6b2d9562405ded84154d87b3c40cda0855b02 https://github.com/Perl/perl5/commit/6ec6b2d9562405ded84154d87b3c40cda0855b02 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- Debug wrap wset Commit: e3aebc688f8c34da5aa140248d58d088ac80962a https://github.com/Perl/perl5/commit/e3aebc688f8c34da5aa140248d58d088ac80962a Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Change some -DLv statements to -DL These debug statements show something isn't quite normal, so shouldn't require a verbose option to be displayed Commit: acd14763a4fe9746714a93e334fb1cf048ee5f7e https://github.com/Perl/perl5/commit/acd14763a4fe9746714a93e334fb1cf048ee5f7e Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M pod/perlhacktips.pod Log Message: ----------- XXX incomplete perlhacktips: Commit: 673b913796d4c6a4c674657e6818abf3e4cd101a https://github.com/Perl/perl5/commit/673b913796d4c6a4c674657e6818abf3e4cd101a Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M iperlsys.h Log Message: ----------- iperlsys.h: TODO need to look at adding mutexes Commit: d69ba0ea201f21194e427105fa0bf29042731063 https://github.com/Perl/perl5/commit/d69ba0ea201f21194e427105fa0bf29042731063 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M regen/reentr.pl Log Message: ----------- reentr.pl: XXX about needing mutex Commit: d3044c6e48609d0f3434e7704a7b75aadc629fad https://github.com/Perl/perl5/commit/d3044c6e48609d0f3434e7704a7b75aadc629fad Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M dist/ExtUtils-ParseXS/lib/perlxs.pod M t/porting/known_pod_issues.dat Log Message: ----------- perlxs Commit: a05fc06e9416a25a93594b635b5ce41dd836b3c2 https://github.com/Perl/perl5/commit/a05fc06e9416a25a93594b635b5ce41dd836b3c2 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M pod/perlmod.pod Log Message: ----------- perlmod Commit: 2237b25bb840f9096bc6da68550a99c0c41d6528 https://github.com/Perl/perl5/commit/2237b25bb840f9096bc6da68550a99c0c41d6528 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M pod/perllocale.pod Log Message: ----------- perllocale Xxx start of changes Commit: 8c86184e3065d91d8d1e1e2099f6fbf5b2548d71 https://github.com/Perl/perl5/commit/8c86184e3065d91d8d1e1e2099f6fbf5b2548d71 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M win32/config_H.gc M win32/config_h.PL M win32/config_sh.PL Log Message: ----------- XXX config Commit: 9e462cc766c8e8ce960df1f18dc8914d9c2d8de0 https://github.com/Perl/perl5/commit/9e462cc766c8e8ce960df1f18dc8914d9c2d8de0 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M t/run/locale.t Log Message: ----------- XXX t/run/locale.t Commit: 032d4d4727cc69f09dd95ba77b2d53c84d77d4b0 https://github.com/Perl/perl5/commit/032d4d4727cc69f09dd95ba77b2d53c84d77d4b0 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M pod/perlembed.pod Log Message: ----------- f perlembed Commit: 870c4accbd4f3fe9c0e44343259b117d36f5349b https://github.com/Perl/perl5/commit/870c4accbd4f3fe9c0e44343259b117d36f5349b Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Win32: We don't know the locale here And, so we don't know whether it is a UTF-8 locale or not. So use the proper enum value to indicate that. Commit: 2215ada0e1e4d2e7f98f2fa2e3193f11aec80dca https://github.com/Perl/perl5/commit/2215ada0e1e4d2e7f98f2fa2e3193f11aec80dca Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- XXX more work mingw Commit: 8b7f19fed61309cf976aafd57d56bcc7806f26bc https://github.com/Perl/perl5/commit/8b7f19fed61309cf976aafd57d56bcc7806f26bc Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M pp.c Log Message: ----------- pp Commit: 6af03130722fd483959b763fa35ea22f736380e5 https://github.com/Perl/perl5/commit/6af03130722fd483959b763fa35ea22f736380e5 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M pp.c Log Message: ----------- Revert "pp" This reverts commit 1133b83f4bd637f8641d66b48abd2bf7b5525ee3. Commit: 12c1813473ed35bc9ce6ec97f42097e55dcd9aa6 https://github.com/Perl/perl5/commit/12c1813473ed35bc9ce6ec97f42097e55dcd9aa6 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M pp.c Log Message: ----------- Revert "pp.c" This reverts commit 6b8211cf799406b7044deceefb3b3f1a31515bda. Commit: fcd582e5b3b05b6720b5f964db6bda088e9c5033 https://github.com/Perl/perl5/commit/fcd582e5b3b05b6720b5f964db6bda088e9c5033 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M lib/locale_threads.t Log Message: ----------- locale_threads: start of using platform locales Commit: d07d8cd7fb68a6627d4c06509675f5578be17989 https://github.com/Perl/perl5/commit/d07d8cd7fb68a6627d4c06509675f5578be17989 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M lib/locale_threads.t Log Message: ----------- Revert "locale_threads: start of using platform locales" This reverts commit a7a8dea3aabb81a05aacaf3a26c49854a5854111. Commit: 1b250e0a1adb639a2bfde2956476ad041a4a1831 https://github.com/Perl/perl5/commit/1b250e0a1adb639a2bfde2956476ad041a4a1831 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c M perl.c M sv.c Log Message: ----------- define numeric values to be C when no USE_NUMERIC Commit: 686aa2cbe760de5585fdd3c7bfd7570cf93988ea https://github.com/Perl/perl5/commit/686aa2cbe760de5585fdd3c7bfd7570cf93988ea Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) 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: b06a1476a9050091fe7a547b969ad7b62b2e4fff https://github.com/Perl/perl5/commit/b06a1476a9050091fe7a547b969ad7b62b2e4fff Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Use shorter macro form The _i suffix macros are for when we don't know the category at compile time, and we have to have calculated an index. In all these cases, the index has been calculated, but the value is known at compile time. The _c suffix macros are designed for this, and using them reduces visual clutter. Commit: 8a9efd3fce2b7b3d04608b8819b98ec5ece8df55 https://github.com/Perl/perl5/commit/8a9efd3fce2b7b3d04608b8819b98ec5ece8df55 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Silence some compiler warnings These only occur when pretending that this is a MingW compilation, which is a development-only tool to catch errors before they show up on a real MingW box. This would never get compiled for real. Commit: 784239d5307c7ea8991569354a51ee4fe2452c2d https://github.com/Perl/perl5/commit/784239d5307c7ea8991569354a51ee4fe2452c2d Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Add braces, indent code Prior to this commit, the 'switch' immediately followed the 'if' without a left brace for the 'if'. This conserved indentation and was feasible because the scopes were identical.. But a future commit will want to have the scope of the 'if' be larger than that of the 'switch', so add the braces for the 'if' and indent the 'switch' code. This commit also fixes white space on another line Commit: 98dfb11369c4a0103c84e80b983498d459b5a8aa https://github.com/Perl/perl5/commit/98dfb11369c4a0103c84e80b983498d459b5a8aa Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Simplify loop A slight restructuring saves some lines. Commit: 6453d006b7a831ce8ac68d7494b5d3c1a73a61c7 https://github.com/Perl/perl5/commit/6453d006b7a831ce8ac68d7494b5d3c1a73a61c7 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Change two #define names They will soon have a more general meaning than currently. Commit: b4f15b4fcd828f60b28c7835c3afca98e7112eaa https://github.com/Perl/perl5/commit/b4f15b4fcd828f60b28c7835c3afca98e7112eaa Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Change parameter specification S_populate_hash_from_localeconv() takes a mask of one or two bits that specify which of LC_NUMERIC and/or LC_MONETARY to operate on. Prior to this commit, the appropriate bit was based on our internal index for the relevant category(ies). But we already have #defines of 0 for NUMERIC, and 1 for MONETARY. These are adjacent and start at 0, desirable properties that the internal index doesn't necessarily have. This commit changes to base the parameter on these 0,1 values. This will allow simplification in the next commit, and going forward. Commit: 761c4ab18c278fd673a825b1086bfb331e07a766 https://github.com/Perl/perl5/commit/761c4ab18c278fd673a825b1086bfb331e07a766 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Simplify some localeconv() code The previous commits have allowed this code to determine by looking at the position of a bit in a mask what is going on, and so the code that used to be there to cope with not having that can be removed. Commit: d4a905ac788ebbc864355258fe54f6dbd18396e7 https://github.com/Perl/perl5/commit/d4a905ac788ebbc864355258fe54f6dbd18396e7 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M embed.fnc M locale.c M proto.h Log Message: ----------- locale.c: Don't need an explicit U32 Previous commits have caused only the lowest two bits in this variable to be used; don't need anything as explicit as a U32. Commit: e2bd699619e12ed7f232edb38f5dd224b0f43b01 https://github.com/Perl/perl5/commit/e2bd699619e12ed7f232edb38f5dd224b0f43b01 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Move code to earlier in function This is in preparation for the object created here to be needed earlier. This commit also cleans up a comment related to the moved code Commit: 8d2f7ba8af0d94b3a5013a21e4014696ad1588bd https://github.com/Perl/perl5/commit/8d2f7ba8af0d94b3a5013a21e4014696ad1588bd Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Reorder some statements in a switch() This unifies the common text in two case: statements, and makes all of them do their business in the same order. This makes it easier to compare and contrast the actions of the various case:s Commit: 752aa76f75a691d8ca4cb17f90b08c0ae67f6711 https://github.com/Perl/perl5/commit/752aa76f75a691d8ca4cb17f90b08c0ae67f6711 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Remove unused #define Commit: 43dc4ea51ac8382f8f60721f0d5ae5eaea250c50 https://github.com/Perl/perl5/commit/43dc4ea51ac8382f8f60721f0d5ae5eaea250c50 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Add some #defines And collapse an existing one into one of the new ones, so as to use a parallel naming convention These will be used in future commits Commit: cfcfeafc4b6c09c4adad2f57d5d835dd7c0d95af https://github.com/Perl/perl5/commit/cfcfeafc4b6c09c4adad2f57d5d835dd7c0d95af Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Special case some C locale values On Windows and MingW, some of this code can be frequently called, and often with the C locale in effect. Normally localeconv() is called to fill in these values, but that is expensive in part because of a bunch of setlocale() calls, some of which are extra, needed because of bugs in the Windows libc. We can short circuit that for the common C locale case, as the values are specified by the C standard, so are known at compile time. Commit: 9c646bdd517bd7d569c0dbde2906b4f4d5342699 https://github.com/Perl/perl5/commit/9c646bdd517bd7d569c0dbde2906b4f4d5342699 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M embed.fnc M locale.c M proto.h Log Message: ----------- locale.c: Use parallel array to simplify This allows the numeric fields returned by localeconv() to have the same logic as the string fields, simplifying the code a bit. They weren't previously handled the same because one category doesn't have any numeric fields. But this is now handled by creating an array and making its corresponding element NULL, so the strings and numeric fields are handled in the same way. Commit: e151e58c44bf36e09c27bbb37e107c5c6ffe8a24 https://github.com/Perl/perl5/commit/e151e58c44bf36e09c27bbb37e107c5c6ffe8a24 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M embed.fnc M embed.h M locale.c M proto.h Log Message: ----------- Special case localeconv when NUMERIC, MONETARY must be C When both these categories are C, we don't need to call localeconv(), which can be expensive because it may mean toggling locales. Instead the answers are well defined by the C Standard. This adds a function that returns those, and #ifdef's to locale.c to compile to use the special function instead of the more general one if both categories must be C. A future commit will extend the use of this new function to more cases. Commit: b639eab06ae625d5bec4be1f9c85a8252ce962a8 https://github.com/Perl/perl5/commit/b639eab06ae625d5bec4be1f9c85a8252ce962a8 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Move some code When called with just a single item, we only need a single call to the populating function, so move this code ahead of the 2nd call. This also clarifies the comments. Commit: 311dcf354ef332ed42433a157334b373d2b0bc7a https://github.com/Perl/perl5/commit/311dcf354ef332ed42433a157334b373d2b0bc7a Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- locale.c Special case localeconv for C locale An earlier commit created a function that speedily works when both LC_NUMERIC and LC_MONETARY are confined to the C locale, such as in OpenBSD. This commit extends that to use this function whenever a category happens to be in the C locale. This is a common case, that is thus sped up. Over the course of the development of locale.c, the meaning of not having the various categories changed from not being on the machine, or not paying attention to them, to instead mean, even if they are on the machine, they are always kept in the C locale. This code was not updated to reflect that; and this commit also does that updating. Commit: b851c96d467f0a50803d536292e9a6c61acba77f https://github.com/Perl/perl5/commit/b851c96d467f0a50803d536292e9a6c61acba77f Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Use out-of-bounds value for illegality This was using 0 as a parameter, which is a legal value and could have been confused by the called subroutine as being legitimate. It is not a bug because of the way the subroutine is currently written given the other parameters in this call. But it is more robust to use an out-of-bounds value, so that if the function were to change, we would sooner find out about any improper call. Commit: b2bb524860f9d11db856a4159f508567d4a7e276 https://github.com/Perl/perl5/commit/b2bb524860f9d11db856a4159f508567d4a7e276 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Skip locale utf8ness calculation if feasible I originally wrote this to save time processing the strings returned by localeconv(). If we know that the locale isn't UTF-8, then we don't have to calculate this for each string returned, Thus "Calculate once, not many times". But I hadn't realized that likely only one string is ever going to be non-ASCII: the currency symbol. (The decimal and thousands separators could also be, but of the >500 locales on my Linux box, only ps_AF has them so. That is the Pashtun language in Afghanistan; not a frequently occurring locale.) So it comes down to either case is effectively "calculate once". And it is generally more expensive to calculate the UTF8ness of a locale than a particular string in it, especially when those strings are going to be ASCII, as in this case. This commit changes to not calculate the locale's UTF8ness. Commit: 5971f086953c90819f8f25fe248405856abfa626 https://github.com/Perl/perl5/commit/5971f086953c90819f8f25fe248405856abfa626 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Avoid unnecessary work around localeconv() There are now two different functions that return the values for localeconv(). One is for when the locale is "C"; the other for everything else. The C one returns values that don't need adjusting, so skip that for this case. This commit removes the SvPOK check which was recently added by fe048cfaa3b42320785bd0c34896ac834634db22. It was needed for before we got values when -DNO_LOCALE_MONETARY is specified. Now that we do get those values, the SV always will contain a PV at this point. Commit: 2018bcaaf50988d47c5d75ebdaa52bb72a0c6247 https://github.com/Perl/perl5/commit/2018bcaaf50988d47c5d75ebdaa52bb72a0c6247 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Remove redundant lock This is a relic from a past implementation. The operation is locked by a different macro to lock it, so this is redundant. Commit: 231e9f6d466664c1b5a838bde4623dfb050c7a57 https://github.com/Perl/perl5/commit/231e9f6d466664c1b5a838bde4623dfb050c7a57 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- locale.c Use macro to avoid conditionals We know at compile time what these conditionals always evaluate to. Use a macro to replace the confitional with nothing when its always going to be true. (The section of code doesn't even get compiled when its going to always be false.) Commit: 8e2e4b637c511f15b3cb9584c776dc2c39cb29ec https://github.com/Perl/perl5/commit/8e2e4b637c511f15b3cb9584c776dc2c39cb29ec Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- localeconv: Need to toggle current locale to desired one localeconv() returns the values from the current locale. Prior to this commit we weren't always setting the current locale to the desired one which is passed into this function. It was a rare Configuration where the two didn't match, so this bug wasn't caught until now. Commit: eee3184e2c047cacde87f7f708d1e8b04f2e98b7 https://github.com/Perl/perl5/commit/eee3184e2c047cacde87f7f708d1e8b04f2e98b7 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) 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: f87d14cc1cf78247798e5db256f3b1a76bb32894 https://github.com/Perl/perl5/commit/f87d14cc1cf78247798e5db256f3b1a76bb32894 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) 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: 6ae36137fb6be6405f35cdab4c18218c411ec4e5 https://github.com/Perl/perl5/commit/6ae36137fb6be6405f35cdab4c18218c411ec4e5 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- XXX fleash outlocale.c: Revamp localeconv() Win32 handling This reorders the Windows setup to before the individual category setups. Commit: a6886a71081da07fea7655bcfd1eeac3c66ab63f https://github.com/Perl/perl5/commit/a6886a71081da07fea7655bcfd1eeac3c66ab63f Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- Remove unimplemented macros This section of code won't compile should it be tried. But this is a very rare Configuration that none of our smokers have encountered so far. These macros are defined in a later commit. Commit: 2c8e6bf4f28ffedc685c55a99671e629b797f2cd https://github.com/Perl/perl5/commit/2c8e6bf4f28ffedc685c55a99671e629b797f2cd Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- funusedarg Commit: 3d68a70f593326c23d373d0e06e4f0b62c5de413 https://github.com/Perl/perl5/commit/3d68a70f593326c23d373d0e06e4f0b62c5de413 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M embed.fnc M embed.h M locale.c M proto.h Log Message: ----------- Return C values if localeconv() not available localeconv() is a C89 function. But the existing code handled the case if it isn't available by returning an empty hash if POSIX::localeconv() is called. Prior commits have made it actually easier to instead return the hash populated with the values that the C locale has, which is more desirable than the current state. And that is what this commit does. There are reasons that localeconv() might not be available. It still is broken on MingW, and until recently on older Windows releases that we now no longer support. Workarounds were developed for those cases, but there may be other platforms where it ends up broken without a workaround, and this code handles them better and more simply than before this commit. Commit: 5deaede8aa344510903af00943fde7da58fdf39e https://github.com/Perl/perl5/commit/5deaede8aa344510903af00943fde7da58fdf39e Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- locale.c: White space only We can outdent preprocessor lines because the previous commit removed a surrounding #ifdef. Commit: 73c56114060b80d0f39a68a0001ee6651bea043b https://github.com/Perl/perl5/commit/73c56114060b80d0f39a68a0001ee6651bea043b Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) 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: ea8fc9d35d09944e4871dae99cf7b2247562c05a https://github.com/Perl/perl5/commit/ea8fc9d35d09944e4871dae99cf7b2247562c05a Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Do an 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: 31c5cd6e796fdc7153b73a48c0e415b2aebda9ff https://github.com/Perl/perl5/commit/31c5cd6e796fdc7153b73a48c0e415b2aebda9ff Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) 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: 54fe96b147fb57034fd501985e89c69360c6fc86 https://github.com/Perl/perl5/commit/54fe96b147fb57034fd501985e89c69360c6fc86 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- debug populate localeconv Commit: 95b8274389b7b5b6d755b023019fc831c7b4a5c0 https://github.com/Perl/perl5/commit/95b8274389b7b5b6d755b023019fc831c7b4a5c0 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- locale.c: S_is_locale_utf8(): "C" locale not UTF-8 This adds a quick check to rule out "C" and "POSIX" as being possible UTF-8 locales. This shortcuts the more expensive checking needed for non-trivial cases. Commit: 9445f497144591b0d97035c7a52f4309aab4b241 https://github.com/Perl/perl5/commit/9445f497144591b0d97035c7a52f4309aab4b241 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Tighten rules for detecting locale UTF-8ness This is calling mbtowc() or mbrtowc(). Prior to this commit, it only tested their returns to verify that they didn't return an error. This commit changes so that the return is tested to be the precise correct value. Commit: 942893a169c875cef85d1b71351092fef89e31a4 https://github.com/Perl/perl5/commit/942893a169c875cef85d1b71351092fef89e31a4 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Move declarations, add comments C99 allows us to make declarations more local. Commit: 8f4e66cc374bf5548712de4ad9ea056ffa9dafbe https://github.com/Perl/perl5/commit/8f4e66cc374bf5548712de4ad9ea056ffa9dafbe Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Move code into another function This moves the code that definitely can determine if a locale is UTF-8 into the function is_locale_utf8(). This has the benefit of avoiding some work on platforms lacking nl_langinfo(), such as Windows. Commit: 8504bb11051939b0130f482278147bad8243c8f9 https://github.com/Perl/perl5/commit/8504bb11051939b0130f482278147bad8243c8f9 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Fix up some comments I did some research as to possible alternate methods if the current one turns out not to work on some platforms, and the comments are hereby changed to reflect the results. Commit: fd7db8e6949ac4cc702a6aa7f0d1d243c522434a https://github.com/Perl/perl5/commit/fd7db8e6949ac4cc702a6aa7f0d1d243c522434a Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Add shortcut ruling out locale being UTF8 This quick check can shortcut the extra work for locales that aren't UTF-8. Commit: fc32dd810a3d64d41c9c73609e4e345337ab2637 https://github.com/Perl/perl5/commit/fc32dd810a3d64d41c9c73609e4e345337ab2637 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Comments and white space I did some research based on the suggestions in the comments hereby removed, only to find it is pretty much a dead-end. I added new comments to reflect this. Commit: 9b69b56d24382434680936a29cbb4ba09a620aba https://github.com/Perl/perl5/commit/9b69b56d24382434680936a29cbb4ba09a620aba Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Move code to within only block using it Commit: 9d63a61632cd99294cace245777399595de4f159 https://github.com/Perl/perl5/commit/9d63a61632cd99294cace245777399595de4f159 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- mismatched ctype Commit: ef17806d6cf75b0ad06ced8d8be0a84137665b85 https://github.com/Perl/perl5/commit/ef17806d6cf75b0ad06ced8d8be0a84137665b85 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- locale.c: XXX Move codeset to separate function Commit: b16345b8b11038896bd3fa8601bf87a6b2819eb1 https://github.com/Perl/perl5/commit/b16345b8b11038896bd3fa8601bf87a6b2819eb1 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- strtod Commit: cdcdf4c3b978ba9b960f11416be80b9207d6917e https://github.com/Perl/perl5/commit/cdcdf4c3b978ba9b960f11416be80b9207d6917e Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- strtod_l Commit: 383b5469fabef0297bf8750a009ac50379283286 https://github.com/Perl/perl5/commit/383b5469fabef0297bf8750a009ac50379283286 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Quit no if strftime() fails with EINVAL It turns out that some platforms set errno to EINVAL when the libc function strftime() finds the input format to be in error, though this is not specified in the Standard (a defect there in my opinion). Windows in particular does set errno. Quit when an EINVAL errno is detected. On platforms that don't set EINVAL, the current behavior is retained where the loop is executed again and again to rule out that the error isn't a buffer size problem. Commit: 4570db1c21bea2dee010dace76faf63335162c5a https://github.com/Perl/perl5/commit/4570db1c21bea2dee010dace76faf63335162c5a Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M dist/threads/threads.xs Log Message: ----------- debug thread xs Commit: ab6d0d6d7f952549010d713927f8826ff499866b https://github.com/Perl/perl5/commit/ab6d0d6d7f952549010d713927f8826ff499866b Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M intrpvar.h M locale.c M perl.h Log Message: ----------- add FAKE MING Commit: 222dd284bdb5096eac9a63d06211d63636481d9d https://github.com/Perl/perl5/commit/222dd284bdb5096eac9a63d06211d63636481d9d Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Rmv warning and unnecessary declaration The Windows versions we now support don't need to have this libc function declared, and warn that it is being declared. Commit: d080bc014fe386835b3a3851c5f48d878f6fe1fc https://github.com/Perl/perl5/commit/d080bc014fe386835b3a3851c5f48d878f6fe1fc Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- XXX msg locale.c: Refactor an #ifdef maybe #undef afterwards Commit: 4d472def7b0e4ed4c2971f0da4cebaed0e3f030d https://github.com/Perl/perl5/commit/4d472def7b0e4ed4c2971f0da4cebaed0e3f030d Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Change macro calls to shorter form The _c version of the macros here are shorter to read, and expand to the identical statements Commit: 91b32437a36a1b32b909361dc9cc5a03e358dc0b https://github.com/Perl/perl5/commit/91b32437a36a1b32b909361dc9cc5a03e358dc0b Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) 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: a6a452d246781f11b7d1b4d42384d9df5bb3106b https://github.com/Perl/perl5/commit/a6a452d246781f11b7d1b4d42384d9df5bb3106b Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M lib/locale_threads.t Log Message: ----------- lib/locale_threads.t: Add debugging info Commit: ad9e8883df45f2b744f20b8b10d38a5392e882e1 https://github.com/Perl/perl5/commit/ad9e8883df45f2b744f20b8b10d38a5392e882e1 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- S_my_langinfo_i: Be sure to return in both places This function returns a value, and also copies that value into a buffer. Certain rare Configurations failed to fill the buffer in some circumstances. Commit: fdbac4ce59fc812a910430a5ee6e570ec0255bb7 https://github.com/Perl/perl5/commit/fdbac4ce59fc812a910430a5ee6e570ec0255bb7 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Avoid unnecessary locale changes In our emulation of nl_langinfo(), prior to this commit, we always toggled the locales of two categories to the necessary ones. Except that there are a number of paths through the code that don't require this toggling. This commit narrows the scope of the toggling to just those cases that need it. Commit: afef6d90030218a15eeb1d4f64f493b2425ba234 https://github.com/Perl/perl5/commit/afef6d90030218a15eeb1d4f64f493b2425ba234 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Avoid a recalculation If we already have this information, no need to recalculate it. Add ability to emulate thread-safe locale operations Commit: 0ede3ed06394dbeef8130c28e3a8a4d8dbd72e31 https://github.com/Perl/perl5/commit/0ede3ed06394dbeef8130c28e3a8a4d8dbd72e31 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) 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. Commit: 6afbd15d677edd64addbbaf864ce7adc5b502992 https://github.com/Perl/perl5/commit/6afbd15d677edd64addbbaf864ce7adc5b502992 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M embedvar.h M intrpvar.h M locale.c M makedef.pl M perl.h M sv.c Log Message: ----------- more emul Commit: fb9dac94a03f47731bfeb901ce934b43719138d6 https://github.com/Perl/perl5/commit/fb9dac94a03f47731bfeb901ce934b43719138d6 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- Make numeric standard inconsistent Commit: 757783e22adc462e6137dfbac98dc9af9daebc16 https://github.com/Perl/perl5/commit/757783e22adc462e6137dfbac98dc9af9daebc16 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c M makedef.pl M perl.h Log Message: ----------- Experimentally enable per-thread locale emulation This is set to end in 5.39.10, but will give us field experience in the meantime. Commit: f516878e555665363f5b4f3902f2c03aecb3b07e https://github.com/Perl/perl5/commit/f516878e555665363f5b4f3902f2c03aecb3b07e Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M perl.h Log Message: ----------- XXX perl.h maybe drop Commit: c754f5da4361cab72880a6f50309ae39dbcc5dab https://github.com/Perl/perl5/commit/c754f5da4361cab72880a6f50309ae39dbcc5dab Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M makedef.pl Log Message: ----------- makedef.pl: PL_cur_locale_obj is only POSIX 2008 multiplicity Commit: 1bb8ce1bf8a547a2f134e0346a484003614a2f11 https://github.com/Perl/perl5/commit/1bb8ce1bf8a547a2f134e0346a484003614a2f11 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M makedef.pl Log Message: ----------- makedef.pl: Move comment Commit: 8a6c5ca2d6a1b62dc88f6d7d363929b65f869e9d https://github.com/Perl/perl5/commit/8a6c5ca2d6a1b62dc88f6d7d363929b65f869e9d Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M perl.h Log Message: ----------- Add DEBUG_SETLOCALE_INCONSISTENCIES Commit: 18d4bf8ff7e1142814f37a037d1fdde7237cc7c0 https://github.com/Perl/perl5/commit/18d4bf8ff7e1142814f37a037d1fdde7237cc7c0 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M perl.h Log Message: ----------- Enable DEBUG_SETLOCALE_INCONSISTENCIES Commit: 1d7d99292b0204ec0900a53789a64281035d5783 https://github.com/Perl/perl5/commit/1d7d99292b0204ec0900a53789a64281035d5783 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- final commit Commit: 154b9dcaa887056cd3d569c89b3e9b78ef8a8586 https://github.com/Perl/perl5/commit/154b9dcaa887056cd3d569c89b3e9b78ef8a8586 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- langinfo_l Commit: f5237b377a225bdce90f7fdf9d85e258cb6a87d7 https://github.com/Perl/perl5/commit/f5237b377a225bdce90f7fdf9d85e258cb6a87d7 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M lib/locale_threads.t Log Message: ----------- locale_threads.t: Better handle weird locales The previous code was generating bunches of uninitialized variable warnings, due to 1) not checking for definedness early; 2) the loop termination needs to be reevaluated each time because there is a potential splice, shortening the array. This only happens, I believe, on MingW not using UCRT. Commit: a5fb4a8900083bdc6fce1b4c318b9ebed01d78d1 https://github.com/Perl/perl5/commit/a5fb4a8900083bdc6fce1b4c318b9ebed01d78d1 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M makedef.pl M perl.h Log Message: ----------- Don't do thread-safe locales emulation on mingw MingW when compiled with the Universal C runtime (UCRT) is thread-safe with respect to locales, just as VS 2015 and later MSVCRT compilations are. However, versions not using UCRT cannot be compiled to emulate thread-safe locale. I'm pretty sure this is due to a bug in the libc strftime() function, having spent a bunch of hours working on this. It often fails lib/locale_threads.t when using the emulation, but not always. The failure is always in strftime(). What made me think it could be perl is another characteristic of the failures. lib/locale_threads.t works by, in each thread, setting each available locale category to a locale, different from any other category in that thread, and as different as possible from the locale for the corresponding category in any other thread. For example thread 0 might have LC_CTYPE set to locale X, LC_NUMERIC to Y, LC_TIME to Z, etc. Thread 1 would use a locale for LC_CTYPE, as different from X as possible, meaning executing the same operation on thread 0 and thread 1 would yield different expected results. (It goes to some lengths to calculate the biggest distance in the results.) Similarly LC_NUMERIC would have something almost completely different from Y; and so on. Then each thread executes a batch of iterations. Each iteration runs all the operations I could find that perl uses that apply to LC_TYPE, and all the ones that apply to each of the other categories. And verifies that all the results are as expected. Simultaneously, the other threads are executing their batch. It is verifying that there is no bleed-through from one thread to another. If the threads all have the same results as the other threads, we couldn't detect if there is real bleed-through or not. This is solved by making the results for each category as different as possible from any other thread currently executing. However, this isn't good enough. Every so many iterations, each thread changes to use a new set of locales. This verifies that the locales can be changed in a thread without that bleeding through to other threads. And thread 0 is special. It harvests the other threads as they finish, and keeps going for a while. This is to catch bugs in thread completion, of which we've had a few. MingW's failures all occur, when they occur, on the first iteration following a switch to a new set of locales. That is suspiciously like it is a race condition in cleaning up from the previous setting. But it isn't the first test of the set of the first iteration of the next set. It can be the 10th or so test. I added enough debugging statements to convince me that it isn't perl. This is the failing code in locale.c: STRFTIME_LOCK; int len = strftime(buf, bufsize, fmt, mytm); STRFTIME_UNLOCK; The returned 'buf' is not always correct. T The LOCK/UNLOCK macros on MingW with thread-safe emulation enabled, call EnterCriticalSection(), and set the locales for the categories that affect strftime() to the proper locale. Just to be sure. I tested setting LC_ALL to the correct value. While in its uninterruptible (by other locale handling code anyway) section, strftime() fills buf with the result for the current locale (which STRFTIME_LOCK has set). I added print statements within the critical section thusly STRFTIME_LOCK; DEBUG_U(PerlIO_printf(Perl_debug_log, "calling strftime(%s), LC_ALL=%s\n", fmt, setlocale(LC_ALL, NULL))); int len = strftime(buf, bufsize, fmt, mytm); DEBUG_U(PerlIO_printf(Perl_debug_log, "return=%s, LC_ALL=%s\n", buf, setlocale(LC_ALL, NULL))); STRFTIME_UNLOCK; On this platform, setlocale() expands to _wsetlocale(), a Windows libc call. Here's what they showed for one failure. calling strftime(%b), LC_ALL=Hungarian_Hungary.1250 return=marc., LC_ALL=Hungarian_Hungary.1250 The 'a' in the Hungarian for March is supposed to be a U+00E1, with an acute accent, so this is wrong. strftime() also is passed a pointer to a struct tm, which is filled in with various integers which indicate in this case which month the %b is supposed to return. That it is returning something very much like márch indicates those integers are correct. Not shown in the example above are the other prints I added to verify that we are indeed in a critical section. I didn't see a way to actually test for this via a libc call, but one could use strace and wade through the output. But there are print statements that print out immediately before entering a critical section, and immediately after leaving it. I verified that those prints indicate this code is in a critical section. I note that this box has actually not very many locales, so that the distance between the results of various threads isn't all that large. Pretty much all the locales are CP 1250, 1251, 1252, and 1257, and no UTF-8 ones, so all locales are single byte. None of them map \XE1 into plain 'a', which is what we are seeing returned, so the cleanup theory seems wrong. Sometimes the return is '?' or a series of them, indicating that the returned character is mojibake. None of the locales I saw had 'marc\.' as a possible return. It appears only here in the entire trace of all threads. This makes it again less likely that it is a cleanup issue. But where did it come from?. I don't know. The value for the C locale is 'Mar', so it didn't come from there. The localeconv() function is also broken in this Configuration. We long ago figured out a workaround for that. I tried that same workaround for strftime(), and it didn't help. Commit: 12a66a97a44d240899e11e77b50f664c10ad8df3 https://github.com/Perl/perl5/commit/12a66a97a44d240899e11e77b50f664c10ad8df3 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M ext/I18N-Langinfo/t/Langinfo.t Log Message: ----------- langinfo.t Commit: a354a20d27e57900800deb5a7e4c33449534bd4d https://github.com/Perl/perl5/commit/a354a20d27e57900800deb5a7e4c33449534bd4d Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M ext/I18N-Langinfo/t/Langinfo.t Log Message: ----------- Revert "langinfo.t" This reverts commit 79b7d15629ae03be0f44bc4a25ebcac9ca78a09c. Commit: e0771ec2b951a29cee52faccfb40e2702626e86c https://github.com/Perl/perl5/commit/e0771ec2b951a29cee52faccfb40e2702626e86c Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M lib/locale_threads.t Log Message: ----------- Revert "locale_threads.t: Skip on OpenBSD and DragonFly threaded builds" This reverts commit 1d74e8214dd53cf0fa9e8c5aab3e6187685eadcd, as they have been modified Commit: a29deb17612cd8eb1c68f287217406e4c662adc1 https://github.com/Perl/perl5/commit/a29deb17612cd8eb1c68f287217406e4c662adc1 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M hints/openbsd.sh Log Message: ----------- openbsd Commit: 8406aab865ae5f4ba27f888b8b616e314adca368 https://github.com/Perl/perl5/commit/8406aab865ae5f4ba27f888b8b616e314adca368 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M hints/openbsd.sh Log Message: ----------- openbsd: Not thread safe locales Commit: 94e1a59ef754743a3f90fec47b4de80c06015b8d https://github.com/Perl/perl5/commit/94e1a59ef754743a3f90fec47b4de80c06015b8d Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M hints/openbsd.sh Log Message: ----------- openbsd hints Commit: 97148cc3eee64b721639e66afe1fc21f86bd216e https://github.com/Perl/perl5/commit/97148cc3eee64b721639e66afe1fc21f86bd216e Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M hints/openbsd.sh Log Message: ----------- openbsd mismatched ctype hints Commit: bf83a4f8ed07b58a10c0d8858faecf5026088ade https://github.com/Perl/perl5/commit/bf83a4f8ed07b58a10c0d8858faecf5026088ade Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M locale.c Log Message: ----------- wrap uselocale Commit: f315a4fd209de2eaf9350bae25dd76e6b0ff7e0f https://github.com/Perl/perl5/commit/f315a4fd209de2eaf9350bae25dd76e6b0ff7e0f Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M lib/locale.t Log Message: ----------- lib/locale.t start of setlocale failure Commit: 02fc711e85948973106dfeeb2fe52c5101cc2722 https://github.com/Perl/perl5/commit/02fc711e85948973106dfeeb2fe52c5101cc2722 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M perl.h Log Message: ----------- perl.h: 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: 5da8883cbcd0a55acf0e244c0da30a1bfc8af018 https://github.com/Perl/perl5/commit/5da8883cbcd0a55acf0e244c0da30a1bfc8af018 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M pp.c Log Message: ----------- pp_study: hook Commit: d54f0c0b912ce37e198da4ab471420c83e710b22 https://github.com/Perl/perl5/commit/d54f0c0b912ce37e198da4ab471420c83e710b22 Author: Karl Williamson <k...@cpan.org> Date: 2023-12-06 (Wed, 06 Dec 2023) Changed paths: M perl.h Log Message: ----------- X Compare: https://github.com/Perl/perl5/compare/096dc4d4f453...d54f0c0b912c