Branch: refs/heads/smoke-me/khw-env Home: https://github.com/Perl/perl5 Commit: c540ade94f3aa32034a680b71fc89e933c123332 https://github.com/Perl/perl5/commit/c540ade94f3aa32034a680b71fc89e933c123332 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023)
Changed paths: M t/harness Log Message: ----------- XXX skip croak.t under sanitizer Commit: f54f2b9dfd9c65beedc1a3b7807984f5c5451aab https://github.com/Perl/perl5/commit/f54f2b9dfd9c65beedc1a3b7807984f5c5451aab Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M t/op/sub.t Log Message: ----------- op/sub.t: Cancel watchdog when done A watchdog timer should be cancelled after the test(s) it guards. Otherwise, when someone adds new tests after it in the file, and doesn't notice that the tests are under the watchdog, those new tests can fail. These failures may be intermittent, only happening under heavy load. Commit: f75669a47adcb645ac62dd39dc1e38f162da9648 https://github.com/Perl/perl5/commit/f75669a47adcb645ac62dd39dc1e38f162da9648 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M t/test.pl Log Message: ----------- test.pl: Add comment that should clear watchdog As it says, failure to cancel a timer can lead to failing (or worse: flapping) tests Commit: 45c1137d821f72685ba2e4d4381b0c1c70b68503 https://github.com/Perl/perl5/commit/45c1137d821f72685ba2e4d4381b0c1c70b68503 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M t/TEST Log Message: ----------- XXX skip cpan testing Commit: 03d567268f0813d3b21f6e3ded3f0a44e6b53e6d https://github.com/Perl/perl5/commit/03d567268f0813d3b21f6e3ded3f0a44e6b53e6d Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) 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: ----------- uniprops 24 Commit: 65e84c136c53b00ad365b543682b4d331f466769 https://github.com/Perl/perl5/commit/65e84c136c53b00ad365b543682b4d331f466769 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 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: a57dec563c81ef0a9e5ca99183d714cc68029c76 https://github.com/Perl/perl5/commit/a57dec563c81ef0a9e5ca99183d714cc68029c76 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M t/test.pl Log Message: ----------- XXX test.pl: dont unlink temps Commit: 759cc545398acb3f7ebf6b732563c40f3646925f https://github.com/Perl/perl5/commit/759cc545398acb3f7ebf6b732563c40f3646925f Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M t/test.pl Log Message: ----------- Revert "XXX test.pl: dont unlink temps" This reverts commit 1579ce0dbce549cb594214ba27d4e2fa389f891b. Commit: 598a143e28e5daf824995dfdf5f4b47be43e5c7a https://github.com/Perl/perl5/commit/598a143e28e5daf824995dfdf5f4b47be43e5c7a Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M t/run/locale.t Log Message: ----------- run/locale.t: more debug Commit: c50220bdea814dfded9fbccde6a6a49c83dcf92c https://github.com/Perl/perl5/commit/c50220bdea814dfded9fbccde6a6a49c83dcf92c Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M t/run/locale.t Log Message: ----------- XXX run/locale.t: maybe f move test Commit: b5593521d725b31ab9a3eef43637b0d8ccadad43 https://github.com/Perl/perl5/commit/b5593521d725b31ab9a3eef43637b0d8ccadad43 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M vutil.c Log Message: ----------- vutil.c: Clean up white space/comments Change tabs to blanks; Fix indentation; chomp trailing white space Remove some blank lines that don't contribute to readability Add/change comment wording Commit: ec5869c479dc187bd8eb960a052a6cb2d1b79aee https://github.com/Perl/perl5/commit/ec5869c479dc187bd8eb960a052a6cb2d1b79aee Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M vutil.c Log Message: ----------- vutil.c: Simplify locale handling I read the code over and realized that there was a much simpler way to do things. Commit: 60f297af154d2e9d0c1e406daaca77d0251886c4 https://github.com/Perl/perl5/commit/60f297af154d2e9d0c1e406daaca77d0251886c4 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M vutil.c Log Message: ----------- vutil.c: Debug Commit: d8ed69c4dc9924bd4984d626a4127811d0fe18ce https://github.com/Perl/perl5/commit/d8ed69c4dc9924bd4984d626a4127811d0fe18ce Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M vutil.c Log Message: ----------- vutil.c: Add logic to avoid having to change locales Prior to this commit, unless the locale was C or POSIX, it changed it temporarily so as to make sure the decimal point radix character was a dot. But on POSIX platforms or C99 compilers, there are easy ways to determine if the radix is a dot or not, without having to look at the locale. This commit changes to take advantage of those mechanisms to avoid toggling the locale unless it is actually needed to be done. Only if the compiler is C89 on a non-POSIX box will the previous existing method be used. Commit: 22ad86d6f44b1c5f4b11388e4514aed345be2c84 https://github.com/Perl/perl5/commit/22ad86d6f44b1c5f4b11388e4514aed345be2c84 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M vutil.c Log Message: ----------- vutil.c: C.UTF-8 also has a dot radix character This is another locale besides C and POSIX that are guaranteed to have the radix character be a dot. Very likely, locales beginning with "en_" will too. But this isn't guaranteed. Commit: e9985defc8fa43063c1834d910aec7cfb3bf5410 https://github.com/Perl/perl5/commit/e9985defc8fa43063c1834d910aec7cfb3bf5410 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M vutil.c Log Message: ----------- vutil.c: Don't use Perl locale mechanisms The code in this function may be called from places that participate in the extensive Perl locale-handling mechanisms. But it may also be called from code that isn't. That means it has to use the base level libc functions for its locale handling, and to be careful to not interfere with the Perl data structures. When there is a possibility of collisions with other threads, a mutex must be used to prevent that. There is still the possibility of races if another thread is not using a mutex to protect its locale accesses; but that can't be helped. Recent perls have added mechanisms to allow for an API that can be used to do mutex locking without harming the Perl data structures. This commit changes vutil.c to use them if available, and using no-ops or the best available alternatives, if not. Commit: 7bf4b62efca68d4a4fbff1a38aefe2563e7f5ed3 https://github.com/Perl/perl5/commit/7bf4b62efca68d4a4fbff1a38aefe2563e7f5ed3 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M vutil.c Log Message: ----------- f vutil Commit: ec5b54c914f42d3ec0620441fd2b29deaee117d0 https://github.com/Perl/perl5/commit/ec5b54c914f42d3ec0620441fd2b29deaee117d0 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M cpan/version/t/07locale.t Log Message: ----------- version::07locale.t: Use I18N::Langinfo, not POSIX::localeconv() The former is always present; the latter might not be. Commit: 1fc3957e0151721d30f524b20ff2ca5de8c6d116 https://github.com/Perl/perl5/commit/1fc3957e0151721d30f524b20ff2ca5de8c6d116 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M cpan/version/t/07locale.t 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: f6d473cf0a5baa84441c91c3eb55abc0abb19e8a https://github.com/Perl/perl5/commit/f6d473cf0a5baa84441c91c3eb55abc0abb19e8a Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M cpan/Archive-Tar/t/02_methods.t Log Message: ----------- XXX skip Archive-Tar because of symlinks Commit: 0fdd5d5378bb551fa86c3ec4a8cdfd6e42af16e8 https://github.com/Perl/perl5/commit/0fdd5d5378bb551fa86c3ec4a8cdfd6e42af16e8 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M t/porting/cmp_version.t Log Message: ----------- XXX skip cmp_version.t because of sym links Commit: d0fa942100bcd2fb97004503c663d27bdd5db0fd https://github.com/Perl/perl5/commit/d0fa942100bcd2fb97004503c663d27bdd5db0fd Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M perl.h Log Message: ----------- XXX temp to test broken lconv on non-Windows Commit: 4859544fc9016fe2802a7af7e62768cd4c34241b https://github.com/Perl/perl5/commit/4859544fc9016fe2802a7af7e62768cd4c34241b Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 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: b1034ed573ca3d026f54512a448a7d99bad8d034 https://github.com/Perl/perl5/commit/b1034ed573ca3d026f54512a448a7d99bad8d034 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M Configure Log Message: ----------- XXX Configure temporary to get no_nl, etc working Commit: aaf3084ed5193931b105f0e2bab49105f120a876 https://github.com/Perl/perl5/commit/aaf3084ed5193931b105f0e2bab49105f120a876 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M win32/config_H.gc M win32/config_H.vc Log Message: ----------- Regenerate Configure after metaconfig backports applied Commit: 7cb85b2c519833d656dffc056715048da20be214 https://github.com/Perl/perl5/commit/7cb85b2c519833d656dffc056715048da20be214 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M Configure M config_h.SH M uconfig.h M win32/config_H.gc M win32/config_H.vc Log Message: ----------- Regenerate Configure after rm thread-safe nl_langinfo_l Commit: 1ff4a1a4302a8563900da397c6adfaa89602d6f2 https://github.com/Perl/perl5/commit/1ff4a1a4302a8563900da397c6adfaa89602d6f2 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M Configure M Cross/config.sh-arm-linux M Cross/config.sh-arm-linux-n770 M Porting/config.sh M config_h.SH M configure.com M metaconfig.h M plan9/config_sh.sample M uconfig.h M uconfig.sh M uconfig64.sh M win32/config.gc M win32/config.vc M win32/config_H.gc M win32/config_H.vc Log Message: ----------- XXX No count Regenerate Configure after LC_ALL Commit: f80af5655a78f77e829f52d1252a25a88f5a6a37 https://github.com/Perl/perl5/commit/f80af5655a78f77e829f52d1252a25a88f5a6a37 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M perl.h Log Message: ----------- perl.h: Use an enum to simplify consecutive value initialization This commit replaces the clumsy method to initialize some symbols with consecutive vaues. This also presents opportunities to declare variables as the particular enum type, to allow for better checking and code generation. Commit: 9d52b10bb49810d74aaad0f3d1ff8698b189f82f https://github.com/Perl/perl5/commit/9d52b10bb49810d74aaad0f3d1ff8698b189f82f Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c M perl.h Log Message: ----------- locale.c: Always leave a space for LC_ALL entries Some platforms may not have the LC_ALL conglomerate category. This commit leaves a placeholder for it anyways. Having this always there can lead to some simplifications. Commit: 22657c57b13e370c9ee2f093e10c992af8016c07 https://github.com/Perl/perl5/commit/22657c57b13e370c9ee2f093e10c992af8016c07 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M intrpvar.h M perl.h Log Message: ----------- perl.h: Create a locale mnemonic #define for sync across files Commit: 76165e166e0ade5033e6627776e6c8b5d7455596 https://github.com/Perl/perl5/commit/76165e166e0ade5033e6627776e6c8b5d7455596 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M makedef.pl M perl.h Log Message: ----------- XXX temporary: undef LC_ALL Commit: 95607d37d558326b2c592a5a5904bdaa92357a5a https://github.com/Perl/perl5/commit/95607d37d558326b2c592a5a5904bdaa92357a5a Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M perl.h Log Message: ----------- perl.h: Fake up win32 compile a bit Commit: f275f2bf11ec4726cbc19c9f02d74f33e73cf194 https://github.com/Perl/perl5/commit/f275f2bf11ec4726cbc19c9f02d74f33e73cf194 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- ruler Commit: 9bb6a5ecb8b7af2a25a57cc5c00914476d2e0b49 https://github.com/Perl/perl5/commit/9bb6a5ecb8b7af2a25a57cc5c00914476d2e0b49 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 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: 51761897a37ec079af447375a87bbca7e01171f2 https://github.com/Perl/perl5/commit/51761897a37ec079af447375a87bbca7e01171f2 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 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: 61bc101c456b4660e75c948a1b16966e888c4bb6 https://github.com/Perl/perl5/commit/61bc101c456b4660e75c948a1b16966e888c4bb6 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 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: 618a2791287a6cb0218757f10cc6b667a311ed81 https://github.com/Perl/perl5/commit/618a2791287a6cb0218757f10cc6b667a311ed81 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 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: 4acb90479a8fffe1ac23e5a378deab26f95b353f https://github.com/Perl/perl5/commit/4acb90479a8fffe1ac23e5a378deab26f95b353f Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- DEBUG_ Commit: 1dc865f1cf4a7d9c2ac3d02ced0781a9254a316f https://github.com/Perl/perl5/commit/1dc865f1cf4a7d9c2ac3d02ced0781a9254a316f Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c M perl.c Log Message: ----------- XXX appears to be an existing bug need multiplicity for cur_locale obj SEE what is failing, maybe only non2008 nonsetlocale Commit: 69da6cee86333a6cbe7f0957e87fcc837efbf2c5 https://github.com/Perl/perl5/commit/69da6cee86333a6cbe7f0957e87fcc837efbf2c5 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: debug with thread id Commit: 6911ba45caac98c35ea8854e81bd615005012f8b https://github.com/Perl/perl5/commit/6911ba45caac98c35ea8854e81bd615005012f8b Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M embed.fnc M proto.h M util.c Log Message: ----------- XXX memlog Commit: 7b67fa5cd0c81a69a2ff3fc11a96fd1ee1310159 https://github.com/Perl/perl5/commit/7b67fa5cd0c81a69a2ff3fc11a96fd1ee1310159 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- XXX win workaround Commit: faf2ca0c88726c1c107fbd2a2aaad64a3ad5f891 https://github.com/Perl/perl5/commit/faf2ca0c88726c1c107fbd2a2aaad64a3ad5f891 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- just after XXX win workaround Commit: 998f3db1119fa22d20330f20be3a9dc41c5084a6 https://github.com/Perl/perl5/commit/998f3db1119fa22d20330f20be3a9dc41c5084a6 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M lib/locale_threads.t M t/run/locale.t Log Message: ----------- locale_threads Commit: 3e70105396007e4e385554621a294ed472ec2100 https://github.com/Perl/perl5/commit/3e70105396007e4e385554621a294ed472ec2100 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M lib/locale_threads.t Log Message: ----------- XXX locale_threads.t: Add alarm Commit: e4fd9908db3c1640b788a1202dc5c6f4f3f7c95b https://github.com/Perl/perl5/commit/e4fd9908db3c1640b788a1202dc5c6f4f3f7c95b Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M perl.h Log Message: ----------- perl.h: Debug locking Commit: 325cbdb7d955756f34c74be0b9f39144a46dc925 https://github.com/Perl/perl5/commit/325cbdb7d955756f34c74be0b9f39144a46dc925 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c M perl.h M t/run/switchDx.t Log Message: ----------- debug thread Commit: bea1de2a6ed6953d037a6c5815c734a294795d0e https://github.com/Perl/perl5/commit/bea1de2a6ed6953d037a6c5815c734a294795d0e Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M dist/threads/threads.xs M inline.h Log Message: ----------- threads.xs DEBUG_U Commit: efdede71492ccbac8f841000162ae4f88337f668 https://github.com/Perl/perl5/commit/efdede71492ccbac8f841000162ae4f88337f668 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M makedef.pl Log Message: ----------- XXX: UCRT mingw is not likely locale-thread safe In order for mingw to be locale-thread safe, it needs UCRT which current packages don't tend to have. But this commit adds a XXX -DUCRT Commit: dc2789f245dea27409d7ae99b9d5c2561d1fc4b0 https://github.com/Perl/perl5/commit/dc2789f245dea27409d7ae99b9d5c2561d1fc4b0 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M t/loc_tools.pl Log Message: ----------- loc_tools Commit: b7c9d68037eab726f67fced2d95ca93c8dfd016b https://github.com/Perl/perl5/commit/b7c9d68037eab726f67fced2d95ca93c8dfd016b Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M t/loc_tools.pl Log Message: ----------- XXX t/loc_tools.pl: Temp debug Commit: dd411536eb6632387e2236ebbe87a78a46bd41ab https://github.com/Perl/perl5/commit/dd411536eb6632387e2236ebbe87a78a46bd41ab Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M perl.h Log Message: ----------- perl.h: define locale mutex under more cirumstances Prior to this commit, it wasn't defined if we aren't paying attention to locales; but that doesn't mean they don't exist, and the operations that affect them are still callable; so they should have a mutex to prevent one thread from overwriting another's. Commit: 90c0a288245876722150574d03fd237400878753 https://github.com/Perl/perl5/commit/90c0a288245876722150574d03fd237400878753 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M makedef.pl M perl.h Log Message: ----------- perl.h: Also recognize -DNO_THREAD_SAFE_LOCALE It would be a reasonable Configure option to say -Accflags=-DNO_THREAD_SAFE_LOCALE Commit: cc7acc746ab10607a8a6e35b1cefdae3b87bdef8 https://github.com/Perl/perl5/commit/cc7acc746ab10607a8a6e35b1cefdae3b87bdef8 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: configthreadlocale() error checking The code previously just assumed the system call always worked. But it may not if the CRTL is wrong; this surfaced on a mingw compile. It's better to have it fail outright than to continue and silently give a wrong answer. Commit: f3ceb987efe058bb4058b059d6452876a2ca181b https://github.com/Perl/perl5/commit/f3ceb987efe058bb4058b059d6452876a2ca181b Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M perl.h Log Message: ----------- perl.h: Turn mutex warning into a panic This was my attempt to keep going and try to recover after a problem was found: an unbalanced number of locks/unlocks. However, in looking at a many-million line execution trace, I realized that the recovery likely doesn't lead to correct results, and we should quit immediately when it happens. Commit: fd4f7ef689b476419b3f564ccc468c9c5edd6dcc https://github.com/Perl/perl5/commit/fd4f7ef689b476419b3f564ccc468c9c5edd6dcc Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M perl.h Log Message: ----------- perl.h: White space, comments only Commit: 07bc1b55ce1cc59c7e034eb40996c2d79ffc455d https://github.com/Perl/perl5/commit/07bc1b55ce1cc59c7e034eb40996c2d79ffc455d Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M perl.h Log Message: ----------- perl.h change lock debugging text Commit: 6e8501c67c1bdd4ce4a5c0fbd8393ace3b8981aa https://github.com/Perl/perl5/commit/6e8501c67c1bdd4ce4a5c0fbd8393ace3b8981aa Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M t/harness Log Message: ----------- XXX t/harness temp tweaks Commit: 1f56c0aaf4be1a003ce8be3b6f3167f42edec8b5 https://github.com/Perl/perl5/commit/1f56c0aaf4be1a003ce8be3b6f3167f42edec8b5 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M pod/perllocale.pod Log Message: ----------- perllocale Xxx start of changes Commit: d1663db964e64e50ed1e5ddde0bda8e70d0a52cd https://github.com/Perl/perl5/commit/d1663db964e64e50ed1e5ddde0bda8e70d0a52cd Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M lib/locale_threads.t Log Message: ----------- XXX ruler lib/locale_threads.t Commit: c290e6a4e6e03d74c130a4f56d47e6ebd0e89f96 https://github.com/Perl/perl5/commit/c290e6a4e6e03d74c130a4f56d47e6ebd0e89f96 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M hints/freebsd.sh M hints/openbsd.sh Log Message: ----------- XXX try out bsd 2008 Commit: 794d70526bad6a749ec7e46b66183602498dec1e https://github.com/Perl/perl5/commit/794d70526bad6a749ec7e46b66183602498dec1e Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M makedef.pl Log Message: ----------- makedef.pl: Don't use locale items unless using locale If we are configured to not look at locales at all, we shouldn't be looking at threaded locales nor POSIX 2008 ones. This commit fixes a situation that is not likely at all to show up in real life, but I stumbled across it in testing weird configurations. Commit: 55c566544bb08edd76db52e311bf470d9ea82a24 https://github.com/Perl/perl5/commit/55c566544bb08edd76db52e311bf470d9ea82a24 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M makedef.pl Log Message: ----------- makedef.pl: Remove redundant set This ||= is useless, as just above we've already set MULTIPLICITY if USE_ITHREADS is set. Commit: 3edbb42dcdfd327a058138a187954b174ff3e60e https://github.com/Perl/perl5/commit/3edbb42dcdfd327a058138a187954b174ff3e60e Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M lib/locale.t Log Message: ----------- XXX temp: lib/locale.t: debug Commit: 68a8c27862ed173de2295edec564b006cb284886 https://github.com/Perl/perl5/commit/68a8c27862ed173de2295edec564b006cb284886 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M lib/locale.t Log Message: ----------- lib/locale.t FILE debug Commit: 8aa599008b5be30ce2f6bee243753ebad304170f https://github.com/Perl/perl5/commit/8aa599008b5be30ce2f6bee243753ebad304170f Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M lib/locale.t Log Message: ----------- lib/locale.t Commit: 442c8ed54143a421cf7f380d1ac71b2f9ef4df1c https://github.com/Perl/perl5/commit/442c8ed54143a421cf7f380d1ac71b2f9ef4df1c Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M pod/perlhacktips.pod Log Message: ----------- XXX incomplete perlhacktips: Commit: bc3ee3cf9011687dc7252f2b409c94bdeb6a9363 https://github.com/Perl/perl5/commit/bc3ee3cf9011687dc7252f2b409c94bdeb6a9363 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M handy.h Log Message: ----------- XXX cygwin debugging small macro buf Commit: a7b84ee25c854ffab2924e520985fe40d97dc2da https://github.com/Perl/perl5/commit/a7b84ee25c854ffab2924e520985fe40d97dc2da Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M iperlsys.h Log Message: ----------- iperlsys.h: TODO need to look at adding mutexes Commit: ded730bacb795985640dfb5651a7be04c8274a3f https://github.com/Perl/perl5/commit/ded730bacb795985640dfb5651a7be04c8274a3f Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M regen/reentr.pl Log Message: ----------- reentr.pl: XXX about needing mutex Commit: 23fbaae68c1c55a3ad135ce701a0ce46ff7f8c31 https://github.com/Perl/perl5/commit/23fbaae68c1c55a3ad135ce701a0ce46ff7f8c31 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M regexec.c Log Message: ----------- regexec.c: XXX has cast to U8 for some reason Commit: aae98c96891489da8852bb82613d728e9cb4eb86 https://github.com/Perl/perl5/commit/aae98c96891489da8852bb82613d728e9cb4eb86 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M sv.c Log Message: ----------- perlapi: Combine sv_eq(), sv_eq_flags() entries Commit: 516c3ef3bd7ddf3da693769a744fbfd8420fecba https://github.com/Perl/perl5/commit/516c3ef3bd7ddf3da693769a744fbfd8420fecba Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M dist/ExtUtils-ParseXS/lib/perlxs.pod M t/porting/known_pod_issues.dat Log Message: ----------- perlxs Commit: 180ddc08974dc74a998056d2abc46b0ad37b2d1b https://github.com/Perl/perl5/commit/180ddc08974dc74a998056d2abc46b0ad37b2d1b Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M dist/IO/IO.xs Log Message: ----------- XXX check if using ppport IO.xs: Remove fallback code furnished by ppport Commit: acc7feca2a4bb240d62310af7357704387015a1c https://github.com/Perl/perl5/commit/acc7feca2a4bb240d62310af7357704387015a1c Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M pp.c Log Message: ----------- Debug Windows memory usage in pp_study Commit: 895918d328e73f4ac594364a799d77831b601945 https://github.com/Perl/perl5/commit/895918d328e73f4ac594364a799d77831b601945 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M pod/perlmod.pod Log Message: ----------- perlmod Commit: 3cda81344dc008881a53476cea57c4d272732535 https://github.com/Perl/perl5/commit/3cda81344dc008881a53476cea57c4d272732535 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M perl.h Log Message: ----------- XXX perl.h: Debugging mutex lock' Commit: 5927a044a33cdbe86dc34614dd56ca13c2e08cee https://github.com/Perl/perl5/commit/5927a044a33cdbe86dc34614dd56ca13c2e08cee Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M embed.fnc M embed.h M locale.c M proto.h Log Message: ----------- locale.c: Rename S_calculate_LC_ALL_string() Its return is a string. Add the suffix '_string' to emphasize that Commit: 37a6fcd370043745e5eff8d4ca02e2c1216eb6cc https://github.com/Perl/perl5/commit/37a6fcd370043745e5eff8d4ca02e2c1216eb6cc Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M cpan/version/t/07locale.t 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: 47e4c62bb08f9689b9abc0d01c3dffc78fe15929 https://github.com/Perl/perl5/commit/47e4c62bb08f9689b9abc0d01c3dffc78fe15929 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Use proper macro querylocale_c() likely will expand to the correct thing, but it isn't defined until higher in the stack of locale handling layers. Instead use the construct that is lower in the stack. Commit: 4f3641b56a9ad06856f412fdec3546f5a3e33d47 https://github.com/Perl/perl5/commit/4f3641b56a9ad06856f412fdec3546f5a3e33d47 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Move some static functions within file This places them more conveniently. Future commits will continue this reordering until like-level and like-kind functions are close to each other physically in the file. Commit: 863ec531fb4816f5e00d9963d8eda0c117ded159 https://github.com/Perl/perl5/commit/863ec531fb4816f5e00d9963d8eda0c117ded159 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Replace an assumption by a cpp check This commit adds a preprocessor directive to check if we are running on a POSIX 2008 system, rather than just assume we are if the earlier possibilities weren't the case. And it causes a compile time error if none pan out. Commit: 49b3c83c0071ad9fa0e84e46dfce6fa43f7dd448 https://github.com/Perl/perl5/commit/49b3c83c0071ad9fa0e84e46dfce6fa43f7dd448 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Don't compile without LC_ALL under POSIX 2008 The code assumes that if you have POSIX 2008, you have LC_ALL. This adds a compile-time error check to prevent someone from finding that out the harder way. Commit: 4c283af00a202ecfee470506472903dc2acd941e https://github.com/Perl/perl5/commit/4c283af00a202ecfee470506472903dc2acd941e Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Move a parallel array adjacent to its mates This is in preparation for making their parallelism more obvious Commit: e9a5aaf335dbf7bba9476f7a40bd4a5d8ad6085f https://github.com/Perl/perl5/commit/e9a5aaf335dbf7bba9476f7a40bd4a5d8ad6085f Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M embed.fnc M proto.h Log Message: ----------- locale.c: Add warning if function return ignored Commit: 133d911cd2a6050dbc7f2d22792e0e9305c181ee https://github.com/Perl/perl5/commit/133d911cd2a6050dbc7f2d22792e0e9305c181ee Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Properly identify reason for placeholder in arrays This is needed to handle the case where a locale category passed in (via Perl_setlocale) is unknown to perl, hence is considered illegal. The previous comments were misleading. Commit: b4d181403697325bf24b359ab9bd00d3ddffb179 https://github.com/Perl/perl5/commit/b4d181403697325bf24b359ab9bd00d3ddffb179 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M embed.fnc M locale.c M proto.h Log Message: ----------- Change return of S_get_category_index_nowarn This is in preparation for it being called from more than a single place. Instead of returning -1 on error, it returns an out-of-bounds value 1 greater than the largest legal value. There is a placeholder entry in all the arrays this can be indexed into for that illegal value. This means if it somehow gets used, we wont get a segfault, like we would on the -1, but instead a value that will show up as wrong, but not crash. Commit: f694d00b862247ee58876258234a0cc1eb00f36f https://github.com/Perl/perl5/commit/f694d00b862247ee58876258234a0cc1eb00f36f Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M ext/XS-APItest/t/locale.t M locale.c Log Message: ----------- locale.c: Check for illegal input category It is possible for Perl_setlocale() to be called with a category value that is illegal, or is just unknown to us. There is a function that maps category numbers into our internal indexing scheme. It maps any unknown value to the same index, larger than any legal one. Prior to this commit, there was no check that the input was valid; we went off processing it as if it were valid. That there was an element in the tables that corresponds to this index prevented any illegal memory acceses, but it is better to check early and return an error. Commit: 31a4f8d06d238ab594e3d0e4226905d63e2e07fd https://github.com/Perl/perl5/commit/31a4f8d06d238ab594e3d0e4226905d63e2e07fd Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Revamp initialization of parallel arrays This new method eliminates a lot of #ifdef's in each of the array initializations, consolidating all the array entries for a category to be in a single group. This facilitates ease of checking that things are correct and the addition of new items. A Factory pattern to generate all these could be used instead. But I don't know how to do that in cpp (I suppose some recursive #includes would do it uglily), and I don't think it's worth it to do a regen script. There is a reason for the apparently weird indentation, that future commits will reveal. Commit: 3b3aff4ff6ed3ff9b6a6fac0c4d59015eaa4954f https://github.com/Perl/perl5/commit/3b3aff4ff6ed3ff9b6a6fac0c4d59015eaa4954f Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c M perl.h Log Message: ----------- Rename SETLOCALE_LOCK to LOCALE_LOCK This mutex isn't just about the setlocale function; it applies to all locale related critical sections. Commit: d5156e91986d5cea3e93e484a8d9615c4fc3b06f https://github.com/Perl/perl5/commit/d5156e91986d5cea3e93e484a8d9615c4fc3b06f Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Avoid runtime strlen() calls The lengths of these strings are known at compile time. This commit creates an array of those lengths to avoid calling strlen() in a loop unnecessarily. Commit: 46a722e1742fc3ca812f542fa957fbd60fdcf8af https://github.com/Perl/perl5/commit/46a722e1742fc3ca812f542fa957fbd60fdcf8af Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Replace loop with a switch() locale.c uses tables to specify data and actions about the different locale categories on the system. The categories are opaque integers specified by libc, so they have to be mapped to indices into the tables for our use. Prior to this commit, that was done by a loop iterating over each possibility until it found a match. This commit changes that to use a switch() statement, so that the compiler can choose what the best way to implement things are. Commit: 9a21214215e0f33041f50f2b55cd620a0cca3bc4 https://github.com/Perl/perl5/commit/9a21214215e0f33041f50f2b55cd620a0cca3bc4 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M embed.fnc M embed.h M locale.c M proto.h Log Message: ----------- locale.c: Refactor S_get_category_index() There is actually only one place where the locale category can be input from code outside this file. Now that the previous commit added validation to that one spot, The rest of the calls should already be validated, and if the input is bad, it means that there is a serious error in the logic of this code, and warrants panicking. This commit collapses two functions into one plus a macro to call it with the right parameters. It moves the warning into the one place where it is useful, and panics if there is a problem otherwise. Commit: 3e5e62f61fd794c5ed1af7c330eba87a88bf5994 https://github.com/Perl/perl5/commit/3e5e62f61fd794c5ed1af7c330eba87a88bf5994 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c M makedef.pl M perl.h Log Message: ----------- XXXleaks: Remove PL_cur_LC_ALL for non-Windows This value is now held in a slot in PL_curlocales[] for non-Windows platforms. Commit: 339ff1012d55e16db4790d077cd2916d415aa172 https://github.com/Perl/perl5/commit/339ff1012d55e16db4790d077cd2916d415aa172 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M embed.fnc M embed.h M locale.c M proto.h Log Message: ----------- locale.c: Rename S_myquerylocale_i() This name doesn't effectively describe it. The new name is querylocale_2008_i, indicating it is for the POSIX 2008 API. Commit: 144eded9c8d71e5ba1427b771b01413e34ef8cf2 https://github.com/Perl/perl5/commit/144eded9c8d71e5ba1427b771b01413e34ef8cf2 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M embed.fnc M embed.h M locale.c M proto.h Log Message: ----------- locale.c: Separate setlocale into bool and query There are two ways that POSIX specifies to change the locale. The earlier interface is setlocale(), which either returns NULL on failure, or a pointer to global static memory containing the character string of the changed locale. That may very well be the input locale name, or the platform can return something that to it is equivalent. The second, from the 2008 standard, is newlocale() which returns either NULL on failure or a pointer to an opaque object, and there is no official way to find out what the current locale is. (The next proposed version of the Standard will finally add this capability.) Some platforms have introduced a querylocale() to get this information. (glibc has a hidden function to do so.) Note that the return value of setlocale() is problematic, valid only until the next call to that function, which might be immediately from another thread. The value, if needed, has to be saved to a per-thread buffer in a critical section with the function call. That buffer presents opportunities for leaking or being destroyed too early, resulting in heap use after being freed. And it turns out that the value is often not needed; often what is needed is only if the operation failed or succeeded. This commit starts the process of limiting the use of the changed value to just where its really needed. It does this by changing the newlocale() form to return success/failure, removing all the macros that think you can set and get the value in the same operation, and minor fixups. Commit: 9c2f24bd34513878df4097cad4523fad5d93e8d2 https://github.com/Perl/perl5/commit/9c2f24bd34513878df4097cad4523fad5d93e8d2 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M embed.fnc M embed.h M locale.c M proto.h Log Message: ----------- locale.c: Rmv less_dicey_void_setlocale_r() This function is simple, but almost entirely redundant with less_dicey_bool_setlocale_r(). A simple wrapper to the latter suffices. The commit also changes the macros for this to use void_setlocale_r() as the base which the other two are defined in terms of. This avoids a runtime calculation of the internal index corresponding to the input locale category except when we are about to panic. Commit: a884eab7260db61132c55fcea9ae48c84c800b6c https://github.com/Perl/perl5/commit/a884eab7260db61132c55fcea9ae48c84c800b6c Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Avoid a runtime calculation As in the previous commit, this rewrites the void_setlocale_X macros so as to not need a runtime calculation except in the very rare event of executing a panic. Commit: 9781eb3e799090702802f3a7936f97e3c2ad4dce https://github.com/Perl/perl5/commit/9781eb3e799090702802f3a7936f97e3c2ad4dce Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Add missing panic In just the POSIX 2008 implementation of setting locales, the panic upon failure had been omitted. The whole point of a void call is so that the caller doesn't have to check the return code of something that should never fail, and can just assume that if it gets to the next statement everything worked as expected. Commit: 7703320cdd93413bf87809f69aa916df91eecd97 https://github.com/Perl/perl5/commit/7703320cdd93413bf87809f69aa916df91eecd97 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Reorder code, add comments There are three separate implementations of an internal API for locale handling. This commit makes them stand out in the code, and makes the ordering within each implementation parallel to the other implementations. And adds explanatory comments. Commit: 7d850ed3c3581bd04b917a58dfb1eaff63b3144e https://github.com/Perl/perl5/commit/7d850ed3c3581bd04b917a58dfb1eaff63b3144e Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Remove one-off macro This was used to prevent an unnecessary copy. But the next commit will change the macro it was avoiding to not always do the copy. That will avoid more copies than this would. The copy that results will still be unnecessary in some cases, but there is a net gain. Commit: c1d993e0a370d23fce000f0a2b86886248cf22d9 https://github.com/Perl/perl5/commit/c1d993e0a370d23fce000f0a2b86886248cf22d9 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Add a convenience macro query_nominal_locale_i This is used when the locale needs to be what an external caller would see. Adding this simplifies some code. Commit: d5a5a4cd4da6a2223d1c25f508836a9d4af60dea https://github.com/Perl/perl5/commit/d5a5a4cd4da6a2223d1c25f508836a9d4af60dea Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Move copy from macro to called function Not all returns from the function need to be copied. Thus this eliminates some extraneous copies. Commit: 42494747bfd22f198ef2e6f48d295d7a5b506ac6 https://github.com/Perl/perl5/commit/42494747bfd22f198ef2e6f48d295d7a5b506ac6 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- S_toggle_locale_i: Move some assert()s, initialization Commit: 6d30dbed7eb6c8747e49444049af95ee7db26aec https://github.com/Perl/perl5/commit/6d30dbed7eb6c8747e49444049af95ee7db26aec Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M embed.fnc M embed.h M locale.c M perl.h M proto.h Log Message: ----------- locale.c: Add extra debug info to panics This commit adds some call stack information to the message that gets output when about to panic because of an unanticipated failure in the locale handling code. Commit: aa8a2fbc0f255ed6bdda1649f69e9d698ae6a6ad https://github.com/Perl/perl5/commit/aa8a2fbc0f255ed6bdda1649f69e9d698ae6a6ad Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Add void_setlocale_with_caller macros These pass a file and line number of further up the calling stack to a panic so as to improve debugging information. Commit: c2979af467a62e44cdc40fc74443787a073b9183 https://github.com/Perl/perl5/commit/c2979af467a62e44cdc40fc74443787a073b9183 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Initialize PL_curlocales at startup Previously this was done later, which meant other code had to take them being uninitialized into consideration over and over at runtime. That code is hereby removed. This commit enables further simplifications to follow in later commits. Commit: d977d8bb42487531bdf4d4e2d6fed5c47d290010 https://github.com/Perl/perl5/commit/d977d8bb42487531bdf4d4e2d6fed5c47d290010 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Use void_ macro form when ignoring return The void_ form panics if unsuccessful; and here we are relying on it being successful. Commit: 8f3238b1cb620895827aca52d9759f03064c9ff8 https://github.com/Perl/perl5/commit/8f3238b1cb620895827aca52d9759f03064c9ff8 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Don't exclude LC_ALL in loop This function was setting each individual locale category to the same value. But if all the subcomponents are the same, so is LC_ALL. No need to special case it Commit: 18572c44b1bdd7c35070536d78d1444bbe8a5250 https://github.com/Perl/perl5/commit/18572c44b1bdd7c35070536d78d1444bbe8a5250 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M embed.fnc M locale.c M proto.h Log Message: ----------- locale.c: Change function to return void It just returns the input value unchanged; this is a no-op. Commit: 36ffec6d6260e829ed39229c0a8ed51dc2cd8a57 https://github.com/Perl/perl5/commit/36ffec6d6260e829ed39229c0a8ed51dc2cd8a57 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M embed.fnc M embed.h M locale.c M perl.h M proto.h Log Message: ----------- locale.c: Remove no-longer needed parameter and computation When a locale category changes, LC_ALL necessarily also does. When we are looping changing a bunch of categories, LC_ALL's intermediate values are of no importance; only the final value matters. Prior to this commit, this was handled by setting a flag to not do the recalculation until the final loop iteration. But a more elegant solution is to not recalculate it all, until the value is actually needed. So the code is changed to invalidate the stored value if an individual locale category changes, and then do the calculation only when needed and invalidated. Commit: 45d5dacb256f509d81b6e11075e0478d7c867519 https://github.com/Perl/perl5/commit/45d5dacb256f509d81b6e11075e0478d7c867519 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M embed.fnc M locale.c M proto.h Log Message: ----------- locale.c: Change parameter name for static function category_locales_list is somewhat more descriptive than individ_locales Commit: 999b4c865587481b27f2cccba3537baea9709047 https://github.com/Perl/perl5/commit/999b4c865587481b27f2cccba3537baea9709047 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M embed.fnc M embed.h M locale.c M proto.h Log Message: ----------- locale.c: Change API of S_calculate_LC_ALL_string This function looks at all the individual locale categories on the system. So far it is called with either an array of the current values for them, or an object from which those values can be derived. But the object is always the current locale object in effect. The querylocale_i() macro can be used to get this information without needing to have to name the object. Therefore the object parameter is superfluous, and the function could be notified to use querylocale_i by making the array parameter NULL. But right now you get one or the other. There are two signatures to this function, depending on the platform capabilities. This commit collapses those into one signature, the one with an array parameter. And then NULL is used to trigger calling querylocale_i(). The reason to do this is that future commits will want to pass an array to this function, even when it is compiled on a platform that currently doesn't allow that option. Commit: e33aa4ad177bc8d2405e6a37068b7915e4dfecd9 https://github.com/Perl/perl5/commit/e33aa4ad177bc8d2405e6a37068b7915e4dfecd9 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Simplify S_get_LC_ALL_display The previous enhancements to calculate_LC_ALL_string means this function can just call it without having to loop itself. Commit: 8d36fb2e0ce14902e7962702b65b4c02702a51af https://github.com/Perl/perl5/commit/8d36fb2e0ce14902e7962702b65b4c02702a51af Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Slight refactoring of S_querylocale_2008_i This just moves some asserts, adds comments and a branch prediction, and replaces a variable used in only one place by it value. Commit: 36960695e07f41ed54350a9bff34a73de05e8458 https://github.com/Perl/perl5/commit/36960695e07f41ed54350a9bff34a73de05e8458 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Shortcut common case When using the POSIX 2008 locale interface, perl keeps (for the entire lifetime of the process) an object for when all locale categories are in the C locale. So, if someone queries the current locale, and the C object is the one in effect, the locale must be C, and we can return C immediately. This has the salubrious effect of hiding from perl bugs on some *BSD-related platforms. A link to a ticket to FREEBSD is in one of the comment lines of this commit. Commit: 351e8ce20643b6432d819185d34f5ae12d11efc3 https://github.com/Perl/perl5/commit/351e8ce20643b6432d819185d34f5ae12d11efc3 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Reorder #if clauses Currently, the two clauses are about the same length, but in the next commit the current first clause will become a lot longer. The principal that it's easier to read code that disposes of the easy cases first comes into play, so, reverse the clause order. Commit: b030f730543ed8584688ea3ffe39176c27ab6ffe https://github.com/Perl/perl5/commit/b030f730543ed8584688ea3ffe39176c27ab6ffe Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Inline only remaining use of querylocale_l() Future commits would make this macro need to be a function anyway, and since there is only one use of it, just inline it. The assertion it defines is no longer needed, as we know that the one place it is now placed is valid. This also adds explanatory comments Commit: 9a4a23473c3c768beb48ca7c5d21f08c700df2b7 https://github.com/Perl/perl5/commit/9a4a23473c3c768beb48ca7c5d21f08c700df2b7 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Flatten two nested if's These can be combined into a single more cohesive construct Commit: 71995ed78405cff2b37605a8fe226c01786c7edd https://github.com/Perl/perl5/commit/71995ed78405cff2b37605a8fe226c01786c7edd Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Move a #define, and add a comment Commit: 2e625140b89445afcc016e1683f461b1cee8d5c5 https://github.com/Perl/perl5/commit/2e625140b89445afcc016e1683f461b1cee8d5c5 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- XXX try reverting: locale.c: Lock around querylocale See what passes Commit: e9bf36fcdaf5819468285dfd0e6762a9b1574e10 https://github.com/Perl/perl5/commit/e9bf36fcdaf5819468285dfd0e6762a9b1574e10 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- Revert "XXX try reverting: locale.c: Lock around querylocale" This reverts commit 899565f1db40eb12fba5733b20cd63362d7e5b5f. Commit: cea42dd2474e78a0ae56234f1564190765fc9957 https://github.com/Perl/perl5/commit/cea42dd2474e78a0ae56234f1564190765fc9957 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M embed.fnc M embed.h M locale.c M perl.h M proto.h Log Message: ----------- locale.c: Split up S_setlocale_from_aggregate_LC_ALL This splits out the parsing of the LC_ALL string from the locale setting. Future commits will use the parse portion in more places. The new code doesn't panic on syntax errors, unlike the old. This is because we should never panic on user input, but return failure instead. Commit: 769c8cea4939839e38cbf6e977073221725f7086 https://github.com/Perl/perl5/commit/769c8cea4939839e38cbf6e977073221725f7086 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Create is_disparate_LC_ALL() This macro uses the results of the new Configure probe that tells us how the platform represents disparate LC_ALL strings. Commit: 5d429625268f0e673f1637bbbe9efce08d161d26 https://github.com/Perl/perl5/commit/5d429625268f0e673f1637bbbe9efce08d161d26 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Move two helper functions for POSIX 2008 implementation Commit: f0c6bb224fd8afc64a17f97de411b0703bcb3be0 https://github.com/Perl/perl5/commit/f0c6bb224fd8afc64a17f97de411b0703bcb3be0 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M embed.fnc M embed.h M locale.c M perl.h M proto.h Log Message: ----------- Add development aid for simulating LC_ALL fake positional notation There are two ways that systems represent LC_ALL when not all individual categories are in the same locale. One is category_name=value pairs, and the other is a positional notation cat1_value|cat2_value|cat3_value|... where the separator (here '|') varies between platforms, and the position of a value determines which category it applies to. This commit adds the ability to simulate a positional box on a name=value box, so that many bugs can be found without having to access a real positional box. Commit: bb5a1a93759b083bc8b31f5b2687234a03643c64 https://github.com/Perl/perl5/commit/bb5a1a93759b083bc8b31f5b2687234a03643c64 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Add support for LC_ALL positional notation Some platforms use a positional notatiol for LC_ALL when not all categories are the same, like C/English/C.UTF-8/ ... This commit takes advantage of the new Configure probe to now handle those when parsing an LC_ALL string. Commit: f3755fc711997fe1ff5220ac8ae8e20ed2acdcd0 https://github.com/Perl/perl5/commit/f3755fc711997fe1ff5220ac8ae8e20ed2acdcd0 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: use variable to avoid extra comparisons The mnemonic name also makes it clearer. Instead of comparing two variables multiple times, set a boolean once with the result, and use that. Commit: 6d28785f130b6557ab2b8485f41089bd2b2cedef https://github.com/Perl/perl5/commit/6d28785f130b6557ab2b8485f41089bd2b2cedef Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Windows Use .ACP for sys default fallback Prior to this commit the locale handling code thought that Windows used "" for the system default locale. But it's not, and to get to the change in the initialization code, the "" had already been tried and failed. Commit: 7c8eeb487014db63a75149d84a23347cfc39cbf9 https://github.com/Perl/perl5/commit/7c8eeb487014db63a75149d84a23347cfc39cbf9 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c M perl.h Log Message: ----------- locale.c, perl.h: comments, white space Commit: fa294bc2bf4639d3c5121a55f6912034580cf5dc https://github.com/Perl/perl5/commit/fa294bc2bf4639d3c5121a55f6912034580cf5dc Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- XXX maybe not for windows: S_calculate_LC_ALL_string(): save value after calculation On some platforms the string returned by this function also needs to be kept up-to-date in an array element. This commit changes the function to do the update (after the potentially expensive calculation) as a side-effect, so as to avoid unnecessary recalculations. Commit: 44ce0d7ea10c52690e0f30ad1751ec2fcf5d60d6 https://github.com/Perl/perl5/commit/44ce0d7ea10c52690e0f30ad1751ec2fcf5d60d6 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Precalculate LC_ALL string boiler plate length When not all categories have the same locale, the internal representation of LC_ALL is a sequence of 'cat=value' pairs, separated by semi-colons. The only things that vary are the values. This commit sums up the non-varying portions at compile time. Commit: 53555b78b7d06214ee6550beedfc40f15359a590 https://github.com/Perl/perl5/commit/53555b78b7d06214ee6550beedfc40f15359a590 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M embed.fnc M embed.h M locale.c M proto.h Log Message: ----------- S_querylocale_2008_i: Add caller's line# param This will be helpful in debugging Commit: bf8cea2a7eabbd5178d1147a368cd8fdb40cec11 https://github.com/Perl/perl5/commit/bf8cea2a7eabbd5178d1147a368cd8fdb40cec11 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M embed.fnc M embed.h M locale.c M perl.h M proto.h Log Message: ----------- locale.c: Calculate native LC_ALL strings There are two methods of representing non-uniform LC_ALL strings. One is name=value pairs, and the other is positional. Now that there is a Configure probe that detects the details, calculate_LC_ALL_string() is here enhanced to have a parameter passed to it as to which variety the output should be in, and to generate the proper format. Commit: ab0dbf3ad863a74f8739d04bb436c2025562e2ff https://github.com/Perl/perl5/commit/ab0dbf3ad863a74f8739d04bb436c2025562e2ff Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M embed.fnc M embed.h M locale.c M proto.h Log Message: ----------- locale.c: Revamp S_stdize_locale() We are now able to parse and construct non-uniform LC_ALL strings. A big part of this function was trying to deal with these, but now that can be farmed out. It's now extremely unlikely this function will now actually change anything, based on recent field experience. To save copying that therefore won't likely ever be needed, this function now returns its input if unchanged, and a mortalized copy if it unlikely does need to be changed. That means it no longer needs a buffer reserved for it. The input is going to be the static global buffer pointed to by the return of setlocale(). That means calls to this function need to be protected by mutexes in threaded systems, and the result safely copied during the critical section. This requirement is unchanged by this commit. Commit: 383f7dde9403ee51c4569047d66ed5b254f0fe15 https://github.com/Perl/perl5/commit/383f7dde9403ee51c4569047d66ed5b254f0fe15 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M embedvar.h M intrpvar.h M locale.c M makedef.pl M perl.c M sv.c Log Message: ----------- Rename the buffer in S_less_dicey_locale It was reusing the buffer formerly used by S_stdize_locale(), but now its only use is from this function, so name it accordingly. Commit: ea9ccca4b1622c52b1c31d969cda9bb7971326ac https://github.com/Perl/perl5/commit/ea9ccca4b1622c52b1c31d969cda9bb7971326ac Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- S_stdize_locale() Rmv testing for spurious '=' This code had been added to counteract occasional cases of improper syntax in a locale string. Other fixes to the locale handling have resulted in those cases not now showing up. It was never clear if the changes that code made to the locale name were actually the right thing to do. Now, we have the ability to correctly parse locale strings on all platforms tested on. If there is a problem with a platform, the parsing discovers it and returns an error, which stdize_locale() checks for and also returns an error if found, and so on back up the line to the user calling code. Commit: d8daac4d34204e1372af5adadc1492a5a09e90e9 https://github.com/Perl/perl5/commit/d8daac4d34204e1372af5adadc1492a5a09e90e9 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M embed.fnc M embed.h M hints/aix.sh M locale.c M proto.h Log Message: ----------- XXX perldelta other pod: Compile stdize_setlocale() only if requested XXX perldelta, and where else? This very old function has been whittled down to just looking for newlines in returned locales. Those just haven't come up in platforms we have tested on in recent years. Therefore, this is extra work on most, or perhaps all platforms. Should a platform show that this is still needed, its hints file can be changed to add a Configure option. Commit: 63180810e3f94bfca6564f16034748b90ff30e3a https://github.com/Perl/perl5/commit/63180810e3f94bfca6564f16034748b90ff30e3a Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- Properly handle broken setlocale(LC_ALL, NULL) Early AIX versions could return a truncated value in this case. https://www.ibm.com/support/pages/apar/IV22097 Tests were skipped as a result by 59b4d2932ceb16662879bca2a22315c3597276ae. This commit adds an easy workaround for this bug, changes the AIX hints page to enable it; the next commit will revert the test skipping. Commit: 5d2b0d6c357142471014ef0f059956c1f7573d7d https://github.com/Perl/perl5/commit/5d2b0d6c357142471014ef0f059956c1f7573d7d Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M lib/locale.t M t/lib/warnings/regexec M t/run/locale.t Log Message: ----------- Revert "AIX: skip some locale tests" This reverts commit 59b4d2932ceb16662879bca2a22315c3597276ae. which was a temporary fix for 5.38.0. And now a workaround is in place for the defective libc implementation. Commit: 27615c69fe01de0afcf9d0ad84c1a91f87a4269f https://github.com/Perl/perl5/commit/27615c69fe01de0afcf9d0ad84c1a91f87a4269f Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Create STDIZED_SETLOCALE_LOCK Its best to use a mutex associated with the operation. This creates one for stdized_setlocale(), which is just an alias for another mutex. Commit: caf531177c5c22a15da5ae9ee795d3e4302f1319 https://github.com/Perl/perl5/commit/caf531177c5c22a15da5ae9ee795d3e4302f1319 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Move a macro definition earlier in the file Commit: 8cd1559ae5bed8f740835a62fac0d44e40f3603b https://github.com/Perl/perl5/commit/8cd1559ae5bed8f740835a62fac0d44e40f3603b Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Change DEBUG statements to include non-0 errno This is very helpful when things go wrong. Commit: e8d2d9cee990181c7d0b1216e98723a1c46775e6 https://github.com/Perl/perl5/commit/e8d2d9cee990181c7d0b1216e98723a1c46775e6 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Only define string constant on platforms that need it Commit: b94e2b4d9ef662e366c8b62640aa09fcc2fff5f1 https://github.com/Perl/perl5/commit/b94e2b4d9ef662e366c8b62640aa09fcc2fff5f1 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- Perl_sync_locale(): Best to change to global locale This didn't actually cause a bug AFAIK, but prior to this commit, the comment was wrong. The comment makes sense, so bring the code into compliance. The reason it was not a bug is that even though the thread remained in the per-thread locale, it uses the global locale API to set things. Commit: e46e5d2260c4383bc0cbf5d300ab13c82da20e9c https://github.com/Perl/perl5/commit/e46e5d2260c4383bc0cbf5d300ab13c82da20e9c Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c(): Use LC_ALL if available Now that we have code that works on platforms with differing ways of representing LC_ALL, we can use it instead of looping through all the subcomponents. Commit: 6660d49c7c5bb319116b76f6d9d87b31760350b3 https://github.com/Perl/perl5/commit/6660d49c7c5bb319116b76f6d9d87b31760350b3 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M embed.fnc M embed.h M locale.c M proto.h Log Message: ----------- locale.c: Extract code into a function This is in preparation for a future commit where it will be called from more than one place. Commit: 9dee26e6fa525d9a6051e2e51538b922405762a9 https://github.com/Perl/perl5/commit/9dee26e6fa525d9a6051e2e51538b922405762a9 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M embed.fnc M embed.h M locale.c M proto.h Log Message: ----------- locale.c: Extract code into separate function This is in preparation for it being called from a second location in a future commit. Beyond the move, the only changes are to white space, and a PERL_UNUSED_ARG. Commit: e9d581278328047866139b78d7bdb86a5256c520 https://github.com/Perl/perl5/commit/e9d581278328047866139b78d7bdb86a5256c520 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Complement initialization of boolean This was my attempt to make the difference listing in the next commit smaller, but it didn't help much. Commit: add37e1ba08b187d544f49e7bbdafabe27c9311a https://github.com/Perl/perl5/commit/add37e1ba08b187d544f49e7bbdafabe27c9311a Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Rework locale initialization loop The previous code was always hard to understand, with a self-modifying loop. I finally figured out a clearer way to do it, by using an enum with all the possibilities, and a switch statement that sets up the loop for each, or decides this possibility isn't valid on this platform. The first possibility that works exits the loop. Commit: eaa7e6f9017c201b3321e392ca964b71c38b1705 https://github.com/Perl/perl5/commit/eaa7e6f9017c201b3321e392ca964b71c38b1705 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- f Commit: b71768682b4529eaa468d853fb7f7681aa88a573 https://github.com/Perl/perl5/commit/b71768682b4529eaa468d853fb7f7681aa88a573 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Rmv redundant sanity check This was done only on Windows, to verify that the perl was operating on a system that has a working _configthreadlocale(), when our Configure expects it to. But the previous commit now executes this function anyway at the endif of initialization, so that is soon enough to fail if something is wrong, making this redundant. Commit: 3594fb7b3832349ab6a8a308bc98eefea10447b6 https://github.com/Perl/perl5/commit/3594fb7b3832349ab6a8a308bc98eefea10447b6 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M utf8.h Log Message: ----------- silence utf8.h warning Commit: 8c0fa5e73d3f3140b9a214d5e1bfb7e75ee25ee3 https://github.com/Perl/perl5/commit/8c0fa5e73d3f3140b9a214d5e1bfb7e75ee25ee3 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Extract code into a macro This is in preparation for a simplification in future commits. Commit: 37e591fa2d28ccfed741ded59c549dbc2f52471b https://github.com/Perl/perl5/commit/37e591fa2d28ccfed741ded59c549dbc2f52471b Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Extend macro from previous commit Actually this creates a macro of the same name that accomplishes the same thing, but specifically for Windows. Commit: ef5b5d18c705a26a76f52f29bbe919e8b70574c1 https://github.com/Perl/perl5/commit/ef5b5d18c705a26a76f52f29bbe919e8b70574c1 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Don't over allocate array This previously added an extraneous unused element. Commit: 8d5a3a020f48a9cdadc5de8453d8e09a294a5366 https://github.com/Perl/perl5/commit/8d5a3a020f48a9cdadc5de8453d8e09a294a5366 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Bring declaration inside #if's This would now cause a compilation error if the code gets screwed up. Commit: abc531f1183e08e3875055eeb4ba0753d3a6cd7f https://github.com/Perl/perl5/commit/abc531f1183e08e3875055eeb4ba0753d3a6cd7f Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Slight refactor of switch_to_global_locale() Now that we can better handle any legal LC_ALL string, we can just use LC_ALL when available. Commit: 1c5429b44a727b663cc14f38bee5ed5b63e0aae1 https://github.com/Perl/perl5/commit/1c5429b44a727b663cc14f38bee5ed5b63e0aae1 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M embed.fnc M proto.h M utf8.c Log Message: ----------- Perl__byte_dump_string(): Properly handle NULL input Instead of an assert, this returns (nil) and things can proceed. Commit: 734ed0f7a06e277a014f1262cafb6807dd2e0284 https://github.com/Perl/perl5/commit/734ed0f7a06e277a014f1262cafb6807dd2e0284 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Combine two condiionals to rm special case The case removed is handled transparently below. Commit: b98d92dd592863b4dc0d0999c12ee5cbd3160c34 https://github.com/Perl/perl5/commit/b98d92dd592863b4dc0d0999c12ee5cbd3160c34 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- S_find_locale_from_environment(): Change var name This variable is really the LANG environment variable; change its name to correspond. Commit: 0348873882191cff26d89d641d9980953707bdc6 https://github.com/Perl/perl5/commit/0348873882191cff26d89d641d9980953707bdc6 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- S_find_locale_from_environment(): Add comments Commit: c609928bcd20411a45894ae9bb7b1ff93b9d992c https://github.com/Perl/perl5/commit/c609928bcd20411a45894ae9bb7b1ff93b9d992c Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- S_find_locale_from_environment(): Combine logic Prior to this commit, the logic was repeated for non-LC_ALL versus LC_ALL; the latter being executed in a loop. The logic is not really trivial and it would be better to have just one instance, so that it can't get out-of-sync. To do this, this commit moves everything to the loop, but sets it up for the non-LC_ALL case to just do a single iteration. It also avoids going out to the environment and fetching LANG unless needed. The previous behavior got LANG unconditionally if the loop was used. It is quite likely that not every locale category would have a corresponding environment variable set, so that fetch likely wasn't wasted. But in order to combine things, the checking for LANG is done in the loop. The bottom line is that there is extra code required to combine the two pieces of logic, but I believe the combining of this into a single paradigm is worth it. Commit: 768c9c22343795df45c1fbeb8ef5d720b84135b1 https://github.com/Perl/perl5/commit/768c9c22343795df45c1fbeb8ef5d720b84135b1 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- XXX tests; linux doesn't allow this: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 in Perl run with that environment: print POSIX::setlocale(LC_NUMERIC, ""); Commit: abba3c81580d0f3f40a8b09bbbe0deca33514f9c https://github.com/Perl/perl5/commit/abba3c81580d0f3f40a8b09bbbe0deca33514f9c Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M embed.fnc M locale.c M proto.h Log Message: ----------- Change parameter name for S_bool_setlocale_2008_i THe new name is more descriptive Commit: 448dbdb8b18930a14eb44c87a12a0b797426b947 https://github.com/Perl/perl5/commit/448dbdb8b18930a14eb44c87a12a0b797426b947 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- S_bool_setlocale_2008_i: Improve debug statements Commit: 85f9731c0243f77279f174e33e4a42b2c2f475c1 https://github.com/Perl/perl5/commit/85f9731c0243f77279f174e33e4a42b2c2f475c1 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- S_bool_setlocale_2008_i: Check for failure return Previously, this would forge ahead; looking at the code it seems it would fail later on anyway, but it is best to check and fail immediately. Commit: 4d571b240568498b05a8954ad53dba22b42de640 https://github.com/Perl/perl5/commit/4d571b240568498b05a8954ad53dba22b42de640 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- S_bool_setlocale_2008_i: Separate out failure code This causes the failure to be handled by going to effectively a tail-call spot. This is in preparation for it being used in another place. Commit: eba99086f3a6110d89f671c2a92795576095192f https://github.com/Perl/perl5/commit/eba99086f3a6110d89f671c2a92795576095192f Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Move declaration closer to first use Commit: 05dac1418a5fe0e8df04956e6a07cd367653319f https://github.com/Perl/perl5/commit/05dac1418a5fe0e8df04956e6a07cd367653319f Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Extract two debug statements into macros This is in preparation for them being called from other places Commit: c3a78a3a8cbb2c8d760839940d0725a7e45e22d1 https://github.com/Perl/perl5/commit/c3a78a3a8cbb2c8d760839940d0725a7e45e22d1 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Indent/outdent some lines This is to make the differences in the next commit smaller Commit: d026f2f91efe7a0899d97743033022f945dea618 https://github.com/Perl/perl5/commit/d026f2f91efe7a0899d97743033022f945dea618 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Rmv obsolete code A "" input locale has been expanded by the time it gets here, so this is never true; it is a relict from previous implementations. Commit: d419b073e141a58c75ecdc816aaec44bed5cbc02 https://github.com/Perl/perl5/commit/d419b073e141a58c75ecdc816aaec44bed5cbc02 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- S_bool_setlocale_2008_i: Copy function call. This removes a function call from a single place and inserts it in several. The reason is that it makes a future commit cleaner. Commit: e56b39a0242c5e9c22057a7150f719753576e97a https://github.com/Perl/perl5/commit/e56b39a0242c5e9c22057a7150f719753576e97a Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M embed.fnc M embed.h M locale.c M proto.h Log Message: ----------- S_update_PL_curlocales(): Add parameter This is the ultimate caller's line number, which will be useful in a future commit; unused for now. Commit: fda01be86a13fc09254340d8450493ab4dcca865 https://github.com/Perl/perl5/commit/fda01be86a13fc09254340d8450493ab4dcca865 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- S_update_PL_curlocales_i(): Reverse order of conditionals The new ordering will play better with future commits Commit: b5be1cf3a24f428c08da443949dec463a2cefc40 https://github.com/Perl/perl5/commit/b5be1cf3a24f428c08da443949dec463a2cefc40 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c M perl.h Log Message: ----------- locale.c: Update comments, white-space in 2 functions Commit: 492002ccaa5cd43201bf91a7eee61f6a21826d3d https://github.com/Perl/perl5/commit/492002ccaa5cd43201bf91a7eee61f6a21826d3d Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Avoid an (unlikely) leak As the comments say, this eventuality is unlikely to happen, but if it did, it would mean a leak. Commit: e4a293769ca5f8a6dfb73c64a189b366c661a4bf https://github.com/Perl/perl5/commit/e4a293769ca5f8a6dfb73c64a189b366c661a4bf Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- S_bool_setlocale_2008_i: Remove recursion This converts recursive calls of this function into an iterative loop. Besides the obvious benefits, some platforms don't even require a loop, as a future commit will do. Commit: 4433db98950253ddd7dfd3ec164d333e81878fb0 https://github.com/Perl/perl5/commit/4433db98950253ddd7dfd3ec164d333e81878fb0 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M embed.fnc M embed.h M locale.c M proto.h Log Message: ----------- Rmv unused function: S_setlocale_from_aggregate_LC_ALL Previous commits have removed all uses of this Commit: f0a6e346fc363f702bac229ca160ec86b1a2570f https://github.com/Perl/perl5/commit/f0a6e346fc363f702bac229ca160ec86b1a2570f Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M embed.fnc M embed.h M locale.c M perl.h M proto.h Log Message: ----------- S_parse_LC_ALL_string: Squash if categories are same locale It turns out that some platforms return something like C/C/C/C/C/C instead of just the equivalent 'C' when querying LC_ALL. This can lead to extra work for us, and unnecessary noise when displayed to the user. This commit changes parse_LC_ALL_string() to look for this case, and to coalesce the result to just the single value, which is returned in just the 0th element of the input array, leaving the other elements unused. It makes this behavior overridable by an input flag, which will be used in a future commit. Commit: 877b3305b897aa1b1119fea90cdd92a0d2652f43 https://github.com/Perl/perl5/commit/877b3305b897aa1b1119fea90cdd92a0d2652f43 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- S_update_PL_curlocales(): accept arbitrary LC_ALL string Prior to this commit, this function couldn't handle an LC_ALL string that wasn't just a single locale for all categories. But now that we can parse a disparate string, update this function to use that. Commit: 1f2ab58d91065ff3661d2af151884b975608c00b https://github.com/Perl/perl5/commit/1f2ab58d91065ff3661d2af151884b975608c00b Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- S_setlocale_2008_i(): Use single newlocale() if available On some platforms the newlocale() libc function when setting LC_ALL can handle an input locale that sets some categories to one thing; and others to another; etc. On such platforms, we don't have to loop through all categories individually. This commit changes to use that if the #define indicating its availability is set. Commit: aeb8ee0c9f4bfb135fc5e28d221118b72d99a06d https://github.com/Perl/perl5/commit/aeb8ee0c9f4bfb135fc5e28d221118b72d99a06d Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M embedvar.h M intrpvar.h M locale.c M makedef.pl M perl.c M sv.c Log Message: ----------- XXX Partial need vutil.c first Rmv underlying numeric This object, only on POSIX 2008 systems, is no longer used. I've been keeping it around in case I could figure out if it had any remaining utility, but don't see any. Commit: 3a0d918e1076793a898538fe662ec4a14efbfe3b https://github.com/Perl/perl5/commit/3a0d918e1076793a898538fe662ec4a14efbfe3b Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Use function already designed for the purpose Instead of several initialization calls, call the overarching one that includes them all. Commit: 4d07786a0aa8e5d8679d09dd1bd2fd184f13e08a https://github.com/Perl/perl5/commit/4d07786a0aa8e5d8679d09dd1bd2fd184f13e08a Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Avoid a duplicate conditional Commit: 2d0f1c386e7918382a5b709e706b13cc3b6164dc https://github.com/Perl/perl5/commit/2d0f1c386e7918382a5b709e706b13cc3b6164dc Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Initialize PL_cur_locale_obj Commit: 4b7cf682a0311999a0094618a2171119b49bed54 https://github.com/Perl/perl5/commit/4b7cf682a0311999a0094618a2171119b49bed54 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- XXX Initial guess as to newlocale() capability glibc has a newlocale() that can handle disparate LC_ALL string input. This commit is until more data is gathered. Commit: ea9314b0850e593dd84d56de1f7e645220ca011c https://github.com/Perl/perl5/commit/ea9314b0850e593dd84d56de1f7e645220ca011c Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M embed.fnc M embed.h M locale.c M perl.h M proto.h Log Message: ----------- Add caller location info to e.g. RESTORE_LC_NUMERIC These help pinpointing the error source when a failure occurs. Commit: 4a7a0c9da32cb321495950bdd871617646e87663 https://github.com/Perl/perl5/commit/4a7a0c9da32cb321495950bdd871617646e87663 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- XXX tests,delta: Handle glibc extra locale categories glibc has several locale categories not found in standards. This commit provides minimal support. Commit: 0167ad93f8c77af1d275af233829d292ce0a6740 https://github.com/Perl/perl5/commit/0167ad93f8c77af1d275af233829d292ce0a6740 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M embed.fnc M embed.h M locale.c M perl.h M proto.h Log Message: ----------- Properly handle ignored locale categories perl can be compiled to ignore arbitrary locale categories that are actually on the system. This has never worked transparently, especially on platforms that use postional notation to represent LC_ALL when not all categories are set to the same locale. The system calls will return a string containing the ignored category, and we dont know how to handle that. This large commit fixes that by compiling to include the information about all categories on the system. But if a category is to be ignored, instead we set it to the C locale, and thwart any effort to change it away from that locale. Commit: c071aa0322798182e8aba15bc54f44e57ef8672e https://github.com/Perl/perl5/commit/c071aa0322798182e8aba15bc54f44e57ef8672e Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- Revise warnings when locale init has issues Previously, we didn't know the possible locale categories on this system, so grepped through the environment outputting anything that begins with 'LC_'. But now we do know all of them, and can just use those. Commit: d03ca4c51ee46426c11f68cee0726fbf94d6050d https://github.com/Perl/perl5/commit/d03ca4c51ee46426c11f68cee0726fbf94d6050d Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M embed.fnc M embed.h M locale.c M proto.h Log Message: ----------- S_calculate_LC_ALL_string: Add parameter This parameter is set only when this function is being called by Perl_setlocale(). This is purely for performance It causes this function to use a particular buffer and avoid extra copying. Commit: 3488bebea6e2ed03a7cff3374aefe40a9b61a0d2 https://github.com/Perl/perl5/commit/3488bebea6e2ed03a7cff3374aefe40a9b61a0d2 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M embed.fnc M embed.h M locale.c M proto.h Log Message: ----------- XXX why not failing tests before this?Create S_native_querylocale_i() and use it This new function differs from the already existing plain querylocale_i() in that it returns in the platform's native format, instead of the internal=to-perl one. The internal one is used generally so that code doesn't have to cope with multiple possible formats. The format of the new locale in Perl_setlocale() is going to be in native format. We effectively translate it into our internal one at the input edge, and that is used thereafter. But until this commit, the translation back to native format at the output edge was incomplete. This mostly worked because native format differs from locale.c internal format in just two ways. One is the locale for LC_NUMERIC. perl keeps it generally in the C locale, except for brief intervals which higher level code specifies, when the real locale is swapped in. (Actually, this isn't quite true. If the real locale is indistinguishable from C as far as LC_NUMERIC goes, perl is happy to use it rather than C, so as to save swapping.) locale.c had the code in it to translate the internal format back to native, so it worked for this case. The other is LC_ALL when not all categories are set to the same locale. Windows and Linux use 'name=value;' pairs notation, while things derived from BSD (and others) use a positional notation in which only the values are given, and the system knows which category a given value is for from its position in the string. Perl worked fine for the name=value pairs notation, because that is the same as its internal one, so no translation got done, but until this commit, there were issues on positional platforms. This seldom got in the way since most people, if they set the locale at all, will just set it to some single 'foo'. What this commit effectively does is change Perl_setlocale() to return the value in the native format which the libc functions are expecting. This differs from what it used to return only on platforms which use the positional notation and only for LC_ALL when not all categories are set to the same locale. The new function subsumes much of the work previously done in Perl_setlocale(), and it is able to simplify some of that work. Commit: 7b0fbfd9670c63224d0fd8249d54bdea51cecaf5 https://github.com/Perl/perl5/commit/7b0fbfd9670c63224d0fd8249d54bdea51cecaf5 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M embed.fnc M embed.h M locale.c M proto.h Log Message: ----------- XXX why: locale.c: revise new_LC_ALL This is because we don't want to use querylocale which is expecting things to already be set up; instead pass what should happen to finish the setup. Commit: da10c81b4242b00dcf9079e7e2ded61aa2a24095 https://github.com/Perl/perl5/commit/da10c81b4242b00dcf9079e7e2ded61aa2a24095 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- f after testing Commit: 1f0899f6b2565b41b543d632a63a16434cf575c2 https://github.com/Perl/perl5/commit/1f0899f6b2565b41b543d632a63a16434cf575c2 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Remove no longer used macro Commit: e7763df0414ea20a9d9092ea433a1cce63c65371 https://github.com/Perl/perl5/commit/e7763df0414ea20a9d9092ea433a1cce63c65371 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- Add setlocale_i() This macro is defined on Configurations where a simple unadorned setlocale works for categories that don't have perl record keeping involved. This allows Perl_setlocale() to avoid a lot of unnecessary overhead for these. This commit defines it only for unthreaded perls. Commit: 5cd99bdee4137a745fb0c3925e5f86732b963583 https://github.com/Perl/perl5/commit/5cd99bdee4137a745fb0c3925e5f86732b963583 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Move S_update_PL_curlocales() Prior to this commit, it was only for POSIX 2008, but a future commit will want to use it when not POSIX 2008. Commit: 67596e9e6a5bc0a6fb5aea2b9f3e851fd26b5e31 https://github.com/Perl/perl5/commit/67596e9e6a5bc0a6fb5aea2b9f3e851fd26b5e31 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- savepv if threaded, unused I think Commit: 3aaf4c2505e268ac53888457d3c682a476052a82 https://github.com/Perl/perl5/commit/3aaf4c2505e268ac53888457d3c682a476052a82 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Rmv unexecuted statement after croak Commit: ef4b0a830ca39a4fb51ce14894482a940259ada6 https://github.com/Perl/perl5/commit/ef4b0a830ca39a4fb51ce14894482a940259ada6 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Improve collation debugging output This adds a special case for when the buffer is empty Commit: d12b188d60b9097e6293115e97a10f965d1e0b32 https://github.com/Perl/perl5/commit/d12b188d60b9097e6293115e97a10f965d1e0b32 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- XXX introductory file comments Commit: c8d47a82258024aba4478da4b372cd4d36c79414 https://github.com/Perl/perl5/commit/c8d47a82258024aba4478da4b372cd4d36c79414 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Only compile workaround on platforms needing it This code works around a bug on Windows with regard to localeconv(). And the bug only exists on such platforms that have thread-safety. Prior to this commit, the code was compiled on platforms lacking thread-safety, so was unnecessary. Commit: e9a0b1d6f80b9380130c525de0cdb1e18f5d05b9 https://github.com/Perl/perl5/commit/e9a0b1d6f80b9380130c525de0cdb1e18f5d05b9 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M intrpvar.h M locale.c Log Message: ----------- locale.c: Use wider than U32 for a counter Processes that change locales are incrementing a counter that could eventully wrap if the process is long-lived. It's not likely, but it's also easy to make this a U64 if available, and make the chances of it happening much closer to zero. Commit: d821163f8bbe2f20186873c97de6d947e9730127 https://github.com/Perl/perl5/commit/d821163f8bbe2f20186873c97de6d947e9730127 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Move setting errno out of critical section I doesn't matter much, but its better practice to make critical sections as small as possible. Commit: 119ecfd80cf9630a0f33304b2cc57c83eb48dc3c https://github.com/Perl/perl5/commit/119ecfd80cf9630a0f33304b2cc57c83eb48dc3c Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- get_win32_message_utf8ness() Fix unlikely case This function calls get_locale_string_utf8ness_i(). The API of that function changed earlier in the 5.37 series, and this was not updated to correspond. It is calling it with category 0, wich it thinks is an out-of-bounds value, but it really is LC_ALL on Windows. Thus it actually probably doesn't lead to a failure, but it theoretically could fail if LC_ALL is not uniform. So it's better to not succeed just by accident. This commit changes to now use LC_CTYPE as the category. And if someone has managed to compile Windows without LC_CTYPE, it now just says that the input string isn't UTF-8, as without LC_CTYPE, you've only got the C locale. Commit: 6caf45518bca0ededdb8b07d08afe2db7528521e https://github.com/Perl/perl5/commit/6caf45518bca0ededdb8b07d08afe2db7528521e Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Only define a structure if needed Without LC_NUMERIC, this structure is unused, and generates a compiler warning. Commit: c6377893a74745ebf0ab33be72f463f8fb888121 https://github.com/Perl/perl5/commit/c6377893a74745ebf0ab33be72f463f8fb888121 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 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: 976276e1c431ca456898829e1f5dfd5b74bfe4f8 https://github.com/Perl/perl5/commit/976276e1c431ca456898829e1f5dfd5b74bfe4f8 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- perlapi: Improve wording for Perl_langinfo() Commit: 2fc6ecaa721bc9f7d4f683176d3fcf9c8ead6932 https://github.com/Perl/perl5/commit/2fc6ecaa721bc9f7d4f683176d3fcf9c8ead6932 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Critical section around initializing a global This code should only have a race in the unlikely event that it is an embedded perl, and there is another perl already running. But best to avoid the possibility at all. Commit: 3375f6c2b5076f46af8fa91c95b1ccb2909282a2 https://github.com/Perl/perl5/commit/3375f6c2b5076f46af8fa91c95b1ccb2909282a2 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Move #ifdef DEBUGGING This moves it up to precede a block that only does debugging info. Commit: e6a8967b0002e263355df8c11e5bab63a620c5e0 https://github.com/Perl/perl5/commit/e6a8967b0002e263355df8c11e5bab63a620c5e0 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- S_stdize_locale: Set errno if fails Commit: 9475c1187e352deb2e4651ba29b86866cc118a49 https://github.com/Perl/perl5/commit/9475c1187e352deb2e4651ba29b86866cc118a49 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 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: 88feccf62202e9323222a748a671425d8c0d54ee https://github.com/Perl/perl5/commit/88feccf62202e9323222a748a671425d8c0d54ee Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M t/porting/bincompat.t Log Message: ----------- skip bincompat.t Commit: 62b12d27f578511f8932a82b44d282266d91bfcf https://github.com/Perl/perl5/commit/62b12d27f578511f8932a82b44d282266d91bfcf Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M hints/darwin.sh Log Message: ----------- darwin hints querylocale race in earlier darwins? Commit: 2e20d465ab5ec31928c4e41cfa50c6a61c158487 https://github.com/Perl/perl5/commit/2e20d465ab5ec31928c4e41cfa50c6a61c158487 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: make querylocale locking conditional Commit: ad46435ceee8d97636b852b2c8fbc10902552409 https://github.com/Perl/perl5/commit/ad46435ceee8d97636b852b2c8fbc10902552409 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M intrpvar.h Log Message: ----------- intrpvar.h: Comments Commit: a7b57f421c77d6a7720cec984c207c19ebf574ba https://github.com/Perl/perl5/commit/a7b57f421c77d6a7720cec984c207c19ebf574ba Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 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 proto.h M sv.c Log Message: ----------- emul Commit: 05cc8da4dff5414b9ba914bc83a0999774624062 https://github.com/Perl/perl5/commit/05cc8da4dff5414b9ba914bc83a0999774624062 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M embed.fnc M locale.c M proto.h Log Message: ----------- locale.c: Change to use enum type Instead of 'unsigned int', use the more restricted enum. Commit: 8ff06e2dc630c26c2ea7d39e09e2cabfa0ea11cc https://github.com/Perl/perl5/commit/8ff06e2dc630c26c2ea7d39e09e2cabfa0ea11cc Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M embed.fnc M embed.h M locale.c M proto.h Log Message: ----------- locale.c: Compile utf8ness on platforms that need it These two functions need to be compiled on certain other platforms than what was happening. Commit: 5ba3f0c82da65b4a88496488909a5919dcb791fd https://github.com/Perl/perl5/commit/5ba3f0c82da65b4a88496488909a5919dcb791fd Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Silence compiler warning on some platforms This argument isn't used on some platforms. Commit: 0ec752274d253173f5b64b5bf6fe042f3b1c8541 https://github.com/Perl/perl5/commit/0ec752274d253173f5b64b5bf6fe042f3b1c8541 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M Configure M locale.c M metaconfig.h M perl.h Log Message: ----------- f Configure Commit: c42fc058674b0491acbbbd39940fc7513fffa9a7 https://github.com/Perl/perl5/commit/c42fc058674b0491acbbbd39940fc7513fffa9a7 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M Configure M locale.c M metaconfig.h M perl.h Log Message: ----------- Revert "f Configure" This reverts commit 12d2cfd3fbf933bbbfb52a448d8bdda62f7ac100. Commit: d99780907f918861f9862bf4df0cf40a19ec99d9 https://github.com/Perl/perl5/commit/d99780907f918861f9862bf4df0cf40a19ec99d9 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M makedef.pl Log Message: ----------- drop when Configure fixed Commit: 9aa32d4efd46ae4d83775b98c5641e2b07dadc9d https://github.com/Perl/perl5/commit/9aa32d4efd46ae4d83775b98c5641e2b07dadc9d Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M makedef.pl Log Message: ----------- makedef.pl: PL_cur_locale_obj is only POSIX 2008 multiplicity Commit: 8da3f1331dabb555384ca5e54dbcec91a3fd817f https://github.com/Perl/perl5/commit/8da3f1331dabb555384ca5e54dbcec91a3fd817f Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M makedef.pl Log Message: ----------- makedef.pl: Move comment Commit: 730bd06bb1f22bfd0638a9f64e8b9424cd78fecb https://github.com/Perl/perl5/commit/730bd06bb1f22bfd0638a9f64e8b9424cd78fecb Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M makedef.pl Log Message: ----------- Maybe drop: makedef.pl: Move code Commit: 220c11edf05f1ddc9fee2d6f5eb9ca5726098341 https://github.com/Perl/perl5/commit/220c11edf05f1ddc9fee2d6f5eb9ca5726098341 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M makedef.pl Log Message: ----------- makedef.pl: Remove obsolete symbol Commit: 252835535b263f1e271ca1729aa513f3e12cec0a https://github.com/Perl/perl5/commit/252835535b263f1e271ca1729aa513f3e12cec0a Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M perl.h Log Message: ----------- Add DEBUG_SETLOCALE_INCONSISTENCIES Commit: 8fca193812e056fede7a3519f5f7d7f4c54db232 https://github.com/Perl/perl5/commit/8fca193812e056fede7a3519f5f7d7f4c54db232 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M perl.h Log Message: ----------- Fix mingw locale builds Experience has shown that mingw with an older runtime library doesn't have more modern Windows features working properly. This commit causes it to compile with workarounds, but allows the user to -Accflags='-DUCRT_USED' to indicate to Configure that the code will be using the modern CRT. Commit: 7ccf5a99e5cfc23c4c910440faef9807c3b7ffa7 https://github.com/Perl/perl5/commit/7ccf5a99e5cfc23c4c910440faef9807c3b7ffa7 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M perl.h Log Message: ----------- Enable DEBUG_SETLOCALE_INCONSISTENCIES Commit: baed39f13306cf78f567b32001059191412722cb https://github.com/Perl/perl5/commit/baed39f13306cf78f567b32001059191412722cb Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M perl.h Log Message: ----------- perl.h: Add detail to locale mutex debug Commit: de348c6668a3e2e8bb65cc23d5a658935488e929 https://github.com/Perl/perl5/commit/de348c6668a3e2e8bb65cc23d5a658935488e929 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c M perl.h Log Message: ----------- XXX remaining loose ends Commit: b90d3c7420c3a9e4525de10be55a01405b5b09df https://github.com/Perl/perl5/commit/b90d3c7420c3a9e4525de10be55a01405b5b09df Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M cpan/version/t/07locale.t M pod/perlembed.pod M t/porting/customized.dat Log Message: ----------- final commit Commit: 52b6d0fab0e512d1a0474c39c54cea72388d9e33 https://github.com/Perl/perl5/commit/52b6d0fab0e512d1a0474c39c54cea72388d9e33 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- use enum, maybe drop Commit: 5faa6263957b0ebd890acbc58ea487c2b73786f9 https://github.com/Perl/perl5/commit/5faa6263957b0ebd890acbc58ea487c2b73786f9 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- Revert "prev commit" This reverts commit 4be10ec67fb8fef94cb573a8f7b51cb23610517f. Commit: a1a85fc369bcd2554bf9c69853afeadf54493472 https://github.com/Perl/perl5/commit/a1a85fc369bcd2554bf9c69853afeadf54493472 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M embed.fnc M locale.c M proto.h Log Message: ----------- more cat index enum Commit: 1d84f3c2b8395c93381c26f7c1a1fc86707f8139 https://github.com/Perl/perl5/commit/1d84f3c2b8395c93381c26f7c1a1fc86707f8139 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M dist/Tie-File/t/29a_upcopy.t Log Message: ----------- XXX temp: dist/Tie-File/t/29a_upcopy.t: Up alarm Commit: ba4c33c2b52193e7769e6844df528e90459c6f9c https://github.com/Perl/perl5/commit/ba4c33c2b52193e7769e6844df528e90459c6f9c Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M perl.h Log Message: ----------- f Commit: fa8924cabf34a56dc36f0bd4164b41a1205de24d https://github.com/Perl/perl5/commit/fa8924cabf34a56dc36f0bd4164b41a1205de24d Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M perl.h Log Message: ----------- perl.h fixup Commit: b6b8e019b08fc59a3a68a606e28957eac9cdcd38 https://github.com/Perl/perl5/commit/b6b8e019b08fc59a3a68a606e28957eac9cdcd38 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M Configure Log Message: ----------- f Configure for positional Commit: 694f7641e046f65ceac72d5a83ff46ddd73a6b88 https://github.com/Perl/perl5/commit/694f7641e046f65ceac72d5a83ff46ddd73a6b88 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- fixup init for C C C C C Commit: 3b126e8d172e7ce62d6755ff6aa270caa7a04d84 https://github.com/Perl/perl5/commit/3b126e8d172e7ce62d6755ff6aa270caa7a04d84 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- perlapi: Fix strftime inaccuracies, clarify Commit: 4e8e7b75cddc7d9081f7575c643bc34423d380da https://github.com/Perl/perl5/commit/4e8e7b75cddc7d9081f7575c643bc34423d380da Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- Set errno when my_strftime() fails. The libc strftime() doesn't have any way to distinguish between erroneous input and that which just doesn't generate any output; hence it doesn't set errno. But my_strftime() has logic to reasonably confidently make that distinction, so it should set errno when it determines that it is erroneous input. Commit: 965f0c8c6150f9753cf2c0fdae4b3e74c94ad9ab https://github.com/Perl/perl5/commit/965f0c8c6150f9753cf2c0fdae4b3e74c94ad9ab Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M embed.fnc M embed.h M locale.c M proto.h Log Message: ----------- add is_cur_locale_utf8 Commit: 84f8711826df810cf9c0be1ded3855e0da689085 https://github.com/Perl/perl5/commit/84f8711826df810cf9c0be1ded3855e0da689085 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Simplify S_new_ctype By creating a temporary variable, an else is eliminated, and the lock/unlock are brought close together. Commit: 5c459b6072fca5e370f607476826c8258f312c0a https://github.com/Perl/perl5/commit/5c459b6072fca5e370f607476826c8258f312c0a Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M dist/threads/threads.xs M embed.fnc M locale.c M perl.h M proto.h M util.c M win32/win32thread.c Log Message: ----------- switch_locale_context: Add aTHX This fixes GH #21040 Instead of a dTHX, this passes aTHX automatically, and skips calling this function if there is no valid context. It moves that decision into the macro itself, avoiding some #ifdef directives. And it adds explanation f Commit: 000280fcc1c534142ef5acfa51b68d31da70c47c https://github.com/Perl/perl5/commit/000280fcc1c534142ef5acfa51b68d31da70c47c Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- strftime: Always restore LC_CTYPE locale my_strftime toggles LC_CTYPE to match LC_TIME to avoid mojibake. In reading the code, I realized that there was a code path that doesn't properly restore it, namely when failure is returned. This commit fixes that. Commit: 31dbf5af0082ec991b50942db25921585fb9b9f5 https://github.com/Perl/perl5/commit/31dbf5af0082ec991b50942db25921585fb9b9f5 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 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: 75fdf51f8b4bb46d09bdbfcc8746470f895cce7b https://github.com/Perl/perl5/commit/75fdf51f8b4bb46d09bdbfcc8746470f895cce7b Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M cpan/Time-Piece/Piece.xs Log Message: ----------- Time-Piece: Use foldEQ_locale() if available This supported core function 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 substituted, but far better than nothing. Commit: 3d5e58528b07111c148ecc38ec0581994be4bced https://github.com/Perl/perl5/commit/3d5e58528b07111c148ecc38ec0581994be4bced Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 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: 9489fceffd9bc1cff3930ab88c109c7ee3fc3c41 https://github.com/Perl/perl5/commit/9489fceffd9bc1cff3930ab88c109c7ee3fc3c41 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Don't compile unreachable code This code is attempting to compute the nl_langinfo() codeset of the current locale. If there is no LC_CTYPE available on the system, the codeset must be 'C', and the only callers to this static function know that, and return that answer without calling this function. That means this part of the function will never be executed. So don't compile it. Commit: 9e7ae556a11c3a7f53e91dc5d07f8ffd953f6b46 https://github.com/Perl/perl5/commit/9e7ae556a11c3a7f53e91dc5d07f8ffd953f6b46 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M embedvar.h M intrpvar.h M locale.c M makedef.pl Log Message: ----------- locale.c: Prevent infinite recursion This could happen on the very rare platform that isn't Windows, nor supports nl_langinfo(), and has a buggy (or non-existent) mbtowc(). The code implements nl_langinfo() itself by recursion, and for some locales could end up recursing indefinitely. This commit adds guards to prevent that. Commit: b5ca718dc7d9bc9c0094f58639e53f33616987b4 https://github.com/Perl/perl5/commit/b5ca718dc7d9bc9c0094f58639e53f33616987b4 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M perl.h Log Message: ----------- perl.h: Add DISABLE_LC_NUMERIC_CHANGES macro This is for code that needs to keep other code from changing LC_NUMERIC out from under it, but avoids the knowledge of PL_numeric_standard, which is used when perl controls the locale handling. This is designed for 'version' (vutil.c) to use, because it has to operate seamlessly in the mode where perl controls the handling, and when it doesn't, even if it doesn't know it doesn't. Commit: fd8fd57eae20f8b77fa9e325144b89d6916d9acf https://github.com/Perl/perl5/commit/fd8fd57eae20f8b77fa9e325144b89d6916d9acf Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M perl.h Log Message: ----------- perl.h: Remove extraneous ';' Commit: d373e878f8635ed3585c147f85948cfc7643c268 https://github.com/Perl/perl5/commit/d373e878f8635ed3585c147f85948cfc7643c268 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M dist/threads/threads.xs Log Message: ----------- XXX threads.xs: Move #ifdef to beginning of file XXX saves an interior ifdef, but unsure if worth it. Commit: 952321f61a2f1b88169bb1cb0528f30223ff03e7 https://github.com/Perl/perl5/commit/952321f61a2f1b88169bb1cb0528f30223ff03e7 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M perl.h Log Message: ----------- perl.h: localeconv() isn't broken on Windows unthreaded Nor is it broken if compiled without per-thread locale handling. The bug in it until VS 2015 was that it always looked at the global locale. When the only locale available is the global one, there is not breakage. This commit thus avoids compiling workaround code for the bug when it isn't necessary. Commit: fe4333608b51891d9a5b066200da846018c9b5f6 https://github.com/Perl/perl5/commit/fe4333608b51891d9a5b066200da846018c9b5f6 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M thread.h Log Message: ----------- thread.h: White space only Indent some nested preproccessor defines Commit: aab454950e48018282c606b1709333dcdf246a0c https://github.com/Perl/perl5/commit/aab454950e48018282c606b1709333dcdf246a0c Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M win32/Makefile Log Message: ----------- win32 perl mem log Commit: 6ea3f9169d2fb56056091291d20cbd6600f0b5fd https://github.com/Perl/perl5/commit/6ea3f9169d2fb56056091291d20cbd6600f0b5fd Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M ext/POSIX/t/time.t Log Message: ----------- time.t Commit: 9fae600dc8d2819fb5ef3d2b62dafb51263c0241 https://github.com/Perl/perl5/commit/9fae600dc8d2819fb5ef3d2b62dafb51263c0241 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M ext/POSIX/t/time.t Log Message: ----------- POSIX/t/time.t: Remove no longer necessary code POSIX::strftime() now automatically handles the case where the locales of LC_TIME and LC_CTYPE aren't the same. So no need to explicitly do this in the test file. Commit: 6153124e016c03ea33a887556c58ac12ca0ee255 https://github.com/Perl/perl5/commit/6153124e016c03ea33a887556c58ac12ca0ee255 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M ext/POSIX/t/time.t Log Message: ----------- XXX see how affects earlier commits: time.t: Add more strftime tests Commit: e568dea35dce8dead9c08d7d64e622b3b0c0596c https://github.com/Perl/perl5/commit/e568dea35dce8dead9c08d7d64e622b3b0c0596c Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M embed.fnc M embed.h M locale.c M proto.h Log Message: ----------- locale.c: Split my_strftime into 2 functions Future commits will want the individual functionality the two provided separately. Commit: 3d5a529932d2cef1f1c4aa180aefb67c115aaebe https://github.com/Perl/perl5/commit/3d5a529932d2cef1f1c4aa180aefb67c115aaebe Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Move my_strftime() within the file This will be more logically placed after future commits Commit: 3685df639211e7dd9bdbb00acfc1665441628d6c https://github.com/Perl/perl5/commit/3685df639211e7dd9bdbb00acfc1665441628d6c Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M embed.fnc M embed.h M ext/POSIX/POSIX.xs M locale.c M proto.h Log Message: ----------- Implement sv_strftime_tm and sv_strftime_ints These two functions are designed to free the caller from having to know anything about the intricacies of handling UTF-8 in using strftime(), as they take SV inputs and return an SV with the UTF-8 flag appropriately set. They differ only in that one takes a bunch of integer arguments that define the various components of the time; and the other takes a pointer to a struct tm. The POSIX implementation of strftime is converted to use these. Commit: cd2020260f0e4cc299d5634f5a9d0a7d0986b641 https://github.com/Perl/perl5/commit/cd2020260f0e4cc299d5634f5a9d0a7d0986b641 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 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: 72227c993e5c0d24294764e819b079b87fef0aa0 https://github.com/Perl/perl5/commit/72227c993e5c0d24294764e819b079b87fef0aa0 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M cpan/Time-Piece/Piece.xs Log Message: ----------- Implement sv_strftime_tm and sv_strftime_ints These two functions are designed to free the caller from having to know anything about the intricacies of handling UTF-8 in using strftime(), as they take SV inputs and return an SV with the UTF-8 flag appropriately set. They differ only in that one takes a bunch of integer arguments that define the various components of the time; and the other takes a pointer to a struct tm. The POSIX implementation of strftime is converted to use these. Commit: 1686a399b499e442176693e7b9ec5ba0cf606950 https://github.com/Perl/perl5/commit/1686a399b499e442176693e7b9ec5ba0cf606950 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- S_get_locale_string_utf8ness_i: Fix return If the input is NULL, the utf8ness of the string isn't NO, but actually, IMMATERIAL, as there is nothing there that matters Commit: 40f34fe9fe43976225e23fb126ed460bf27135d1 https://github.com/Perl/perl5/commit/40f34fe9fe43976225e23fb126ed460bf27135d1 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Avoid work that would be thrown away If the caller to this function doesn't care about the UTF-8ness of the result, no need to calculate it. Commit: d803a6365227461815e29a33777e9ed2e628343e https://github.com/Perl/perl5/commit/d803a6365227461815e29a33777e9ed2e628343e Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M intrpvar.h M locale.c M makedef.pl M sv.c M util.c Log Message: ----------- Attempts to fix windows free pool panic Commit: dc094358c882fa0e01e26d94ae095901bfd9fe7b https://github.com/Perl/perl5/commit/dc094358c882fa0e01e26d94ae095901bfd9fe7b Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M cpan/Time-Piece/Piece.xs Log Message: ----------- Time-Piece: notes to myself Commit: 575239445d4b89ffe9a3b7562cf8b4dad9c4441e https://github.com/Perl/perl5/commit/575239445d4b89ffe9a3b7562cf8b4dad9c4441e Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M locale.c Log Message: ----------- dregs Commit: 8ecdcc2c4676650b66d719136c2ebaa811399331 https://github.com/Perl/perl5/commit/8ecdcc2c4676650b66d719136c2ebaa811399331 Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 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: 19c3e0e2a83a363d7d28df86f418e1360c6b6b4b https://github.com/Perl/perl5/commit/19c3e0e2a83a363d7d28df86f418e1360c6b6b4b Author: Karl Williamson <k...@cpan.org> Date: 2023-05-22 (Mon, 22 May 2023) Changed paths: M t/loc_tools.pl Log Message: ----------- loc_tools Compare: https://github.com/Perl/perl5/compare/7fd25e6d2256...19c3e0e2a83a