[Perl/perl5] 12bbd9: perl.h: Add Debug statement to locale mutex lock

2023-07-25 Thread Karl Williamson via perl5-changes
  Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 12bbd9cf08c1681a836c943dc02a0a4b7ac79f52
  
https://github.com/Perl/perl5/commit/12bbd9cf08c1681a836c943dc02a0a4b7ac79f52
  Author: Karl Williamson 
  Date:   2023-07-25 (Tue, 25 Jul 2023)

  Changed paths:
M perl.h

  Log Message:
  ---
  perl.h: Add Debug statement to locale mutex lock

This is helpful in seeing when a thread hangs waiting for the mutex to
be free.




[Perl/perl5] 907695: universal.c - change import with args error to be ...

2023-07-25 Thread Yves Orton via perl5-changes
  Branch: refs/heads/yves/import_error2deprecation
  Home:   https://github.com/Perl/perl5
  Commit: 907695add47edd07245abeb9f8065af8bbf458fa
  
https://github.com/Perl/perl5/commit/907695add47edd07245abeb9f8065af8bbf458fa
  Author: Yves Orton 
  Date:   2023-07-25 (Tue, 25 Jul 2023)

  Changed paths:
M lib/warnings.pm
M pod/perldeprecation.pod
M regen/warnings.pl
M t/op/universal.t
M universal.c
M warnings.h

  Log Message:
  ---
  universal.c - change import with args error to be a deprecated warning

We have had a LOT of fallout from 2dcf3cf50d7 as it turns out that
there various common cases of people accidentally exploiting the
silent use of missing import with arguments.  The premise of detecting
this was that it would allow us to detect scenarios where users
on a case-insensitive file-system had a typo. But it turns that there
are a lot of accidental cases of this as well, a lot more than we
expected.

Common mistaken cases are:

* Via use_ok() where people think the second argument is a test
  name instead of an argument to the import of the module being
  used.

* Using a quoted version number in a version check instead of a true
  number. IE:

use Foo '1.234';

  gets passed to Foo->import() and not Foo->VERSION(). This is
  compounded by the fact that Exporter->import() *does* support a
  version check via import(). Arguably if we allow string versions
  (IMO we should) then we should deal with this in the parser, not
  in import() (although the latter is a little more debatable IMO).

* Explicit calls to import() with a version number.

* Mistakenly requesting an export from a module that doesn't
  actually export anything. One possible explanation for this case
  is that a module was at one point in its lifetime not a class, but
  then was later on turned into a class and the arguments to use
  statements weren't changed even though the main code was
  changed to use class syntax.

Because of the scope of the breakage of the original error this patch
downgrades the error to a depecation warning instead, with the intention
that in 5.44 we will make it a hard error.




[Perl/perl5] b62b25: t/test.pl - if string difference is before positio...

2023-07-25 Thread Yves Orton via perl5-changes
  Branch: refs/heads/yves/misc_build_fixes
  Home:   https://github.com/Perl/perl5
  Commit: b62b2513cb8f08b52e958248565d630f049df3d1
  
https://github.com/Perl/perl5/commit/b62b2513cb8f08b52e958248565d630f049df3d1
  Author: Yves Orton 
  Date:   2023-07-25 (Tue, 25 Jul 2023)

  Changed paths:
M t/test.pl

  Log Message:
  ---
  t/test.pl - if string difference is before position 40 do it right

We were displaying the start of the string wrong when the difference
started before offset 40.


  Commit: 2dac55f7c1729c235f12936c285fe7c3a613029e
  
https://github.com/Perl/perl5/commit/2dac55f7c1729c235f12936c285fe7c3a613029e
  Author: Yves Orton 
  Date:   2023-07-25 (Tue, 25 Jul 2023)

  Changed paths:
M Porting/sync-with-cpan

  Log Message:
  ---
  Porting/sync-with-cpan - fixup git checkout command for later gits

modern gits dont split arguments with spaces in them


Compare: https://github.com/Perl/perl5/compare/b62b2513cb8f%5E...2dac55f7c172


[Perl/perl5]

