develooper Front page | perl.perl5.changes | Postings from March 2021

[Perl/perl5] 91ef5c: Add ability to easily add info to DEBUG output

From:
Karl Williamson via perl5-changes
Date:
March 16, 2021 04:57
Subject:
[Perl/perl5] 91ef5c: Add ability to easily add info to DEBUG output
Message ID:
Perl/perl5/push/refs/heads/smoke-me/khw-locale/3a23ab-12ea85@github.com
  Branch: refs/heads/smoke-me/khw-locale
  Home:   https://github.com/Perl/perl5
  Commit: 91ef5ca6cee4b24ae294096b6341bf18f2f9d87e
      https://github.com/Perl/perl5/commit/91ef5ca6cee4b24ae294096b6341bf18f2f9d87e
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M perl.h

  Log Message:
  -----------
  Add ability to easily add info to DEBUG output

This commit adds two macros that a user can define and recompile Perl to
get every active DEBUG statement to do some thing beyond what it would
normally do.

This allows someone to recompile Perl when they need to delve deeper
into fixing a bug without otherwise increasing memory use or slowing
execution.


  Commit: d35e1bdec4400b002bb734e533c2d8dbe0f5cf3f
      https://github.com/Perl/perl5/commit/d35e1bdec4400b002bb734e533c2d8dbe0f5cf3f
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M dosish.h
    M unixish.h

  Log Message:
  -----------
  Unixish.h, doshish.h: Reorder terminations; simplify

The IO and memory terminations need to be after other things.  Add a
comment so that future maintainers won't make the mistakes I did.

Also refactor to that amiga os doesn't have a separate list to get out
of sync

I suspect that the amiga termination should be moved to earlier in
the sequence, but absent any evidence; I'm leaving it unchanged.


  Commit: 87ee6f885dc31b64b9c60d5f7003e157a55d2831
      https://github.com/Perl/perl5/commit/87ee6f885dc31b64b9c60d5f7003e157a55d2831
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M t/loc_tools.pl

  Log Message:
  -----------
  loc_tools.pl: Fix valid_categories calculation

This function was returning the locale categories known to the platform;
it should exclude those that perl has been compiled to ignore.


  Commit: 3203026a9c219593b1a4347bbab3fde594f1d372
      https://github.com/Perl/perl5/commit/3203026a9c219593b1a4347bbab3fde594f1d372
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M mg.c

  Log Message:
  -----------
  XXX better message: mg.c: Silence compiler warning


  Commit: ac06218fe9215316d4c5997de4af4fa3f9c5645e
      https://github.com/Perl/perl5/commit/ac06218fe9215316d4c5997de4af4fa3f9c5645e
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Win32: Don't check folds validity

This code will check, when warnings are on, that the libc functions
return valid values.  But we Windows platforms will always fail because
they have multiple divergences from the Posix standard.  The macros that
implement the case changing/folding in handy.h take extra steps to bring
Windows code more into alignment with Posix.  Those are too complicated
to easily reproduce here.  The result of these checks is looked at by
our test suite, which has long, without anyone noticing, skipped
portions on Windows, even though handy.h should correct for this.  So
simply, don't do the checking under Windows, and find out what handy.h
has failed to fully correct for.


  Commit: 6fa3f288b90dc91b0d75d1b84334553d708a8dea
      https://github.com/Perl/perl5/commit/6fa3f288b90dc91b0d75d1b84334553d708a8dea
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M lib/locale_threads.t

  Log Message:
  -----------
  XXX locale_threads


  Commit: 02cba6aa2878af6c029ead02dcc2c3dca6d2456d
      https://github.com/Perl/perl5/commit/02cba6aa2878af6c029ead02dcc2c3dca6d2456d
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c
    M perl.h

  Log Message:
  -----------
  DEBUG_L now also looks at environment variable

Because locale initialization happens before command line processing,
one can't pass a -DL argument to enable debugging of locale
initialization.  Instead, an environment variable is read then, and is
used to enable debugging or not.  In the past, code specifically had to
test for this being set.  This commit changes that so that debugging can
automatically be enabled without having to write special code.  Future
commits will strip out those special checks.


  Commit: 7a2b1c64fb3740337426c0b65483fee6826f885f
      https://github.com/Perl/perl5/commit/7a2b1c64fb3740337426c0b65483fee6826f885f
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Replace most #ifdef DEBUGGING lines

THe previous commit enhanced the DEBUG macros so that they contain the
logic that previously had to be done with conditional compilation
statements.  Removing them makes the code easier to read.


  Commit: 71bf6631fb3bf93f8a52b741fe6e118931e8aecd
      https://github.com/Perl/perl5/commit/71bf6631fb3bf93f8a52b741fe6e118931e8aecd
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M handy.h
    M numeric.c
    M regcomp.c
    M regexec.c
    M utfebcdic.h

  Log Message:
  -----------
  Change macro names to be C standard conformant

C reserves symbols beginning with underscores for its own use.  This
commit moves the underscore so it is trailing, which is legal.  The
symbols changed here are most of the ones in handy.h that have few uses
outside it.


  Commit: fa868f1c6ec0d2e3c73f79d6b66299fece78fa98
      https://github.com/Perl/perl5/commit/fa868f1c6ec0d2e3c73f79d6b66299fece78fa98
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M handy.h

  Log Message:
  -----------
  handy.h: Refactor some #ifdef's for commonality

This changes these compilation conditionals so that things in common
between Windows and other platforms are only defined once.

It changes the isWORDCHAR_LC definition for non-Windows to match that
platform, adding an UNLIKELY().


  Commit: 97f85ded02d50f3ec8105806581a0b2583731f45
      https://github.com/Perl/perl5/commit/97f85ded02d50f3ec8105806581a0b2583731f45
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M handy.h

  Log Message:
  -----------
  handy.h: White-space, comment only


  Commit: a468f3ab602aa4637385c72bb2447ee1d51dd686
      https://github.com/Perl/perl5/commit/a468f3ab602aa4637385c72bb2447ee1d51dd686
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M handy.h

  Log Message:
  -----------
  handy.h: Remove only call to an internal macro

Replace isIDFIRST_LC  with a slightly faster implementation, in line
with what isWORDCHAR already does


  Commit: 90b4ac389bec4dd113c3880004573d4789869317
      https://github.com/Perl/perl5/commit/90b4ac389bec4dd113c3880004573d4789869317
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M charclass_invlists.h
    M handy.h
    M l1_char_class_tab.h
    M lib/unicore/uni_keywords.pl
    M perl.c
    M perl.h
    M regcomp.c
    M regcomp.h
    M regen/mk_PL_charclass.pl
    M regexec.c
    M sv.c
    M uni_keywords.h
    M utfebcdic.h

  Log Message:
  -----------
  Change macro names to be C standard conformant

C reserves symbols beginning with underscores for its own use.  This
commit moves the underscore so it is trailing, which is legal.  The
symbols changed here are many of the ones in handy.h that have
significant uses outside it.


  Commit: c4466da4e384e7ba402c6e302f6608169509b4e8
      https://github.com/Perl/perl5/commit/c4466da4e384e7ba402c6e302f6608169509b4e8
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M handy.h

  Log Message:
  -----------
  handy.h: Rmv unneeded generality

The possible first character of an ID is always an alpha in the range
0-255, so there is no harm changing from the former to the latter.  And
future changes would otherwise have needed an extra parameter in a bunch
of macros.


  Commit: f380ed6d0f87ed902d4936c9dce6ecc5ee3f3570
      https://github.com/Perl/perl5/commit/f380ed6d0f87ed902d4936c9dce6ecc5ee3f3570
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M handy.h

  Log Message:
  -----------
  handy.h: Don't special case isASCII_LC

This was an attempt to save instructions, but future commits will need
the generality


  Commit: 8a7a04e6b232ad2ba790cf9c9416566169c8e77e
      https://github.com/Perl/perl5/commit/8a7a04e6b232ad2ba790cf9c9416566169c8e77e
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M handy.h

  Log Message:
  -----------
  handy.h: Refactor some internal macros

This changes the parameters etc, in preparation for further changes


  Commit: 7b80ce30ddf17e4fe19a4ad301a2d048c585dc70
      https://github.com/Perl/perl5/commit/7b80ce30ddf17e4fe19a4ad301a2d048c585dc70
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M embed.fnc
    M embed.h
    M globvar.sym
    M handy.h
    M inline.h
    M perl.h
    M proto.h
    M regexec.c

  Log Message:
  -----------
  regexec.c: Use function call table to streamline code

This replaces a switch() statement with a function pointer table.  But
the main reason I'm doing this is for future functionality.


  Commit: 2905d5df874baaee31477d75c7afc3a76ddfebf3
      https://github.com/Perl/perl5/commit/2905d5df874baaee31477d75c7afc3a76ddfebf3
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Declare three static arrays to be so.


  Commit: 5bc85764d8a6a2c9f1a510f7090c5dadc9d892c9
      https://github.com/Perl/perl5/commit/5bc85764d8a6a2c9f1a510f7090c5dadc9d892c9
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c
    M perl.h

  Log Message:
  -----------
  Move some locale.c #defines to perl.h

This is in preparation for them to be used in macros from outside
locale.c


  Commit: b01742a8c372d2e4f07c96fec8696c70873f250c
      https://github.com/Perl/perl5/commit/b01742a8c372d2e4f07c96fec8696c70873f250c
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c
    M perl.h

  Log Message:
  -----------
  Mark newly moved symbols as private

The previous commit made certain symbols that previously were local to
locale.c now available everywhere.  Add a trailing underscore to their
names to mark them as private.


  Commit: d6a1801e10ef3d8ff1e084a0bc374d4f3f32c234
      https://github.com/Perl/perl5/commit/d6a1801e10ef3d8ff1e084a0bc374d4f3f32c234
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c
    M makedef.pl
    M perl.h

  Log Message:
  -----------
  Add USE_LOCALE_THREADS #define

This is in preparation for supporting configurations where there threads
are available, but the locale handling code should ignore that fact.

This stems from the unusual locale handling of z/OS, where any attempt
is ignored to change locales after the first thread is created.


  Commit: a9b42d00a0265197a44bd2758ddd023d93090644
      https://github.com/Perl/perl5/commit/a9b42d00a0265197a44bd2758ddd023d93090644
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M ext/POSIX/POSIX.xs
    M ext/POSIX/lib/POSIX.pm
    M intrpvar.h
    M locale.c
    M makedef.pl
    M perl.c
    M perl.h
    M sv.c

  Log Message:
  -----------
  Regularize HAS_POSIX_2008_LOCALE, USE_POSIX_2008_LOCALE

A platform shouldn't be required to use the Posix 2008 locale handling
functions if they are present.  Perhaps they are buggy.  So, a separate
define for using them was introduced, USE_POSIX_2008_LOCALE.  But until
this commit there were cases that were looking at the underlying
availability of the functions, not if the Configuration called for their
use.


  Commit: db2282f5bb76ad409db0cc8e59a5c7d93e7a30f2
      https://github.com/Perl/perl5/commit/db2282f5bb76ad409db0cc8e59a5c7d93e7a30f2
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Change macro name

Adopt the git convention of 'porcelain' meaning without special
handling.  This makes it clear that porcelain_setlocale  macro is the
base level.


  Commit: f1c193287aafbbcebc9f6fd2aad61b0c3fffc177
      https://github.com/Perl/perl5/commit/f1c193287aafbbcebc9f6fd2aad61b0c3fffc177
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Cast return of setlocale() to const

If they had it to do over again, the libc makers would have made the
return of this function 'const char *'.  We can cast it that way
internally to catch erroneous uses at compile time.


  Commit: 7bfb9d9cba7afd72aaafdfca23d871c151627b5c
      https://github.com/Perl/perl5/commit/7bfb9d9cba7afd72aaafdfca23d871c151627b5c
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M embed.fnc
    M embed.h
    M locale.c
    M proto.h

  Log Message:
  -----------
  locale.c: Create S_get_category_index()

libc locale categories, like LC_NUMERIC, are opaque integers.  This
makes it inconvenient to have table-driven code.  Instead, we have
tables that are indexed by small positive integers, which are a
compile-time mapping from the libc values.

This commit creates a run-time function to also do that mapping.  It
will first be used in the next commit.

The function does a loop through the available categories, looking for a
match.  It could be replaced by some sort of quick hash lookup, but the
largest arrays in the field have a max of 12 elements, with almost all
searches finding their quarry in the first 6.  It doesn't seem
worthwhile to me to replace a linear search of 6 elements by something
more complicated.  The design intent is this search will be used only at
the edgest of the locale-handling code; once found the index is used in
future bits of the current operation.


  Commit: d7cb8926f724a7142454fe46a08debf5c9df150c
      https://github.com/Perl/perl5/commit/d7cb8926f724a7142454fe46a08debf5c9df150c
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M embed.fnc
    M embed.h
    M locale.c
    M proto.h

  Log Message:
  -----------
  locale.c: Use get_category_index()

This creates the first uses of the function added in the previous commit.

It changes the name of a function that now takes an index to have the
suffix _i to indicate its calling parameter is a category index rather
than a category.  This will become a common paradigm in this file in
later commits.