2023-07-25 Thread Yves Orton via perl5-changes
  Branch: refs/heads/yves/update_io_compress_and_friends
  Home:   https://github.com/Perl/perl5


[Perl/perl5] 431d55: cpan/Compress-Raw-Zlib - Update to version 2.206

2023-07-25 Thread Yves Orton via perl5-changes
  Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 431d55fcb3f41557abe2a2a238f5136f6f2cb732
  
https://github.com/Perl/perl5/commit/431d55fcb3f41557abe2a2a238f5136f6f2cb732
  Author: Yves Orton 
  Date:   2023-07-25 (Tue, 25 Jul 2023)

  Changed paths:
M Porting/Maintainers.pl
M cpan/Compress-Raw-Zlib/lib/Compress/Raw/Zlib.pm

  Log Message:
  ---
  cpan/Compress-Raw-Zlib - Update to version 2.206

  2.206 25 July 2023

  * 2.206
Tue, 25 Jul 2023 16:18:52 +0100
b74db6a4557769233f1504bc94fbc4bafb0efc8a

  * drop rt.cpan from SUPPORT section
Tue, 18 Jul 2023 09:22:34 +0100
a2c231b7e3e178c150c614bad7dc4d8a91fa4b8a


  Commit: 73cf7e75f80aed3085efbef1cd9f801b3d1b0b79
  
https://github.com/Perl/perl5/commit/73cf7e75f80aed3085efbef1cd9f801b3d1b0b79
  Author: Yves Orton 
  Date:   2023-07-25 (Tue, 25 Jul 2023)

  Changed paths:
M Porting/Maintainers.pl
M cpan/Compress-Raw-Bzip2/lib/Compress/Raw/Bzip2.pm
M cpan/Compress-Raw-Bzip2/t/000prereq.t

  Log Message:
  ---
  cpan/Compress-Raw-Bzip2 - Update to version 2.206

  2.206 25 July 2023

* 2.206
  Tue, 25 Jul 2023 16:21:41 +0100
  8cb376d21785d7304586cd03d528a9d2d56aeb58

* drop rt.cpan from SUPPORT section
  Tue, 18 Jul 2023 09:22:56 +0100
  4dba5be3e368bc6681a229294a07e34abcae858d


  Commit: 74397897966ead5d27df755bf78e4912d2e85193
  
https://github.com/Perl/perl5/commit/74397897966ead5d27df755bf78e4912d2e85193
  Author: Yves Orton 
  Date:   2023-07-25 (Tue, 25 Jul 2023)

  Changed paths:
M MANIFEST
M Porting/Maintainers.pl
M cpan/IO-Compress/Makefile.PL
M cpan/IO-Compress/lib/Compress/Zlib.pm
M cpan/IO-Compress/lib/IO/Compress/Adapter/Bzip2.pm
M cpan/IO-Compress/lib/IO/Compress/Adapter/Deflate.pm
M cpan/IO-Compress/lib/IO/Compress/Adapter/Identity.pm
M cpan/IO-Compress/lib/IO/Compress/Base.pm
M cpan/IO-Compress/lib/IO/Compress/Base/Common.pm
M cpan/IO-Compress/lib/IO/Compress/Bzip2.pm
M cpan/IO-Compress/lib/IO/Compress/Deflate.pm
M cpan/IO-Compress/lib/IO/Compress/Gzip.pm
M cpan/IO-Compress/lib/IO/Compress/Gzip/Constants.pm
M cpan/IO-Compress/lib/IO/Compress/RawDeflate.pm
M cpan/IO-Compress/lib/IO/Compress/Zip.pm
M cpan/IO-Compress/lib/IO/Compress/Zip/Constants.pm
M cpan/IO-Compress/lib/IO/Compress/Zlib/Constants.pm
M cpan/IO-Compress/lib/IO/Compress/Zlib/Extra.pm
M cpan/IO-Compress/lib/IO/Uncompress/Adapter/Bunzip2.pm
M cpan/IO-Compress/lib/IO/Uncompress/Adapter/Identity.pm
M cpan/IO-Compress/lib/IO/Uncompress/Adapter/Inflate.pm
M cpan/IO-Compress/lib/IO/Uncompress/AnyInflate.pm
M cpan/IO-Compress/lib/IO/Uncompress/AnyUncompress.pm
M cpan/IO-Compress/lib/IO/Uncompress/Base.pm
M cpan/IO-Compress/lib/IO/Uncompress/Bunzip2.pm
M cpan/IO-Compress/lib/IO/Uncompress/Gunzip.pm
M cpan/IO-Compress/lib/IO/Uncompress/Inflate.pm
M cpan/IO-Compress/lib/IO/Uncompress/RawInflate.pm
M cpan/IO-Compress/lib/IO/Uncompress/Unzip.pm
R cpan/IO-Compress/t/000prereq.t
M cpan/IO-Compress/t/006zip.t

  Log Message:
  ---
  cpan/IO-Compress - Update to version 2.206

  2.206 25 July 2023

  * 2.206