Two macros are also created to call that function; they have suffixes _c
(to indicate the parameter is a category known at compile time, and _r
(to indicate it needs to be computed at runtime).  This is in keeping
with the already existing paradigm in this file.


  Commit: 030beaffe224eaa882721fc46d9d0d93e86f726d
      https://github.com/Perl/perl5/commit/030beaffe224eaa882721fc46d9d0d93e86f726d
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M embed.fnc
    M embed.h
    M locale.c
    M proto.h

  Log Message:
  -----------
  locale.c: Change S_emulate_setlocale name and sig

It turns out this function is called only from places where we have the
category index already computed; so change the signature to use the
index and remove the re-calculation.

It renames it to emulate_setlocale_i() to indicate that the category
parameter is an index.

This also means, that it's very unlikely that it will be called with an
out-of-bounds value.  Remove the debugging statement for that case (but
retain the error return value).


  Commit: 81bdec3b73a6abb344708d03f36808920d2911cc
      https://github.com/Perl/perl5/commit/81bdec3b73a6abb344708d03f36808920d2911cc
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Use nocontext; avoid rarely needed dTHX

This is a rare case; no point in doing a dTHX just for it.


  Commit: 1fb7ef022195e6e4edda052e6097bd38cfaa00a5
      https://github.com/Perl/perl5/commit/1fb7ef022195e6e4edda052e6097bd38cfaa00a5
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c
    M pod/perldelta.pod
    M pod/perldiag.pod

  Log Message:
  -----------
  locale.c: Simplify S_category_name

We can use the new function S_get_category_index() to simplify this.
Also, when I wrote it I didn't know about Perl_form(), and had
reimplemented a portion of it here; which is yanked as well.


  Commit: 6a6e3a4139a629e578ae2c3591f8b709bf545c8a
      https://github.com/Perl/perl5/commit/6a6e3a4139a629e578ae2c3591f8b709bf545c8a
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Move unreachable code

It turns out this code, setting errno, is unreachable.  Move it to the
place where it would do some good, removing an extraneous, unreachable
return;


  Commit: ff880548d9f5d16516487ef3bf9c2f563252b07e
      https://github.com/Perl/perl5/commit/ff880548d9f5d16516487ef3bf9c2f563252b07e
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Comment clarifications, white space

Some of these are to make future difference listings shorter

Some of the changes look like incorrect indentation here, but anticipate
future commits.


  Commit: fed8cad7d97a4affe3e5fac9152dc8eb8869e789
      https://github.com/Perl/perl5/commit/fed8cad7d97a4affe3e5fac9152dc8eb8869e789
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M embed.fnc
    M embed.h
    M locale.c
    M proto.h

  Log Message:
  -----------
  locale.c: Separate query part of emulate_setlocale()

This splits a large function so that it is easier to comprehend, and is
in preparation for them to be separately callable.


  Commit: d2b736615e18331ea4254da6ca81370c7f9b3f20
      https://github.com/Perl/perl5/commit/d2b736615e18331ea4254da6ca81370c7f9b3f20
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Remove spaces around a '##' preprocessor directive

It turns out that at least my gcc preprocessor gets confused in some
contexts if spaces surround the ##.  CAT2() doesn't work for these.

It is working in this context, but future commits will introduce ones
where it won't, so this commit will help make things consistent within
this file

What seems to fail is #define f(x) (..., g(x ## y), ...) where 'x' is a
an already #defined symbol.  I want 'xy', but instead, for example if
'x' has been defined to be 1, I get '1y'


  Commit: a376b815e408c54b83350a6705d516f481ca7eba
      https://github.com/Perl/perl5/commit/a376b815e408c54b83350a6705d516f481ca7eba
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: #define some macros in terms of a base one

This is so changes to the lowest level automatically propagate to the
others


  Commit: 0aa5f95c018cbcd658e79efaa49ee06ec2f1047f
      https://github.com/Perl/perl5/commit/0aa5f95c018cbcd658e79efaa49ee06ec2f1047f
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Create new macros for just querying locale

There are two sets of names, which immediately indicate if the result
can be relied on to be thread level or must be assumed to be global to
the whole process.  At the moment they all expand to the same thing,
since on a threadless perl, it's a don't care; and on a threaded perl,
they are all already thread-level, in the Configurations we support.

Future commits will cause the macros to diverge, and comments will be
added then.

For POSIX 2008, this commit causes queries to go directly to the query
function, avoiding S_emulate_setlocale_i() completely.


  Commit: 1c8009f8d66de08b7e91ce7fcddf3e0003527c4d
      https://github.com/Perl/perl5/commit/1c8009f8d66de08b7e91ce7fcddf3e0003527c4d
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Generalize certain Win32 calls

The old versions were windows-specific; the changes use a more generic
macro that currently expands to the same thing, but future commits will
change that.


  Commit: 437f8f728f959f0624d452f8be2ad74487ad42c8
      https://github.com/Perl/perl5/commit/437f8f728f959f0624d452f8be2ad74487ad42c8
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Add a convenience #define

This makes it clear if we are using an array that currently only happens
on non-querylocale systems, but that will change in future commits.


  Commit: 9c7aaec506347b402ca2ad61729e340eb0900ee0
      https://github.com/Perl/perl5/commit/9c7aaec506347b402ca2ad61729e340eb0900ee0
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Add setlocale() return context macros

Future commits will benefit from knowing if the return value of
setlocale is to be ignored, just checked for if it worked, or the full
value is needed and can be relied on (or not) to be per-thread.


  Commit: ea1058c86131397a640b804ab733830fff8d2ee7
      https://github.com/Perl/perl5/commit/ea1058c86131397a640b804ab733830fff8d2ee7
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M embed.fnc
    M embed.h
    M locale.c
    M proto.h

  Log Message:
  -----------
  locale.c: Add panic check/message

This panic is done when a setlocale unexpectedly fails.


  Commit: 074b79910f3f37cb4b636da5189ac329156fdfc8
      https://github.com/Perl/perl5/commit/074b79910f3f37cb4b636da5189ac329156fdfc8
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M embed.fnc
    M embed.h
    M locale.c
    M proto.h

  Log Message:
  -----------
  locale.c: Use a function table to simplify code

Some locale categories require extra steps when they are changed.  This
moves that logic to a table, which gets rid of some code


  Commit: 4e9b567b3a3e2f7fea701e4e8aaa6943f9d3c9b1
      https://github.com/Perl/perl5/commit/4e9b567b3a3e2f7fea701e4e8aaa6943f9d3c9b1
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  Perl_setlocale(): Same code for all param2 == NULL

Calling Perl_setlocale() with a NULL 2nd parameter returns the current
locale, rather than changing it.  Previously LC_NUMERIC and LC_ALL were
treated specially; other categories were lumped in with the code that
changes the locale.

Changing some categories involves a non-trivial amount of work.  This
commit avoids that by moving all queries to the same 'if' branch.
LC_NUMERIC and LC_ALL still have to be treated specially, but now it's
all within the same outer 'if', and the unnecessarily executing code
for when the locale changes is avoided.


  Commit: 5af915d37f5eaf37515f5e8223cb5b160827ae7a
      https://github.com/Perl/perl5/commit/5af915d37f5eaf37515f5e8223cb5b160827ae7a
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Use low level macros at low level

Implementing Perl_setlocale, we can safely use the internal macros that
the public ones expand to call, without the overhead those public macros
impose (which they do to be more immune from improper calls from outside
code).


  Commit: 3b7347577c08818f85d9dd5c8d96f5eac0fdfc0e
      https://github.com/Perl/perl5/commit/3b7347577c08818f85d9dd5c8d96f5eac0fdfc0e
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Remove exploratory code

This code was to find out, in debugging builds, if an undocumented glibc
feature worked.  There were no reports that it didn't, and so, after,
several releases, it has served its purpose.  A future commit will allow
enabling this feature as a Configuration option.


  Commit: 3d7d54b014bdb1e4776c3e2bada81bbf82134f5a
      https://github.com/Perl/perl5/commit/3d7d54b014bdb1e4776c3e2bada81bbf82134f5a
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M perl.h

  Log Message:
  -----------
  perl.h: Expand scope of cpp conditional

This just doesn't bother with checking some locale-related stuff if not
paying attention to locales.


  Commit: f338c7e45eafaa039b3a50988f5d96e85dc20d7a
      https://github.com/Perl/perl5/commit/f338c7e45eafaa039b3a50988f5d96e85dc20d7a
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c
    M perl.h

  Log Message:
  -----------
  locale.c: Create new convenience macro

glibc doesn't have the querylocale() function, available on some other
platforms, such as Darwin and *BSD.  However, it instead has the
equivalent functionality available through an undocumented feature.

This commit allows someone in the know to compile perl to use that
feature, and wraps its API with a macro so that the calling code doesn't
have to be aware of the different APIs of the two methods.

That macro's definition is now done in perl.h, as future commits will
used it in other files.

Since this is an undocumented feature, I am not currently documenting
this wrapper availability.  However, it has been used in the field
without complaint for a couple of releases, as follows:  A more
cumbersome substitute method continues to be used to get what it does.
But in the past both methods were tried and the program died if they
yielded different results.  Since no one has complained, I'm fairly
confident it works.  But sill I'm deferring its more general use.


  Commit: 430f53559ac4311649c16e36bef2e847f39b5a8e
      https://github.com/Perl/perl5/commit/430f53559ac4311649c16e36bef2e847f39b5a8e
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M embed.fnc
    M embed.h
    M intrpvar.h
    M locale.c
    M proto.h

  Log Message:
  -----------
  locale.c: querylocale() doesn't work on LC_ALL

I had misread the man pages.  This bug has been in the field for several
releases now, but most likely hasn't shown up because it's almost always
the case that the locale categories will be set to the same locale.  And
so most implementations of querylocale() would return the correct
result.

This commit works by splitting the calculation of the value of LC_ALL
from S_emulate_setlocale_i() into a separate function, and extending it
to work on querylocale() systems.  This has the added benefit of
removing tangential code from the main line, making
S_emulate_setlocale_i easier to read.

calculate_LC_ALL() is the new function, and is now called from two
places.

Part of this change is to keep our records of LC_ALL on non-querylocale
systems always up-to-date, which is better practice

And part of this change is temporary, marked as such, to be removed a
few commits later.


  Commit: 56f979f966060c2c94a2e3b18bdbf0d00eaf8a0d
      https://github.com/Perl/perl5/commit/56f979f966060c2c94a2e3b18bdbf0d00eaf8a0d
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Use setlocale() for init, not P2008

We have found bugs in the POSIX 2008 libc implementations on various
platforms.  This code, which does the initialization of locale handling
has always been very conservative, expecting possible failures due to
bugs in it our the libc implementations, and backing out if necessary to
a crippled, but workable state, if something goes wrong.

I think we should use the oldest, most stable locale implementation in
these circumstances


  Commit: 79874346c2be7e7c162e7dfa5a000b65d63a3f56
      https://github.com/Perl/perl5/commit/79874346c2be7e7c162e7dfa5a000b65d63a3f56
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M embed.fnc
    M embed.h
    M locale.c
    M proto.h

  Log Message:
  -----------
  locale.c: Split aggregate LC_ALL from emulate_setlocale

This splits into a separate function the code necessary in some
Configurations to calculate LC_ALL from a potentially disparate
aggregate of categories having different locales.

This done just for readability, as this extensive code in the middle of
something else distracts from the main point.

A goto is hence replaced by a recursive call.


  Commit: d5ea05155e43f50559412665be486bc3c1d4508b
      https://github.com/Perl/perl5/commit/d5ea05155e43f50559412665be486bc3c1d4508b
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M embed.fnc
    M locale.c
    M proto.h

  Log Message:
  -----------
  locale.c: Change internal variable name

The new name better reflects its purpose, so is less confusing


  Commit: 9ce571529684b1d9acc8e16b1f25c7deb18ee20a
      https://github.com/Perl/perl5/commit/9ce571529684b1d9acc8e16b1f25c7deb18ee20a
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Clean up handling of a glibc bug

This commit moves all mention of this bug to just the code that requires
it, and inlines a macro, making it easier to comprehend


  Commit: cfe541a6551b0c58449c226f69f96f1dfcf4a474
      https://github.com/Perl/perl5/commit/cfe541a6551b0c58449c226f69f96f1dfcf4a474
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M embed.fnc
    M embed.h
    M locale.c
    M proto.h

  Log Message:
  -----------
  locale.c: Split ancillary from S_emulate_setlocale

This takes the code to update LC_ALL, used only in some Configurations,
out of the main line, making the main line more readable.

It also allows the removal of temporary code added a few commits back


  Commit: 4e59c45c92ad517defe225a1b79a934524815397
      https://github.com/Perl/perl5/commit/4e59c45c92ad517defe225a1b79a934524815397
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: locale "" can be disparate

Setting a locale "" means to get the value from environment variables.
These can set locale categories to different locales, and this needs to
be handled.  The logic before this commit only handled the disparate
case when the locale wasn't ""; but this was compensated for elsewhere.
A future commit will remove that compensation.


  Commit: 7e9999ab9c2face42f574a30234d6969e3622f07
      https://github.com/Perl/perl5/commit/7e9999ab9c2face42f574a30234d6969e3622f07
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M embed.fnc
    M embed.h
    M locale.c
    M proto.h

  Log Message:
  -----------
  Split off setting locale to "" from S_emulate_setlocale

This is done for readability, to move the special casing of setting a
locale to the empty string (hence getting it from the environment) out
of the main line code.


  Commit: 779750bfadcc8bf4c4ae19916e7e4d4001c7ca5a
      https://github.com/Perl/perl5/commit/779750bfadcc8bf4c4ae19916e7e4d4001c7ca5a
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M sv.c

  Log Message:
  -----------
  sv.c: Duplicate more variables during cloning

These locale-related ones should be getting initialized in the new
thread, but be certain.


  Commit: f4557d40512ce89e60fc811586576a297521e817
      https://github.com/Perl/perl5/commit/f4557d40512ce89e60fc811586576a297521e817
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M embed.fnc
    M embed.h
    M embedvar.h
    M intrpvar.h
    M locale.c
    M makedef.pl
    M perl.c
    M proto.h
    M sv.c

  Log Message:
  -----------
  locale.c: Add fcn to hide edge case undefined behavior

The POSIX 2008 API has an edge case in that the result of most of the
functions when called with a global (as opposed to a per-thread) locale
is undefined.

The duplocale() function is the exception which will create a per-thread
locale containing the values copied from the global one.

This commit just calls duplocale, if needed, and the caller need not
concern itself with this possibility


  Commit: 35762cab996ea8fe2ba93b71e0a865b2feba667b
      https://github.com/Perl/perl5/commit/35762cab996ea8fe2ba93b71e0a865b2feba667b
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M embed.fnc
    M embed.h
    M locale.c
    M proto.h

  Log Message:
  -----------
  locale.c: Add DEBUGGING information

These functions are called as expansions of macros.  It may be useful to
know where in the file the macro occurred.


  Commit: a2b8bdbf837c57ff60d429a0bf92811ee7caafe4
      https://github.com/Perl/perl5/commit/a2b8bdbf837c57ff60d429a0bf92811ee7caafe4
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Separate out two Win fcns from a larger one

This makes the larger one easier to understand, and prepares for
possible independent calls to the two, which are potentially useful on
their own.


  Commit: d470ba96819a0277f5ff09d7c60973f1a3c91293
      https://github.com/Perl/perl5/commit/d470ba96819a0277f5ff09d7c60973f1a3c91293
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M ext/POSIX/POSIX.xs

  Log Message:
  -----------
  POSIX.xs: Use macro to reduce complexity

This #defines a macro and uses it to populate a structure, so that
strings don't have to be typed twice.


  Commit: 020b2929d7e26e461f9e1061abbda4708cc4bb08
      https://github.com/Perl/perl5/commit/020b2929d7e26e461f9e1061abbda4708cc4bb08
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M ext/POSIX/POSIX.xs

  Log Message:
  -----------
  POSIX.xs: White-space only

Properly indent some nested preprocessor directives


  Commit: 3f296e116ddd4500ed42e6fa2cd5865c3f7e33cf
      https://github.com/Perl/perl5/commit/3f296e116ddd4500ed42e6fa2cd5865c3f7e33cf
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M embed.fnc
    M embed.h
    M ext/POSIX/POSIX.xs
    M locale.c
    M proto.h

  Log Message:
  -----------
  Move code from POSIX.xs to locale.c

This avoids duplicated logic.


  Commit: 7ffef69e6e6ac0c11a24a37ef7f0738ad783b2f3
      https://github.com/Perl/perl5/commit/7ffef69e6e6ac0c11a24a37ef7f0738ad783b2f3
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Reorder cases in a switch

This moves handling the CODESET to the end, as future commits will make
its handling more complicated.  The cases are now ordered so the
simplest (based on the direction of future commits) are first


  Commit: 3517a6881a57dc2f08080b01d10ab746199667a4
      https://github.com/Perl/perl5/commit/3517a6881a57dc2f08080b01d10ab746199667a4
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Make statics of repeated string constants

These strings are (or soon will be) used in multiple places; so have
just one definition for them.


  Commit: 8d5f903f1e5e9e314d9baa2b5ef7b8cd7bdd2783
      https://github.com/Perl/perl5/commit/8d5f903f1e5e9e314d9baa2b5ef7b8cd7bdd2783
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Add two #defines

This makes sure that we handle having any variant of nl_langinfo() or
localeconv().


  Commit: 6fe5fe16310658ead4e20b44f2a23ba154708fa9
      https://github.com/Perl/perl5/commit/6fe5fe16310658ead4e20b44f2a23ba154708fa9
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M embed.fnc
    M embed.h
    M locale.c
    M proto.h

  Log Message:
  -----------
  locale.c: Return defaults for uncomputable langinfo items

Return the values from the C locale for nl_langinfo() items that aren't
computable on this platform.  If the platform has nl_langinfo(), then
all of them are computable, but if not, some can't be computed, and
others can be, but only if there are alternative methods available on
the platform.

As part of this commit, S_my_nl_langinfo() and S_save_to_buffer() are no
longer used when USE_LOCALE is not defined, so don't compile them.


  Commit: 7c5e3a8d4efd4d5f0bd5280618665f8979a5337f
      https://github.com/Perl/perl5/commit/7c5e3a8d4efd4d5f0bd5280618665f8979a5337f
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Rmv reimplementation of my_strftime()

Prior to this commit, there was a near duplicate copy of the code from
util.c that implements my_strftime().  This was done because the util.c
version zaps the wday field, which made it incompatible.

But it dawned on me that if the arbitrary date we use to do our
calculations were such that it was for a year in which January 1 falls
on a Sunday, then the util.c version automatically works.


  Commit: 66542997604a3872ccb26472cb51d859cf0ef97b
      https://github.com/Perl/perl5/commit/66542997604a3872ccb26472cb51d859cf0ef97b
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M embed.fnc
    M embed.h
    M locale.c
    M proto.h

  Log Message:
  -----------
  locale.c: Shorten static function name

The extra syllable(s) are unnecessary noise


  Commit: f1273e00a51c87fe5b663674968f6b4587454b99
      https://github.com/Perl/perl5/commit/f1273e00a51c87fe5b663674968f6b4587454b99
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M embed.fnc
    M locale.c
    M proto.h

  Log Message:
  -----------
  locale.c: Extend a static function

This will allow it to be used in situations where the buffer it controls
is single use, and we don't need to keep track of the size for future
calls.


  Commit: fa7ca36b211905b7dc3dfb14598a5493e714706d
      https://github.com/Perl/perl5/commit/fa7ca36b211905b7dc3dfb14598a5493e714706d
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Use typedef to simplify

This allows some preprocessor conditionals to be removed


  Commit: 581b9edb64b9d7eeb496d0b7dccc8287009b0bff
      https://github.com/Perl/perl5/commit/581b9edb64b9d7eeb496d0b7dccc8287009b0bff
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Rmv redundant cBOOL()

strEQ and && already return booleans


  Commit: 5cf7b8b3ea26380d7b6237b814f03b069050505e
      https://github.com/Perl/perl5/commit/5cf7b8b3ea26380d7b6237b814f03b069050505e
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Fix currency symbol derivation

On platforms without nl_langinfo(), we derive the currency symbol from
localeconv().  The symbol must be tweaked to conform to nl_langinfo()
standards.  Prior to this commit, it guessed at how to tweak a rare
circumstance.  I now have seen evidence this guess was wrong, so give up
on it.

This also no longer returns just an empty string in certain cases.
nl_langinfo() itself doesn't, so conform to that.


  Commit: c01863b82cda7ff7f00f76f1db7616373a850688
      https://github.com/Perl/perl5/commit/c01863b82cda7ff7f00f76f1db7616373a850688
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Don't add CP to Windows code page names

The actual name appears to be just the number for purposes of
nl_langinfo()-ish things.


  Commit: 3be5fa1bc97562aabc9c7dbf45f683921367b82d
      https://github.com/Perl/perl5/commit/3be5fa1bc97562aabc9c7dbf45f683921367b82d
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M embed.fnc
    M locale.c
    M proto.h

  Log Message:
  -----------
  locale.c: Don't ask a static fcn to be inlined

It's too complicated to really be inlined, and the compiler can figure
things out itself given it is a static function


  Commit: 5b2c64a1320b3d6a6f996ce20710345072fb7f70
      https://github.com/Perl/perl5/commit/5b2c64a1320b3d6a6f996ce20710345072fb7f70
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M embed.fnc
    M locale.c
    M proto.h

  Log Message:
  -----------
  locale.c: Rmv no longer used param from static fnc

Previous commits have gotten rid of this parameter to S_save_to_buffer


  Commit: 0aff4ceef5fb4c3f2d15c3b97c5e90df54c94ba2
      https://github.com/Perl/perl5/commit/0aff4ceef5fb4c3f2d15c3b97c5e90df54c94ba2
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Don't change locale if already there

Changing the locale is cheap for some categories, but expensive for
others.  Changing LC_COLLATE is most expensive, requiring recalculation
of the collation transformation mapping.

This commit checks before blindly changing locales that we aren't
already in the desired one, in which case this could be just as well a
no-op, and with this commit becomes one.


  Commit: a5ed45fb29e84f565513adf779201d3e6d9bc0f7
      https://github.com/Perl/perl5/commit/a5ed45fb29e84f565513adf779201d3e6d9bc0f7
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M embed.fnc
    M intrpvar.h
    M locale.c
    M proto.h

  Log Message:
  -----------
  Make three locale PL_ strings const char*

This adds some compile safety to these.


  Commit: c75f2107d5b9bedf527c747e3ad1ab37891b2761
      https://github.com/Perl/perl5/commit/c75f2107d5b9bedf527c747e3ad1ab37891b2761
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Use a scratch buf; instead of resuing old

This is in preparation for the next commit


  Commit: b0e6d4f9f2d583dbebcd4bfbc1dec9df20d6d957
      https://github.com/Perl/perl5/commit/b0e6d4f9f2d583dbebcd4bfbc1dec9df20d6d957
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M embed.fnc
    M embed.h
    M locale.c
    M proto.h

  Log Message:
  -----------
  locale.c: Make static fcn reentrant

This makes my_langinfo() reentrant by adding parameters specifying where
to store the result.

This prepares for future commits, and fixes some minor bugs for XS
writers, in that the claim was that the buffer in calling
Perl_langinfo() was safe from getting zapped until the next call to it
in the same thread.  It turns out there were cases where, because of
internal calls, the buffer did get zapped.


  Commit: dce54c4df170d19df9a1fc74ab51326955856284
      https://github.com/Perl/perl5/commit/dce54c4df170d19df9a1fc74ab51326955856284
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: langinfo: Use Windows fcn to find CODESET

There is a Windows function available for quite a long time that will
return the current code page.  Use this for the nl_langinfo() CODESET,
as that libc function isn't implemented on Windows.


  Commit: cb1ebbdb016731a045f8e8a074c8cedd69167228
      https://github.com/Perl/perl5/commit/cb1ebbdb016731a045f8e8a074c8cedd69167228
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M embed.fnc
    M embed.h
    M locale.c
    M proto.h

  Log Message:
  -----------
  locale.c: Add static fcn to analyze locale codeset

It determines if the name indicates it is UTF-8 or not.  There are
several variant spellings in use, and this hides that from the the
callers.

It won't be actually used until the next commit


  Commit: 8d8476e3e043089765cd4651c86ed3f08f381151
      https://github.com/Perl/perl5/commit/8d8476e3e043089765cd4651c86ed3f08f381151
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M ext/I18N-Langinfo/Langinfo.pm
    M locale.c

  Log Message:
  -----------
  locale.c: Improve non-nl_langinfo() CODESET calc

Prior to this commit, on non-Windows platforms that don't have a
nl_langinfo() libc function, the code completely punted computation of
the CODESET item.  I have not been able to figure out how to do this,
even going to the locale definition files on disk (which may vary
anyway), but we can do a lot better than punting.

This commit adds three checks:

1) If the locale name is C or POSIX, we know the codeset

2) We can detect if a locale is UTF-8.  If it is, that is the codeset.
Many modern locales are of this ilk.

3) Failing that, some locales have the codeset appear in the name,
following a dot.

It isn't perfect, but it's a lot better than completely punting.


  Commit: eef246a358c5d5e18f6c6bcf22f2bea4622cd1f3
      https://github.com/Perl/perl5/commit/eef246a358c5d5e18f6c6bcf22f2bea4622cd1f3
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M embed.fnc
    M embed.h
    M locale.c
    M proto.h

  Log Message:
  -----------
  New signature for static fcn my_langinfo()

This commit changes the calling sequence for my_langinfo to add the
desired locale (or a sentinel to indicate to use the current locale),
and the locale category of the desired item.

This allows the function to be able to return the desired value for any
locale, avoiding some locale changes that would happen until this
commit, and hiding the need for locale changes from outside functions,
though a couple continue to do so to avoid potential multiple changes.


  Commit: 868f831db23cb98a2d9deda5ad711d5c362a9a90
      https://github.com/Perl/perl5/commit/868f831db23cb98a2d9deda5ad711d5c362a9a90
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M embed.fnc
    M embed.h
    M locale.c
    M proto.h

  Log Message:
  -----------
  locale.c: Add is_locale_utf8()