Tue, 25 Jul 2023 16:37:44 +0100
6f00921ce36a80f6b507402cee71e9f3a9cc406d

  * Merge branch 'master' of https://github.com/pmqs/IO-Compress
Sat, 22 Jul 2023 20:22:41 +0100
d561922b964796e94c94c89f69550de5b95fb342

  * Merge pull request #50 from haarg/fix-version-check
Sat, 22 Jul 2023 19:13:38 +0100
9d4f8755024db3bc16a628fa736680cd6f0b90ab

  * fix version checks to use correct method
Fri, 21 Jul 2023 18:36:29 +0200
c60f5c619f9a8c3038428724a01c6722e51e37a7

  * drop rt.cpan from SUPPORT section
Tue, 18 Jul 2023 09:19:52 +0100
02fc4ab0b2c9c30c7014238f20bf02e2857d4c52


Compare: https://github.com/Perl/perl5/compare/0d202a958ace...74397897966e


[Perl/perl5] 97d6a3: cpan/Compress-Raw-Zlib - Update to version 2.206

2023-07-25 Thread Yves Orton via perl5-changes
  Branch: refs/heads/yves/update_io_compress_and_friends
  Home:   https://github.com/Perl/perl5
  Commit: 97d6a34b9bac901389d5c4d35bb5255289356d15
  
https://github.com/Perl/perl5/commit/97d6a34b9bac901389d5c4d35bb5255289356d15
  Author: Yves Orton 
  Date:   2023-07-25 (Tue, 25 Jul 2023)

  Changed paths:
M Porting/Maintainers.pl
M cpan/Compress-Raw-Zlib/lib/Compress/Raw/Zlib.pm

  Log Message:
  ---
  cpan/Compress-Raw-Zlib - Update to version 2.206

  2.206 25 July 2023

  * 2.206
Tue, 25 Jul 2023 16:18:52 +0100
b74db6a4557769233f1504bc94fbc4bafb0efc8a

  * drop rt.cpan from SUPPORT section
Tue, 18 Jul 2023 09:22:34 +0100
a2c231b7e3e178c150c614bad7dc4d8a91fa4b8a


  Commit: 34419e1446af844c81a84e4611a506cf9fa42d22
  
https://github.com/Perl/perl5/commit/34419e1446af844c81a84e4611a506cf9fa42d22
  Author: Yves Orton 
  Date:   2023-07-25 (Tue, 25 Jul 2023)

  Changed paths:
M Porting/Maintainers.pl
M cpan/Compress-Raw-Bzip2/lib/Compress/Raw/Bzip2.pm
M cpan/Compress-Raw-Bzip2/t/000prereq.t

  Log Message:
  ---
  cpan/Compress-Raw-Bzip2 - Update to version 2.206

  2.206 25 July 2023

* 2.206
  Tue, 25 Jul 2023 16:21:41 +0100
  8cb376d21785d7304586cd03d528a9d2d56aeb58

* drop rt.cpan from SUPPORT section
  Tue, 18 Jul 2023 09:22:56 +0100
  4dba5be3e368bc6681a229294a07e34abcae858d


  Commit: abf668fc32be6319ac749e1f6ba8f1b986f02c2c
  