Previous commits have added the infrastructure to be able to determine
if a locale is UTF-8.  This will prove useful, and this commit adds
a function to encapsulate this information, and uses it in a couple of
places, with more to come in future commits.

This uses as a final fallback, mbtowc(), which some sources view was a
late adder to C89, and others as not really being available until C99.
Future commits will add heuristics when that function isn't available.


  Commit: c0ee48a449fe7136d047f704baeb70c357ed6e48
      https://github.com/Perl/perl5/commit/c0ee48a449fe7136d047f704baeb70c357ed6e48
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M embed.fnc
    M embed.h
    M locale.c
    M proto.h

  Log Message:
  -----------
  locale.c: Add fcn for UTF8ness determination

get_locale_string_utf8ness_i() will determine if the string it is passed
in the locale it is passed is to be treated as UTF-8, or not.


  Commit: 268479880a2a4eda41304935352fe183a61d5950
      https://github.com/Perl/perl5/commit/268479880a2a4eda41304935352fe183a61d5950
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M embed.fnc
    M embed.h
    M ext/POSIX/POSIX.xs
    M locale.c
    M proto.h

  Log Message:
  -----------
  XXX perldelta Move POSIX::localeconv() logic to locale.c

The code currently in POSIX.xs is moved to locale.c, and reworked some
to fit in that scheme, and the logic for the workaround for the Windows
broken localeconv() is made more robust.

This is in preparation for the next commit which will use this logic
instead of (imperfectly) duplicating it.

This also creates Perl_localeconv() for direct XS calls of this
functionality.


  Commit: 71c7f7e8eb5e487f80b826dfae8e60d53202b67b
      https://github.com/Perl/perl5/commit/71c7f7e8eb5e487f80b826dfae8e60d53202b67b
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M embed.fnc
    M embed.h
    M locale.c
    M proto.h

  Log Message:
  -----------
  locale.c: Collapse duplicate logic into one instance

The previous commit move the logic for localeconv() into locale.c.  This
commit takes advantage of that to use it instead of repeating the logic.

On Windows, there is alternative way of finding the radix character for
systems that have a localeconv() that could cause a race.  Prior to this
commit, if that failed to find something that looked like the radix, it
returned a '?'.  Now it will drop down to using this new code, as the
likelihood of the race is small.

Notably, this commit removes the inconsistent duplicate logic that had
been used to deal with the Windows broken localeconv() bug.


  Commit: cef0b6ea2c576cee73e072f5cbb77c0951da4001
      https://github.com/Perl/perl5/commit/cef0b6ea2c576cee73e072f5cbb77c0951da4001
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Fix windows bug with broken localeconv()

localeconv() was broken on Windows until VS 2015.  As a workaround, this
was using my_snprintf() to find what the decimal point character is,
trying to avoid our workaround for localeconv(), which has a (slight)
chance of a race condition.

The problem is that my_snprintf() might not end up calling snprintf at
all; I didn't trace all possibilities in Windows.  So it doesn't make
for a reliable sentinel.

This commit now specifically uses libc snprintf(), and if it fails, drops
down to try localeconv().


  Commit: f798cdbcbf4c3ccad6168497ee02ccc6c1444f8d
      https://github.com/Perl/perl5/commit/f798cdbcbf4c3ccad6168497ee02ccc6c1444f8d
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M embed.fnc
    M embed.h
    M ext/POSIX/POSIX.xs
    M locale.c
    M proto.h

  Log Message:
  -----------
  XXXdelta Add my_strftime8()

This is like plain my_strftime(), but additionally returns an indication
of the UTF-8ness of the returned string


  Commit: 572901678d3db85474822387d124d85477998670
      https://github.com/Perl/perl5/commit/572901678d3db85474822387d124d85477998670
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M embed.fnc
    M embed.h
    M locale.c
    M proto.h

  Log Message:
  -----------
  locale.c: Add utf8ness return param to static fcn

my_langinfo_i() now will additionally return the UTF-8ness of the
returned string.


  Commit: c284d45bf27caaae3173b077f483ee2e0570263a
      https://github.com/Perl/perl5/commit/c284d45bf27caaae3173b077f483ee2e0570263a
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M embed.fnc
    M ext/I18N-Langinfo/Langinfo.xs
    M locale.c
    M proto.h

  Log Message:
  -----------
  XXXdelta Add Perl_langinfo8()

This is like Perl_langinfo() but additionally returns information about
the UTF-8ness of the returned string.


  Commit: e3822fa1ce3a5ab04eec373a762dfe305bf6f692
      https://github.com/Perl/perl5/commit/e3822fa1ce3a5ab04eec373a762dfe305bf6f692
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Add fallbacks if no mbtowc()

This add heuristics that work well for non-English locales to determine
if a locale is UTF-8 or not when mbtowc() isn't available.  It would be
a very rare compiler that didn't have that these days, but this covers
that case as best as I have been able to figure out.


  Commit: 1d1738ea28983ef229ba30b74d562aed577e2569
      https://github.com/Perl/perl5/commit/1d1738ea28983ef229ba30b74d562aed577e2569
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Use Strerror(), not strerror()


  Commit: a269a285ebc5158a1375619e8c8e0b02178f63cc
      https://github.com/Perl/perl5/commit/a269a285ebc5158a1375619e8c8e0b02178f63cc
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M embed.fnc
    M embed.h
    M locale.c
    M proto.h

  Log Message:
  -----------
  locale.c: Refactor #ifdef's for clarity

The my_strerror() function has effectively 5 different implementations
depending on the capabilities of the platform.  Only a few lines are
common to all, the set-up and the return.  The #ifdefs obscure the
underlying logic.  So this commit separates them out into 5 different
functions, with the result that it's clear what is going on in each.


  Commit: 14444c2fc59bfbc28b17f0c5d8a6f58640752567
      https://github.com/Perl/perl5/commit/14444c2fc59bfbc28b17f0c5d8a6f58640752567
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  Avoid mojibake in "$!"

In stress testing, I discovered that the LC_CTYPE and LC_MESSAGES
locales need to be the same locale, or strerror() can return
question marks or mojibake instead of the proper message.

This commit refactors the handling of stringifying "$!" to make the
locales of both categories the same during the stringification.

Actually, I suspect it isn't the locale, but the codeset of the locale
that needs to be the same.  I suspect that if the categories were both
in different UTF-8 locales, or both in single-byte locales, that things
would work fine.  But it's cheaper to find the locale rather than the
locale's codeset, so that is what is done.


  Commit: 9770a217f58168b41ad77cebdc36c49e4562c2d2
      https://github.com/Perl/perl5/commit/9770a217f58168b41ad77cebdc36c49e4562c2d2
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M embed.fnc
    M embed.h
    M locale.c
    M makedef.pl
    M mg.c
    M proto.h

  Log Message:
  -----------
  Move utf8ness calc for $! into locale.c from mg.c

locale.c has the infrastructure to handle this, so remove repeated
logic.

The removed code tried to discern better based on using script runs, but
this actually doesn't help, so is removed.


  Commit: 3ba6c37cddf1c5d14aae68d28d78af951cb9b4a1
      https://github.com/Perl/perl5/commit/3ba6c37cddf1c5d14aae68d28d78af951cb9b4a1
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M mg.c

  Log Message:
  -----------
  mg.c: White-space only

Indent newly formed block from the previous commit.


  Commit: ec696df740cfe1d3cda0ddf1f240437cf97a48e5
      https://github.com/Perl/perl5/commit/ec696df740cfe1d3cda0ddf1f240437cf97a48e5
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M embed.fnc
    M embed.h
    M embedvar.h
    M intrpvar.h
    M locale.c
    M proto.h
    M sv.c

  Log Message:
  -----------
  locale.c: Rmv no longer used code; UTF8ness cache

What these functions do has been subsumed by code introduced in previous
commits, and in a more straight forward manner.

Also removed in this commit is the cache of the knowing what locales are
UTF-8 or not.  This data is now cheaper to calculate when needed, and
there is now a single entry cache, so I don't think the complexity
warrants keeping it.

It could be added back if necessary, split off from the remainder of
this commit.


  Commit: 3bdceedc1183938e8ed91916f4ff9c41703db670
      https://github.com/Perl/perl5/commit/3bdceedc1183938e8ed91916f4ff9c41703db670
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  Don't discard locale info in starting P2008

The program is started in the global locale, and then is converted to
the POSIX 2008 per-thread locale API.  Prior to this commit the startup
locale was discarded.  It really should be the foundation for the 2008
locales.  I don't know of any current paths through the code that this
makes a difference for, but it is a potential hole that is easy to plug.


  Commit: 9ce0eec3a67f33214fc8b4d3f31139151126c380
      https://github.com/Perl/perl5/commit/9ce0eec3a67f33214fc8b4d3f31139151126c380
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M embed.fnc
    M embed.h
    M locale.c
    M perl.h
    M proto.h

  Log Message:
  -----------
  Add a common locale panic macro and functions

This will make sure that all the necessary clean up gets done.


  Commit: 06994ee5a678a9f2cabd589ab502948628be8187
      https://github.com/Perl/perl5/commit/06994ee5a678a9f2cabd589ab502948628be8187
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Revamp sync_locale()

This rarely used function was actually failing to do what it purported
in some Configurations.


  Commit: d392536d2400bc01c26dcc5b0b22e98aedad7867
      https://github.com/Perl/perl5/commit/d392536d2400bc01c26dcc5b0b22e98aedad7867
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Clean up thread_locale_init()

We can use internal functions to this file instead of the API ones here.
This commit also calls  sync_locale() to avoid repeated logic.


  Commit: 78d509103d2bbb956b3d340979ac72ceea2b18cf
      https://github.com/Perl/perl5/commit/78d509103d2bbb956b3d340979ac72ceea2b18cf
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  Revamp switch_to_global_locale()

Prior to this commit, the global locale was not always getting populated
with the values from the thread being switched.


  Commit: 1ff1a78843314978245bc9375b32c1112289ae0d
      https://github.com/Perl/perl5/commit/1ff1a78843314978245bc9375b32c1112289ae0d
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Omit an extra copy

In this case in Perl_setlocale(), we can just return the plain result
from setlocale(), as, if something further needs to be done that would
destroy it, that is taken care of already at the time.

On per-thread locale platforms, the result already is in a per-category
buffer.


  Commit: a93944217f799f19b03a45f285c2c9565bb7c4bb
      https://github.com/Perl/perl5/commit/a93944217f799f19b03a45f285c2c9565bb7c4bb
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M embedvar.h
    M intrpvar.h
    M locale.c
    M makedef.pl
    M perl.c
    M sv.c

  Log Message:
  -----------
  locale.c: Cache the current LC_CTYPE locale name

This is now used as a cache of length 1 to avoid having to lookup up the
UTF-8ness as often.

There was a complicated cache previously, but changes to the logic
caused that to be much less necessary, and it is no longer actually
used, and will be removed in a later commit.

But it's pretty easy to keep this single value around to cut further
down the new scheme's need to look it up


  Commit: 90e08d8dea253021224901ccf5f01b8d350d2cca
      https://github.com/Perl/perl5/commit/90e08d8dea253021224901ccf5f01b8d350d2cca
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M intrpvar.h

  Log Message:
  -----------
  intrpvar.h: Initialize a variable

I don't believe there is a bug with this PL_numeric_name being
uninitialized, but this is an easy precaution.


  Commit: deee3f070dc868c63575a75916a3884db80964e7
      https://github.com/Perl/perl5/commit/deee3f070dc868c63575a75916a3884db80964e7
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c
    M perl.h

  Log Message:
  -----------
  Swap the ordering of two locale category indices

Perl internally uses a mapping of locale category values into a
consecutive sequence of indices starting at 0.  These are used as
indexes into arrays.  The reason is that the category numbers are
opaque, vary by platform, aren't necessarily sequential, and hence are
hard to make table driven code for.

This commit makes the LC_CTYPE index 0, and LC_NUMERIC equal to 1;
swapping them.  The reason is to cause LC_CTYPE to get done first in the
many loops through the categories.  The UTF8ness of categories is an
often needed value, and most of the time the categories will have the
same locale.  LC_CTYPE is needed to calculate the UTF8ness, and by doing
it first and caching the result, the other categories likely
automatically will use the same value, without having to recalculate.


  Commit: 725eac06101355f78429ecd7ecd4226448d97ef6
      https://github.com/Perl/perl5/commit/725eac06101355f78429ecd7ecd4226448d97ef6
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Use new mechanism to save/restore errno

Instead of explicitly saving the errno around debugging statements, the
new more general mechanism is used.


  Commit: 8c24d075771b735c97ae96ee46ae9e6c18c6c60b
      https://github.com/Perl/perl5/commit/8c24d075771b735c97ae96ee46ae9e6c18c6c60b
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Move DEBUG location info

This commit takes advantage of the new mechanism to add common DEBUGGING
code to print the __FILE__ and __LINE__ of every debugging statement.
This allows those to be removed from each statement, and have them
implicitly added.

This make things consistent, and easier to read and add new statements.


  Commit: a4a5ba5e32b6492766fb5a664b861d9f339770c7
      https://github.com/Perl/perl5/commit/a4a5ba5e32b6492766fb5a664b861d9f339770c7
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Add some asserts


  Commit: 8db78d5bea16198126e7e35f5b60e2e308b3dbbf
      https://github.com/Perl/perl5/commit/8db78d5bea16198126e7e35f5b60e2e308b3dbbf
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Reorder code, rmv unneeded conditional

Previous commits have made the conditional about being able to find the
radix character unnecessary.  The called function my_langinfo_c()
handles the case properly.

This commit also makes the trivial case first in a conditional, as that
is easier to comprehend.


  Commit: c8b624146549ebd08594b03619e21549e43b3460
      https://github.com/Perl/perl5/commit/c8b624146549ebd08594b03619e21549e43b3460
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Reorder 'if' branches

It's better for understandability to have positive tests than negative
ones


  Commit: 4656eba438a93dca3929844f5ae10892a551ae2e
      https://github.com/Perl/perl5/commit/4656eba438a93dca3929844f5ae10892a551ae2e
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Refactor a static function

S_new_numeric() is called after the LC_NUMERIC category is changed, to
update various ancillary information Perl keeps.

This reorders the function so that on POSIX 2008 platforms, the numeric
object is created earlier.  This allows for fewer operations on those
platforms, as we already have the correct value in place for querying
what the radix and thousands separator characters are.

Explanatory comments are also added.


  Commit: 67d23170f006f8460e6478711e457c6760d206d3
      https://github.com/Perl/perl5/commit/67d23170f006f8460e6478711e457c6760d206d3
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Change assert() into STATIC_ASSERT()


  Commit: 26ab0cbf1652c2ee5474e7deee3938e8b644decc
      https://github.com/Perl/perl5/commit/26ab0cbf1652c2ee5474e7deee3938e8b644decc
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Use standard fold table for C locale

Copy the standard compiled-in ASCII fold table when the locale is C or
POSIX, instead of looping through all 256 characters and computing them.
This saves some time as well as ensures that any platform bugs become
irrelevant.


  Commit: 104b33ba1067aeca05bb2ecf29b2eef3c975cd9b
      https://github.com/Perl/perl5/commit/104b33ba1067aeca05bb2ecf29b2eef3c975cd9b
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Add check that strxfrm didn't fail

The code failed to take into account that strxfrm() can fail for reasons
besides buffer length.  It does not return errors, and the only way to
check is to set errno to 0 beforehand, and check that it is still 0
afterwards.


  Commit: b2be4f58a55d90f584af8ce067eed22318963f91
      https://github.com/Perl/perl5/commit/b2be4f58a55d90f584af8ce067eed22318963f91
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Don't assume LC_CTYPE, LC_COLLATE are same

This code is using isCNTRL_LC which depends on LC_CTYPE to verify that
something in the LC_COLLATE locale is a control.  That only works
properly if the two locales are the same.  This commit adds code to
ensure they are.


  Commit: cc0088632ae14ed3f808150eddce7f373c4327aa
      https://github.com/Perl/perl5/commit/cc0088632ae14ed3f808150eddce7f373c4327aa
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: strxfrm() requires LC_CTYPE eq LC_COLLATE

The libc functions strxfrm() on some platforms requires the LC_CTYPE
locale to be the same as the LC_COLLATE locale (or rather, probably that
they have the same code set, but checking for locale is cheaper).
Otherwise mojibake would result, or more likely the function will fail,
setting errno.

This commit brings the locales into alignment if necessary


  Commit: d139a087430ee71d612b6bdb19488568be84a7b8
      https://github.com/Perl/perl5/commit/d139a087430ee71d612b6bdb19488568be84a7b8
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M Configure
    M Cross/config.sh-arm-linux
    M Cross/config.sh-arm-linux-n770
    M NetWare/config.wc
    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

  Log Message:
  -----------
  Configure: strxfrm_l


  Commit: 22b65f16178317240f26b1b41168d6b8ff1ff02e
      https://github.com/Perl/perl5/commit/22b65f16178317240f26b1b41168d6b8ff1ff02e
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M lib/locale.t

  Log Message:
  -----------
  XXX temp: Windows debug


  Commit: c8d1ea9b61bde2d0acc5902bdb38143255e4d520
      https://github.com/Perl/perl5/commit/c8d1ea9b61bde2d0acc5902bdb38143255e4d520
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Use strxfrm_l() if available

This more modern version of the function doesn't require us to change
locales.


  Commit: f30b3fab3dd7104f36ac362e15c51658e7ee9b59
      https://github.com/Perl/perl5/commit/f30b3fab3dd7104f36ac362e15c51658e7ee9b59
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M embed.fnc
    M embed.h
    M locale.c
    M mathoms.c
    M proto.h
    M sv.c

  Log Message:
  -----------
  Change name of internal function

This is in preparation for working on it; the new name, mem_collxfrm_ is
in compliance with the C Standard; the old was not.


  Commit: d2ec65ce5d30baae50bd1d9bc67f88316b2b70e6
      https://github.com/Perl/perl5/commit/d2ec65ce5d30baae50bd1d9bc67f88316b2b70e6
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M embed.fnc
    M ext/POSIX/POSIX.xs
    M ext/POSIX/lib/POSIX.pod
    M locale.c
    M proto.h

  Log Message:
  -----------
  XXXdelta Fix POSIX::strxfrm()

This function takes an SV containing a PV.  The encoding of that PV is
based on the locale of the LC_CTYPE locale.  It really doesn't make
sense to collate based off of the sequencing of a different locale, which
prior to this commit it would do if the LC_COLLATION locale were
different.


  Commit: fb2c7a040520f8131b95c5fe4ddf0c002113c5c7
      https://github.com/Perl/perl5/commit/fb2c7a040520f8131b95c5fe4ddf0c002113c5c7
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M embed.fnc
    M embed.h
    M locale.c
    M proto.h

  Log Message:
  -----------
  locale.c: Improve debugging for mem_collxfrm()

This prints out more information, better organized.

It also moves up the info from -DLv to plain -DL


  Commit: 2953daf0291b3aeebd4a18791c986c2618cbc006
      https://github.com/Perl/perl5/commit/2953daf0291b3aeebd4a18791c986c2618cbc006
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Add debug statement for collation failure

Perhaps this should be a warning to the user that we couldn't calculate
collation info for the locale, but at least there should be a way to
get that info from a DEBUG statement


  Commit: a58f59e9008826397cae27f9e056cd2db6f45d42
      https://github.com/Perl/perl5/commit/a58f59e9008826397cae27f9e056cd2db6f45d42
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Print code point in hex, not decimal