https://github.com/Perl/perl5/commit/abf668fc32be6319ac749e1f6ba8f1b986f02c2c
  Author: Yves Orton 
  Date:   2023-07-25 (Tue, 25 Jul 2023)

  Changed paths:
M MANIFEST
M Porting/Maintainers.pl
M cpan/IO-Compress/Makefile.PL
M cpan/IO-Compress/lib/Compress/Zlib.pm
M cpan/IO-Compress/lib/IO/Compress/Adapter/Bzip2.pm
M cpan/IO-Compress/lib/IO/Compress/Adapter/Deflate.pm
M cpan/IO-Compress/lib/IO/Compress/Adapter/Identity.pm
M cpan/IO-Compress/lib/IO/Compress/Base.pm
M cpan/IO-Compress/lib/IO/Compress/Base/Common.pm
M cpan/IO-Compress/lib/IO/Compress/Bzip2.pm
M cpan/IO-Compress/lib/IO/Compress/Deflate.pm
M cpan/IO-Compress/lib/IO/Compress/Gzip.pm
M cpan/IO-Compress/lib/IO/Compress/Gzip/Constants.pm
M cpan/IO-Compress/lib/IO/Compress/RawDeflate.pm
M cpan/IO-Compress/lib/IO/Compress/Zip.pm
M cpan/IO-Compress/lib/IO/Compress/Zip/Constants.pm
M cpan/IO-Compress/lib/IO/Compress/Zlib/Constants.pm
M cpan/IO-Compress/lib/IO/Compress/Zlib/Extra.pm
M cpan/IO-Compress/lib/IO/Uncompress/Adapter/Bunzip2.pm
M cpan/IO-Compress/lib/IO/Uncompress/Adapter/Identity.pm
M cpan/IO-Compress/lib/IO/Uncompress/Adapter/Inflate.pm
M cpan/IO-Compress/lib/IO/Uncompress/AnyInflate.pm
M cpan/IO-Compress/lib/IO/Uncompress/AnyUncompress.pm
M cpan/IO-Compress/lib/IO/Uncompress/Base.pm
M cpan/IO-Compress/lib/IO/Uncompress/Bunzip2.pm
M cpan/IO-Compress/lib/IO/Uncompress/Gunzip.pm
M cpan/IO-Compress/lib/IO/Uncompress/Inflate.pm
M cpan/IO-Compress/lib/IO/Uncompress/RawInflate.pm
M cpan/IO-Compress/lib/IO/Uncompress/Unzip.pm
R cpan/IO-Compress/t/000prereq.t
M cpan/IO-Compress/t/006zip.t

  Log Message:
  ---
  cpan/IO-Compress - Update to version 2.206

  2.206 25 July 2023

  * 2.206
Tue, 25 Jul 2023 16:37:44 +0100
6f00921ce36a80f6b507402cee71e9f3a9cc406d

  * Merge branch 'master' of https://github.com/pmqs/IO-Compress
Sat, 22 Jul 2023 20:22:41 +0100
d561922b964796e94c94c89f69550de5b95fb342

  * Merge pull request #50 from haarg/fix-version-check
Sat, 22 Jul 2023 19:13:38 +0100
9d4f8755024db3bc16a628fa736680cd6f0b90ab

  * fix version checks to use correct method
Fri, 21 Jul 2023 18:36:29 +0200
c60f5c619f9a8c3038428724a01c6722e51e37a7

  * drop rt.cpan from SUPPORT section
Tue, 18 Jul 2023 09:19:52 +0100
02fc4ab0b2c9c30c7014238f20bf02e2857d4c52


Compare: https://github.com/Perl/perl5/compare/97d6a34b9bac%5E...abf668fc32be


[Perl/perl5] 73febb: perl_langinfo.h: #include if available

2023-07-25 Thread Karl Williamson via perl5-changes
  Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 73febbcd8631a76bf7ba5e8dfe52232e988292c3
  
https://github.com/Perl/perl5/commit/73febbcd8631a76bf7ba5e8dfe52232e988292c3
  Author: Karl Williamson 
  Date:   2023-07-25 (Tue, 25 Jul 2023)

  Changed paths:
M perl_langinfo.h

  Log Message:
  ---
  perl_langinfo.h: #include  if available

Prior to this commit, it also needed to have nl_langinfo() available.
On POSIX systems you'll have both, so the extra condition doesn't buy
anything, and the next commit will allow for a non-standard test
environment where that extra condition gets in the way.


  Commit: 0d202a958ace7f1eceb35343d56ebdcc25335d2b
  
https://github.com/Perl/perl5/commit/0d202a958ace7f1eceb35343d56ebdcc25335d2b
  Author: Karl Williamson 
  Date:   2023-07-25 (Tue, 25 Jul 2023)

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

  Log Message:
  ---
  Add ability to emulate mingw locales on other boxes

This commit allows the ability to Configure a perl to use much of the
locale handling code that MingW executes (an to a large extent MSVC as
well).  It is an aid to development on more POSIX-like boxes to be able
to compile and test while partially simulating a MingW environment.

This exercizes code paths that are not compiled on non-Windows boxes,
and allows for ASAN.  This is thus a way to see if locale.c on Windows
is likely going to compile, without having to use a real Win32 box.  And
running the test suite will verify to a large extent our logic and
memory allocation handling for such boxes.  And access to ASAN and
PERL_MEM_LOG (which in July 2023 doesn't work properly on Windows) is
helpful for debugging such issues.  Of course the underlying calls are
to the POSIX libc, so any differences in implementation between those
and the Windows versions will not be caught by this.

This currently fails a couple of tests in the suite; there are commits
in the pipeline to fix those.

Remember this only gets compiled if explicitly requested.


Compare: https://github.com/Perl/perl5/compare/ab1f5e3581df...0d202a958ace


[Perl/perl5] 8d5b34: makedef.pl: Remove redundant set

2023-07-25 Thread Karl Williamson via perl5-changes
  Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 8d5b344cae7c43d8a1548db9fa7708a197de3d33
  
https://github.com/Perl/perl5/commit/8d5b344cae7c43d8a1548db9fa7708a197de3d33
  Author: Karl Williamson 
  Date:   2023-07-25 (Tue, 25 Jul 2023)

  Changed paths:
M makedef.pl

  Log Message:
  ---
  makedef.pl: Remove redundant set

This ||= is useless, as just above we've already set MULTIPLICITY if
USE_ITHREADS is set.


  Commit: aa4cd703c149ad292d6d89efa0c102fee014840e
  
https://github.com/Perl/perl5/commit/aa4cd703c149ad292d6d89efa0c102fee014840e
  Author: Karl Williamson 
  Date:   2023-07-25 (Tue, 25 Jul 2023)

  Changed paths:
M makedef.pl

  Log Message:
  ---
  makedef.pl: Don't use locale items unless using locale

If we are configured to not look at locales at all, we shouldn't be
looking at threaded locales nor POSIX 2008 ones.

This commit fixes a situation that is not likely at all to show up in
real life, but I stumbled across it in testing weird configurations.


  Commit: 2a1a6207f8ba69f6b00f64c93714466584c2108d
  
https://github.com/Perl/perl5/commit/2a1a6207f8ba69f6b00f64c93714466584c2108d
  Author: Karl Williamson 
  Date:   2023-07-25 (Tue, 25 Jul 2023)

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

  Log Message:
  ---
  Remove PL_cur_LC_ALL for non-Windows

This value is now held in a slot in PL_curlocales[] for non-Windows
platforms.


  Commit: b60d50d3d0c9ba7ed9b7dbe2ee3054a7c2590e2f
  
https://github.com/Perl/perl5/commit/b60d50d3d0c9ba7ed9b7dbe2ee3054a7c2590e2f
  Author: Karl Williamson 
  Date:   2023-07-25 (Tue, 25 Jul 2023)

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

  Log Message:
  ---
  locale.c: Rename S_myquerylocale_i()

This name doesn't effectively describe it.  The new name is
querylocale_2008_i, indicating it is for the POSIX 2008 API.


  Commit: 9106edf58567a1d5f69235f02341267df69d3da7
  
https://github.com/Perl/perl5/commit/9106edf58567a1d5f69235f02341267df69d3da7
  Author: Karl Williamson 
  Date:   2023-07-25 (Tue, 25 Jul 2023)

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

  Log Message:
  ---
  locale.c: Separate setlocale into bool and query

There are two ways that POSIX specifies to change the locale.

The earlier interface is setlocale(), which either returns NULL on
failure, or a pointer to global static memory containing the character
string of the changed locale.  That may very well be the input locale
name, or the platform can return something that to it is equivalent.

The second, from the 2008 standard, is newlocale() which returns either
NULL on failure, or a pointer to an opaque object, and there is no
official way to find out what the current locale is.  (The next proposed
version of the Standard will finally add this capability.)  Some
platforms have introduced a querylocale() to get this information.
(glibc has a hidden function to do so.)

Note that the return value of setlocale() is problematic, valid only
until the next call to that function, which might be immediately from
another thread.  The value, if needed, has to be saved to a per-thread
buffer in a critical section with the function call.  That buffer
presents opportunities for leaking, or being destroyed too early,
resulting in heap use after being freed.

And it turns out that the value is often not needed; often what is
needed is only if the operation failed or succeeded.

This commit starts the process of limiting the use of the changed value
to just where its really needed.  It does this by changing the
newlocale() form to return success/failure, removing all the macros that
think you can set and get the value in the same operation, and minor
fixups.


  Commit: 250057152aa9a5d63f77e985873b25d11bad77e8
  
https://github.com/Perl/perl5/commit/250057152aa9a5d63f77e985873b25d11bad77e8
  Author: Karl Williamson 
  Date:   2023-07-25 (Tue, 25 Jul 2023)

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

  Log Message:
  ---
  locale.c: Rmv less_dicey_void_setlocale_r()

This function is simple, but almost entirely redundant with
less_dicey_bool_setlocale_r().  A simple wrapper to the latter suffices.

The commit also changes the macros for this to use void_setlocale_r() as
the base which the other two are defined in terms of.  This avoids a
runtime calculation of the internal index corresponding to the input
locale category except when we are about to panic.


  Commit: be682cacfd159685d6b059d24008f50d616b9dc5
  
https://github.com/Perl/perl5/commit/be682cacfd159685d6b059d24008f50d616b9dc5
  Author: Karl Williamson 
  Date:   2023-07-25 (Tue, 25 Jul 2023)

  Changed paths:
M locale.c

  Log Message:
  ---
  locale.c: Avoid a runtime calculation

As in the previous commit, this rewrites the void_setlocale_X macros so
as to not need a runtime calculation except in 

[Perl/perl5] ec57fb: Move PerlIO::scalar into core

2023-07-25 Thread Leon Timmermans via perl5-changes
  Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: ec57fb93199ca1a31750d2ba7af329d93a0f2df3
  
https://github.com/Perl/perl5/commit/ec57fb93199ca1a31750d2ba7af329d93a0f2df3
  Author: Leon Timmermans 
  Date:   2023-07-25 (Tue, 25 Jul 2023)

  Changed paths:
M MANIFEST
M META.json
M META.yml
M ext/PerlIO-scalar/scalar.pm
R ext/PerlIO-scalar/scalar.xs
R ext/PerlIO-scalar/t/scalar.t
R ext/PerlIO-scalar/t/scalar_ungetc.t
M perlio.c
M pod/perldiag.pod
M t/base/rs.t
M t/io/crlf.t
M t/io/open.t
M t/io/perlio.t
A t/io/scalar.t
A t/io/scalar_ungetc.t
M t/io/utf8.t
M t/op/goto.t
M t/op/gv.t
M t/op/inccode.t
M t/op/print.t
M t/op/pwent.t
M t/uni/gv.t

  Log Message:
  ---
  Move PerlIO::scalar into core

This moves PerlIO::scalar into core. This prevents unpredictable
behavior when the module can't be loaded, and also allows miniperl to
run tests that need :scalar handles.