Hex is the more familiar form


  Commit: 06933e6b96e89178e36bb16aba0d4edccc64d383
      https://github.com/Perl/perl5/commit/06933e6b96e89178e36bb16aba0d4edccc64d383
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M ext/POSIX/POSIX.xs
    M locale.c
    M perl.h

  Log Message:
  -----------
  Mark certain mutex lock macros as private

mbtowc() mblen(), and wctomb() should not be directly used by XS
writers; instead use the POSIX versions.  Don't encourage the direct use
by having public macros to aid in their use.


  Commit: 8b2b0abec9e834a3e74e68f846fd2d3c4fd53de3
      https://github.com/Perl/perl5/commit/8b2b0abec9e834a3e74e68f846fd2d3c4fd53de3
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M perl.h

  Log Message:
  -----------
  perl.h: Move some code around

This is purely to make future commits have smaller real difference
listings, and involves a temporary (complemented) copy of a preprocessor
conditional.


  Commit: 7abbf218aaee0b0e9b9a6e83f32473b371c95791
      https://github.com/Perl/perl5/commit/7abbf218aaee0b0e9b9a6e83f32473b371c95791
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M embedvar.h
    M intrpvar.h
    M locale.c
    M makedef.pl
    M perl.h
    M sv.c

  Log Message:
  -----------
  Make the locale mutex a general semaphore

Future commits will use this new capability, and in Configurations where
no locale locking is currently necessary.


  Commit: f263ae96c572130a0b6eaa3af85cc7545d6a2679
      https://github.com/Perl/perl5/commit/f263ae96c572130a0b6eaa3af85cc7545d6a2679
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M embedvar.h
    M intrpvar.h
    M makedef.pl
    M perl.h
    M perlvars.h
    M sv.c

  Log Message:
  -----------
  Use general locale mutex for numeric operations

This commit removes the separate mutex for locking locale-related
numeric operations on threaded perls; instead using the general locale
one.  The previous commit made that a general semaphore, so now suitable
for use for this purpose as well.

This means that the locale can be locked for the duration of some
sprintf operations, longer than before this commit.  But on most modern
platforms, thread-safe locales cause this lock to expand just to a
no-op; so there is no effect on these.  And on the impacted platforms,
one is not supposed to be using locales and threads in combination, as
races can occur.  This lock is used on those perls to keep Perl's
manipulation of LC_NUMERIC thread-safe.  And for those there is also no
effect, as they already lock around those sprintf's.


  Commit: 762df499ff3e78eb77d127bc2dafda818d6ff099
      https://github.com/Perl/perl5/commit/762df499ff3e78eb77d127bc2dafda818d6ff099
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M perl.h

  Log Message:
  -----------
  Add locale macro to wrap static space using fncs

Some functions return a result in a global-to-the-program buffer, or
they have an internal global buffer.  Other threads must be kept from
simultaneously using that function.  This macro is to be used for all
such ones dealing with locales.  Ideally, there would be a separate mutex
for each such buffer space.  But these functions also have to lock the
locale from changing during their execution, and there aren't that many
such functions, and they actually are rarely executed.  So a single lock
will do.

This will allow future commits to have more targeted locking for
functions that don't affect the global locale.


  Commit: 0bceb9c1b640f73468fc6ccae37d9766d3650bac
      https://github.com/Perl/perl5/commit/0bceb9c1b640f73468fc6ccae37d9766d3650bac
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M perl.h

  Log Message:
  -----------
  Redefine the POSIX.xs locale macros using prev commit

This commit uses the new macro introduced in the previous commit to
define the internal locale mutex macros in POSIX.xs


  Commit: b049b74c5dea1b8d2b4b7816fc28880eecc96ce1
      https://github.com/Perl/perl5/commit/b049b74c5dea1b8d2b4b7816fc28880eecc96ce1
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c
    M perl.h

  Log Message:
  -----------
  perl.h: Remove NL_LANGINFO_LOCK

This is needed in precisely one place in the code, so move it to there.


  Commit: 48045826e541508a4ef1bd99c7d5a2cc54434eb7
      https://github.com/Perl/perl5/commit/48045826e541508a4ef1bd99c7d5a2cc54434eb7
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c
    M perl.h

  Log Message:
  -----------
  perl.h: Remove LOCALECONV_LOCK

This is needed in just one function, in locale.c, so more it there.


  Commit: 511ab67b71b8b03455f85c9126311d17ce987be1
      https://github.com/Perl/perl5/commit/511ab67b71b8b03455f85c9126311d17ce987be1
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c
    M perl.h

  Log Message:
  -----------
  Add PORCELAIN_SETLOCALE_LOCK/UNLOCK

This macro is used to surround raw setlocale() calls so that the return
value in a global static buffer can be saved without interference with
other threads.

There are a few very rarely occurring instances in locale.c that are
converted to use this.  These previously could have been races.

The raw setlocalwes in the initialization function are not guarded, as
these happen early in the Perl process initialization, before threading
is enabled.

This is buggy if there are multiple embedded perls.  It can't be helped.
perlembed is being updated to indicate this.


  Commit: ca3e097c5ffd7c5688a2bb0088514b95609694d6
      https://github.com/Perl/perl5/commit/ca3e097c5ffd7c5688a2bb0088514b95609694d6
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M perl.h

  Log Message:
  -----------
  perl.h: Move #defining SETLOCALE_LOCK

This simplifies slightly, and will allow further simplification


  Commit: a22caf3045fd6a608e184d74a6bcd5bcd4bf03ef
      https://github.com/Perl/perl5/commit/a22caf3045fd6a608e184d74a6bcd5bcd4bf03ef
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M perl.h

  Log Message:
  -----------
  perl.h: Move LOCALE_READ_LOCK #definition

To enable future simplifications


  Commit: eb7ee07285a3aca4a65b1992779f1abc422e3642
      https://github.com/Perl/perl5/commit/eb7ee07285a3aca4a65b1992779f1abc422e3642
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M intrpvar.h
    M locale.c
    M makedef.pl
    M perl.c
    M perl.h
    M sv.c

  Log Message:
  -----------
  locale.c: Move #define to perl.h; use it elsewhere

 Rather than recalculate this combined conditional, do it once in
 perl.h.


  Commit: cf5b3236b2e876c2917f6aac8c249252a7552763
      https://github.com/Perl/perl5/commit/cf5b3236b2e876c2917f6aac8c249252a7552763
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M embed.fnc
    M embed.h
    M locale.c
    M proto.h

  Log Message:
  -----------
  locale.c: Mitigate unsafe threaded locales

This a new set of macros and functions to do locale changing and
querying for platforms where perl is compiled with threads, but the
platform doesn't have thread-safe locale handling.

All it does is:

1) The return of setlocale() is always safely saved in a per-thread
buffer, and
2) setlocale() is protected by a mutex from other threads which are
using perl's locale functions.

This isn't much, but it might be enough to get some programs to work on
such platforms which rarely change or query the locale.


  Commit: 31ba991336154e930db5773af6e1395fffa09fc7
      https://github.com/Perl/perl5/commit/31ba991336154e930db5773af6e1395fffa09fc7
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M cygwin/cygwin.c

  Log Message:
  -----------
  cygwin


  Commit: d19746aff797097cee7fe7144464ad539ebcb175
      https://github.com/Perl/perl5/commit/d19746aff797097cee7fe7144464ad539ebcb175
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M perl.h

  Log Message:
  -----------
  XXX make sure comments get moved appropriately perl.h: Remove now empty block

Previous commits have left this empty except for comments.


  Commit: a421a579f9fb556dd20dccd1afb2fb00f547d86a
      https://github.com/Perl/perl5/commit/a421a579f9fb556dd20dccd1afb2fb00f547d86a
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M embed.fnc
    M embed.h
    M embedvar.h
    M ext/POSIX/POSIX.xs
    M handy.h
    M inline.h
    M intrpvar.h
    M locale.c
    M makedef.pl
    M perl.c
    M perl.h
    M proto.h
    M sv.c
    M util.c

  Log Message:
  -----------
  Emul


  Commit: 5e81bc7396293ab654a83a5f209a310e4ae00c1b
      https://github.com/Perl/perl5/commit/5e81bc7396293ab654a83a5f209a310e4ae00c1b
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M lib/locale_threads.t
    M t/loc_tools.pl

  Log Message:
  -----------
  loc tools after emulation


  Commit: f8b81db48e3465c0cc29338536f0060022cfe372
      https://github.com/Perl/perl5/commit/f8b81db48e3465c0cc29338536f0060022cfe372
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M pp.c

  Log Message:
  -----------
  XXX pp.c: do %g print under mutex,


  Commit: 72867391045dbf2c38730835026480e8d17def98
      https://github.com/Perl/perl5/commit/72867391045dbf2c38730835026480e8d17def98
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M ebcdic_tables.h
    M embedvar.h
    M globvar.sym
    M intrpvar.h
    M perl.h
    M regen/ebcdic.pl

  Log Message:
  -----------
  XXX finish fold_locale

tests, copy in thread create


  Commit: 0fb4d511363a71131c2329dd1341f25dc2912eed
      https://github.com/Perl/perl5/commit/0fb4d511363a71131c2329dd1341f25dc2912eed
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M inline.h
    M locale.c

  Log Message:
  -----------
  XXX temp debug? locale.c, inline.h:foldEQ_locale


  Commit: 9bfa1d9752316ab7cc5b2d108bf9dd9bcc9f67f1
      https://github.com/Perl/perl5/commit/9bfa1d9752316ab7cc5b2d108bf9dd9bcc9f67f1
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c comments


  Commit: b855e11b337116a088f8f0226cc32bb828b2368b
      https://github.com/Perl/perl5/commit/b855e11b337116a088f8f0226cc32bb828b2368b
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  XXX prob drop; done before anything so no races


  Commit: cd52953aaa6a9bb9017ef1557546ab81d197f030
      https://github.com/Perl/perl5/commit/cd52953aaa6a9bb9017ef1557546ab81d197f030
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M perl.h

  Log Message:
  -----------
  perl.h: Add #define for gwENVr_LOCALEr_UNLOCK

This is for functions that read the locale and environment and write to
some global space.


  Commit: e8fd768b00bfde9b547f5037fb630ef5fe41ee50
      https://github.com/Perl/perl5/commit/e8fd768b00bfde9b547f5037fb630ef5fe41ee50
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M perl.h
    M time64.c

  Log Message:
  -----------
  Remove ENV_LOCALE_LOCK/UNLOCK macros

These are subsumed by gwENVr_LOCALEr_LOCK created in the previous
commit.


  Commit: cf6180a8ad847d19a58339282f8201b45f02aebb
      https://github.com/Perl/perl5/commit/cf6180a8ad847d19a58339282f8201b45f02aebb
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M perl.h
    M time64.c
    M util.c

  Log Message:
  -----------
  Change ENV/LOCALE locking read macro names

The old name was confusing.


  Commit: 9ddc6dd537fad5eb39d2a5cedaa6518c935f8ff4
      https://github.com/Perl/perl5/commit/9ddc6dd537fad5eb39d2a5cedaa6518c935f8ff4
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M perl.h

  Log Message:
  -----------
  perl.h: Move some statements

So they are closer to related statements


  Commit: c48d968959c2fcc115e08035d3ed75db2ee21722
      https://github.com/Perl/perl5/commit/c48d968959c2fcc115e08035d3ed75db2ee21722
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M perl.h
    M util.c

  Log Message:
  -----------
  perl.h: Finish implementing combo ENV/LOCALE mutexes

There are cases where an executing function is vulnerable to either the
locale or environment being changed by another thread.  This commit
implements macros that use mutexes to protect these critical sections.
There are two cases that exist:  one where the functions only read; and
one where they can also need exclusive control so that a competing
thread can't overwrite the returned static buffer before it is safely
copied.

5.32 had a placeholder for these, but didn't actually implement it.
Instead it locked just the ENV portion.  On modern platforms with
thread-safe locales, the locale portion is a no-op anyway, so things
worked on them.

This new commit extends that safety to other platforms.  This has long
been a vulnerability in Perl.


  Commit: 9cd156b7764789d48828b8d4ce60aa7106834f42
      https://github.com/Perl/perl5/commit/9cd156b7764789d48828b8d4ce60aa7106834f42
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M time64.c

  Log Message:
  -----------
  time64.c: Remove no longer needed code

This code defined some macros; those are now defined by perl.h


  Commit: f33eb4549961a90fca0bb11d3b6ce622a8539839
      https://github.com/Perl/perl5/commit/f33eb4549961a90fca0bb11d3b6ce622a8539839
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M pp_sys.c

  Log Message:
  -----------
  XXX need to StructCopy pp_sys mutexes


  Commit: 819189a3f2f732a9edac293ca54f2284d5955c7d
      https://github.com/Perl/perl5/commit/819189a3f2f732a9edac293ca54f2284d5955c7d
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M win32/win32.c

  Log Message:
  -----------
  win32.c: Add mutexes around some calls

These could have races.


  Commit: 4fb6067418f1b3bf60c9f94af19df78c94fce9fb
      https://github.com/Perl/perl5/commit/4fb6067418f1b3bf60c9f94af19df78c94fce9fb
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M util.c

  Log Message:
  -----------
  util.c: mktime needs to run under a mutex

per the Posix standard


  Commit: 4bbf301154dcc8637512a32ed11bb74d47816e20
      https://github.com/Perl/perl5/commit/4bbf301154dcc8637512a32ed11bb74d47816e20
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/perlxs.pod
    M t/porting/known_pod_issues.dat

  Log Message:
  -----------
  perlxs


  Commit: ecd4f37ffe82067f8eb76d8eb6ab26a1b5bcfec4
      https://github.com/Perl/perl5/commit/ecd4f37ffe82067f8eb76d8eb6ab26a1b5bcfec4
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M ext/POSIX/POSIX.xs

  Log Message:
  -----------
  POSIX.xs env locks, check file for more


  Commit: 889d0c4f200665b7e1a2a103c653c97cddf8bf37
      https://github.com/Perl/perl5/commit/889d0c4f200665b7e1a2a103c653c97cddf8bf37
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M os2/os2.c

  Log Message:
  -----------
  os2: Use many reader lock instead of exclusive

This is just reading the environment, not changing it, so a many readers
can be accessing it at the same time.


  Commit: cc5a7877514d36a78fb2f10d902f259ce9d3b44e
      https://github.com/Perl/perl5/commit/cc5a7877514d36a78fb2f10d902f259ce9d3b44e
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M cpan/Time-Piece/Piece.pm
    M cpan/Time-Piece/Piece.xs

  Log Message:
  -----------
  XXX cpan PR Time-Piece


  Commit: 266b61ac52f6c50ef5305c5466195ed095aa7472
      https://github.com/Perl/perl5/commit/266b61ac52f6c50ef5305c5466195ed095aa7472
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M cpan/Time-Piece/Piece.xs

  Log Message:
  -----------
  cpan/Time-Piece/Piece.xs: Use foldEQ_locale() if available

Using this is preferable to the glibc function due to it being tailored
for Perl, and is thread-safe in the latest versions.


  Commit: adeb1e526acf686e4b9648bd6d5af1dffe3c9876
      https://github.com/Perl/perl5/commit/adeb1e526acf686e4b9648bd6d5af1dffe3c9876
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M cpan/Time-Piece/Piece.xs

  Log Message:
  -----------
  Time-Piece/Piece.xs: Use isDIGIT, not isdigit

isDIGIT is not locale-dependent, matching just [0-9].  There was a bug
using isdigit() in at least one place where it calculated the value of
the digit by subtracting the original of '0' from it.  This works only
if the digit is in [0-9], but there are locales where there is another
set of digits, and so would give a very wrong result.  That makes it
clear to me that only [0-9] were assumed by the original authors.


  Commit: acc644006de77a04f6892237ef6f778a29b0cdbb
      https://github.com/Perl/perl5/commit/acc644006de77a04f6892237ef6f778a29b0cdbb
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M cpan/Time-Piece/Piece.xs

  Log Message:
  -----------
  XXX Time-Piece/Piece.xs: Use isSPACE not isspace

Same msg as prev commit


  Commit: 3572a122a2e4cbb078ef64f9c42750921cbd17f1
      https://github.com/Perl/perl5/commit/3572a122a2e4cbb078ef64f9c42750921cbd17f1
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M cpan/Time-Piece/Piece.xs

  Log Message:
  -----------
  XXX Time-Piece/Piece.xs: Use isUPPER not isupper

Same msg as prev commit


  Commit: bd9dc63da249035535b09b4097fa59ad329b277a
      https://github.com/Perl/perl5/commit/bd9dc63da249035535b09b4097fa59ad329b277a
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M cpan/Time-Piece/Piece.xs

  Log Message:
  -----------
  Time-Piece/Piece.xs: Cleanup missing foldEQ fallback

This changes the code to use foldEQ() if available, and to define foldEQ
in terms of fallbacks if not.  The previous code did not provide a final
fallback.


  Commit: b63a7721a21723ff67dbf02c38cbc53d921eb385
      https://github.com/Perl/perl5/commit/b63a7721a21723ff67dbf02c38cbc53d921eb385
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M cpan/Time-Piece/Piece.xs

  Log Message:
  -----------
  more timepiece


  Commit: 8ae34bca9342e394e136be5ab35056b63f141375
      https://github.com/Perl/perl5/commit/8ae34bca9342e394e136be5ab35056b63f141375
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M pod/perlhacktips.pod

  Log Message:
  -----------
  XXX incomplete perlhacktips:


  Commit: 286f2953fdc20cbfe1a07a1da527c5da0d6bbbe1
      https://github.com/Perl/perl5/commit/286f2953fdc20cbfe1a07a1da527c5da0d6bbbe1
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M dist/IO/IO.xs

  Log Message:
  -----------
  XXX check if using ppport IO.xs: Remove fallback code furnished by ppport


  Commit: 7f6d6b84b6a435f18e42ab4fc3543a79a5564269
      https://github.com/Perl/perl5/commit/7f6d6b84b6a435f18e42ab4fc3543a79a5564269
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M hints/freebsd.sh

  Log Message:
  -----------
  XXX check with freebsd: hints/freebsd.sh


  Commit: 81f5c68803ed1ef087698759047f8fc9327f0d96
      https://github.com/Perl/perl5/commit/81f5c68803ed1ef087698759047f8fc9327f0d96
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M thread.h

  Log Message:
  -----------
  thread.ht: White-space, braces only


  Commit: e7bb738a6832558b37677ccd1c46ccb9c795b94c
      https://github.com/Perl/perl5/commit/e7bb738a6832558b37677ccd1c46ccb9c795b94c
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M thread.h

  Log Message:
  -----------
  XXX thread.h Save errno around lock/unlock


  Commit: 036b69ac914461a88eb81945559831f490d703b2
      https://github.com/Perl/perl5/commit/036b69ac914461a88eb81945559831f490d703b2
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M perl.h

  Log Message:
  -----------
  XXX perl.h: Debugging mutex lock'


  Commit: 50283cbc16994296725bca1afb57a3fcb66d24ef
      https://github.com/Perl/perl5/commit/50283cbc16994296725bca1afb57a3fcb66d24ef
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M handy.h
    M iperlsys.h
    M locale.c
    M perl.h
    M regen/reentr.pl
    M regexec.c
    M util.c

  Log Message:
  -----------
  Notes


  Commit: 12ea85150132289d41c017e4a4de119adecad70c
      https://github.com/Perl/perl5/commit/12ea85150132289d41c017e4a4de119adecad70c
  Author: Karl Williamson <khw@cpan.org>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Use %z modifier instead of cast

It's better to use a %z modifier than to cast the operand.


Compare: https://github.com/Perl/perl5/compare/3a23ab69b388...12ea85150132



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About