This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Tony Cook [Tue, 6 Oct 2020 06:07:00 +0000 (17:07 +1100)]
Win32: add lstat(), fetch st_dev and st_ino and fetch st_nlink for fstat
We need lstat() for various modules to work well with symlinks,
and the same modules often want to check for matches on the device
and inode number.
The values we're using for st_ino match those that the Python and Rust
libraries use, and Go uses the same volume and file index values for
testing if two stat objects refer to the same file.
They aren't entirely unique, given ReFS uses 128-bit file ids, but
the API used to check for this (GetFileInformationByHandleEx() for
FileIdInfo) is only available on server operating systems, so I can't
directly test it anyway.
Karl Williamson [Tue, 1 Dec 2020 03:55:30 +0000 (20:55 -0700)]
Account for 'less' reserving an extra column
After decades of stability, the 'less' pager project decided to claim an
extra column for its own use when called with certain common options.
This commit changes some of the auto-generating tools to wrap one column
earlier to compensate, and changes podcheck to also whine on wide
verbatim text one column less. But it changes the podcheck data base
to grandfather-in all the many existing places that exceed that amount.
That means only changes made to pods after this commit will be held to
the stricter value.
Of course, what this means is those pods will wrap or truncate in these
places on an 80 column window, making them harder to read, when used
with 'less' and when it is called with the options that reserve those
two columns. Patches welcome.
I haven't seen the wrapping problem with perldoc, and haven't
investigated much.
Karl Williamson [Sat, 29 Aug 2020 16:55:02 +0000 (10:55 -0600)]
Document various CopFILEfoo functions
Karl Williamson [Sat, 17 Oct 2020 13:18:16 +0000 (07:18 -0600)]
opcode.h: Restrict scope of internal variables to core
Karl Williamson [Thu, 27 Aug 2020 17:03:44 +0000 (11:03 -0600)]
Document SvSHARED_HASH
Graham Knop [Tue, 24 Nov 2020 20:42:05 +0000 (21:42 +0100)]
bump version of ExtUtils::ParseXS
Graham Knop [Tue, 24 Nov 2020 20:27:43 +0000 (21:27 +0100)]
restore compatibility with old versions of ExtUtils::ParseXS
ExtUtils::ParseXS used to include a function called "errors", which was
documented. In was renamed to report_error_count in version 3.01 (perl
5.15.1) although the documentation wasn't fixed until 3.21 (perl 5.19.2).
As a documented function, this is a backwards compatibility issue.
It is possible for this to lead to errors when installing modules from
CPAN. If you are using the version of ExtUtils::ParseXS that comes with
core, between running the Makefile.PL and make, fulfilling prereqs can
result in upgrading ExtUtils::ParseXS. When Makefile.PL is run, the
generated Makefile gets the full path to xsubpp saved in it. Then when
upgraded from CPAN, ExtUtils::ParseXS and xsubpp will be in a new
location (site_perl or a local::lib). Running make will run the old
xsubpp, but it will then try to use the new ExtUtils::ParseXS which has
broken compatibility.
Restore the errors function as a compatibility shim to fix this.
Karl Williamson [Sat, 17 Oct 2020 12:43:55 +0000 (06:43 -0600)]
cop.h: Extend core-only portion
This encloses some #defines in a PERL_CORE section, as their only use is
in the macro immediately following, already confined to core.
Karl Williamson [Wed, 7 Oct 2020 19:22:54 +0000 (13:22 -0600)]
INSTALL: Fix grammar/typos
Karl Williamson [Sun, 6 Sep 2020 04:18:06 +0000 (22:18 -0600)]
perlapi: Consolidate svREFCNT_dec-ish entries
Karl Williamson [Sat, 7 Mar 2020 19:54:19 +0000 (12:54 -0700)]
DynaLoader: use PerlEnv_getenv()
Doing so invokes thread-safe guards
Karl Williamson [Sat, 17 Oct 2020 13:04:41 +0000 (07:04 -0600)]
op.h: Restrict to core certain internal symbols
so that they aren't accessible to XS code and won't be picked up by
autodoc
Karl Williamson [Sun, 6 Sep 2020 04:20:45 +0000 (22:20 -0600)]
perlapi: Consolidate SvPVX-ish entries
David Cantrell [Mon, 27 Jan 2020 16:02:05 +0000 (16:02 +0000)]
Add -negative import args for 'use warnings'
Karl Williamson [Sun, 6 Sep 2020 04:17:19 +0000 (22:17 -0600)]
perlapi: Consolidate SvREFCNT_INC-ish entries
Karen Etheridge [Fri, 20 Nov 2020 23:57:25 +0000 (15:57 -0800)]
add extra language in the quotemeta() docs for embedded \ and $
One paragraph was lifted from perlop.pod, and the other from perlre.pod.
Dan Book [Fri, 27 Nov 2020 04:19:13 +0000 (23:19 -0500)]
perlvar - clarify that paragraph mode also discards a single leading newline
Karl Williamson [Thu, 26 Nov 2020 01:20:28 +0000 (18:20 -0700)]
Avoid deadlock with PERL_MEM_LOG
This fixes GH #18341
The Perl wrapper for getenv() was changed in 5.32 to allocate memory to
squirrel safely away the result of the wrapped getenv() call. It does
this while in a critical section so as to make sure another thread can't
interrupt it and destroy it.
Unfortunately, when Perl is compiled for debugging memory problems and
has PERL_MEM_LOG enabled, that allocation causes a recursive call to
getenv() for the purpose of checking an environment variable to see how
to log that allocation. And hence it deadlocks trying to enter the
critical section.
There are various solutions. One is to use or emulate a general semaphore
instead of a binary one. This is effectively what
PL_lc_numeric_mutex_depth does for another mutex, and the code for that
could be used as a template.
But given that this is an extreme edge case which requires Perl to be
specially compiled to enable this feature which is used only for
debugging, a much simpler, if less safe if it were to ever be used in
production, solution should suffice. Tony Cook suggested just avoiding
the wrapper for this particular purpose.
Karl Williamson [Wed, 12 Aug 2020 20:59:12 +0000 (14:59 -0600)]
Add mutex locking for many-reader/1-writer
The mutex macros already in perl are sufficient to allow us to emulate
this type of locking, which may also be available natively, but I don't
think it is worth the effort to use the native calls.
Karl Williamson [Thu, 26 Nov 2020 13:16:13 +0000 (06:16 -0700)]
locale.c: Move comment to better place
Dan Book [Thu, 26 Nov 2020 02:29:22 +0000 (21:29 -0500)]
perlsub - indicate version requirement for "delete local"
Karl Williamson [Wed, 25 Nov 2020 13:54:37 +0000 (06:54 -0700)]
perlapi: PL_sv_yes and kin are read-only
Karl Williamson [Wed, 18 Nov 2020 03:35:55 +0000 (20:35 -0700)]
perlapi: Remove per-thread section; move to real scns
Instead of having a grab bag section of all interpreter variables, move
their documentation to the section that they actually fit under.
Karl Williamson [Wed, 18 Nov 2020 03:35:01 +0000 (20:35 -0700)]
perlapi: Move PL_dowarn to Warnings section
Tony Cook [Tue, 24 Nov 2020 03:31:08 +0000 (14:31 +1100)]
perldelta updates for the SysV IPC changes
Tony Cook [Tue, 24 Nov 2020 02:52:59 +0000 (13:52 +1100)]
Various updates and fixes to some of the SysV IPC ops and their tests
Tony Cook [Wed, 18 Nov 2020 04:02:05 +0000 (15:02 +1100)]
io/shm.t: make runnable as ./perl io/shm.t
and give editors a hint
Tony Cook [Wed, 18 Nov 2020 04:01:13 +0000 (15:01 +1100)]
shmwrite: treat the string as bytes
Tony Cook [Wed, 18 Nov 2020 03:26:38 +0000 (14:26 +1100)]
msgrcv: properly downgrade the receive buffer
If the receive buffer started with SVf_UTF8 on, the received message
SV would stay flagged, corrupting the result.
Tony Cook [Wed, 18 Nov 2020 03:20:47 +0000 (14:20 +1100)]
msgsnd: handle an upgraded MSG parameter correctly
Tony Cook [Wed, 18 Nov 2020 00:42:24 +0000 (11:42 +1100)]
perlfunc/msgsnd: the supplied MSG doesn't have a length field
The length of the message is derived from the length of the MSG
less the size of the type field.
Tony Cook [Tue, 17 Nov 2020 23:27:50 +0000 (10:27 +1100)]
fix UTF-8 handling for semop()
As with semctl(), the UTF-8 flag on the passed in opstring was ignored,
which meant that the upgraded version of the same string would
cause an error.
Just use SvPVbyte().
Tony Cook [Tue, 17 Nov 2020 04:59:44 +0000 (15:59 +1100)]
io/sem.t: eliminate warnings
This eliminates some warnings that semctl() (or other *ctl()) calls
might generate, and some warnings specific to io/sem.t:
- for IPC_STAT and GETALL, the current value of ARG is overwritten
so making an undefined value warning for it nonsensical, so don't
use SvPV_force().
- for other calls, ARG is either ignored, or in a behaviour
introduced in perl 3 (along with the ops), treats the supplied
value as an integer which is then converted to a pointer. Rather
than warning on an undef value which is most likely to be ignored
we treat the undef as zero without the usual warning.
- always pass a number for SEMNUM in the test code
I didn't try to eliminate warning for non-numeric/undefined SEMNUM,
since while we know it isn't used by SETALL, GETALL, IPC_STAT and
IPC_SET, it may or may not be used by system defined *ctl() operators
such as SEM_INFO and SHM_LOCK on Linux.
fixes #17926
Tony Cook [Tue, 17 Nov 2020 03:25:36 +0000 (14:25 +1100)]
*ctl: test that we throw on a code point above 0xff
These functions expect a packed structure of some point
representing bytes from the structure in memory.
Tony Cook [Tue, 17 Nov 2020 03:20:41 +0000 (14:20 +1100)]
*ctl: test we handle the buffer as bytes
Previously this had the "unicode bug", an upgraded string would
be treated as the encoding of that string, rather than the raw
bytes.
Tony Cook [Tue, 17 Nov 2020 03:07:32 +0000 (14:07 +1100)]
*ctl: ensure the ARG parameter's UTF-8 flag is reset
If the SV supplied as ARG had the SVf_UTF8 flag on it would be left
on, which would effectively corrupt the returned buffer.
Only tested with shmctl(), since the other *ctl() functions only have
more complex structures with indeterminate types that would require
more effort to test.
Dan Book [Mon, 23 Nov 2020 07:59:53 +0000 (02:59 -0500)]
perl - update usage data to match perlrun
Tony Cook [Mon, 23 Nov 2020 23:24:28 +0000 (10:24 +1100)]
John Karr is now a perl author
John Karr [Thu, 12 Nov 2020 08:30:49 +0000 (03:30 -0500)]
fix typo in comp/parser.t
3 similar tests eval a sub with a list of variables, $r is repeated at the
end of the list, but the errors that are being checked have nothing to do with
the repeated variable. This causes a warning enabled.
John Karr [Tue, 10 Nov 2020 22:14:24 +0000 (17:14 -0500)]
comp/parser.t count two lines that were being tested to see if they crashed
parser as tests (PASS if the test file is still running after the lines).
Tony Cook [Mon, 23 Nov 2020 23:18:18 +0000 (10:18 +1100)]
bump $Carp::VERSION
Graham Knop [Mon, 23 Nov 2020 22:12:49 +0000 (23:12 +0100)]
fix context of caller call in Carp
Carp's CARP_NOT variable is meant to have package names. caller in list
context returns the calling file and line in addition to the package
name.
Enforce scalar context on the call to caller to fix this.
Karl Williamson [Sat, 17 Oct 2020 21:49:53 +0000 (15:49 -0600)]
perlapi: Document UVf, as deprecated
Karl Williamson [Thu, 27 Aug 2020 15:24:12 +0000 (09:24 -0600)]
perlapi: Note proper rplcemnt for pad_compname_type
Tony Cook [Thu, 19 Nov 2020 05:08:05 +0000 (16:08 +1100)]
add a brief introduction to the IO SV type
Karl Williamson [Sat, 17 Oct 2020 13:32:18 +0000 (07:32 -0600)]
Confine scope of SV_CONST to core
as well as the constants it uses. This is unused in cpan
Shlomi Fish [Thu, 29 Oct 2020 13:40:07 +0000 (15:40 +0200)]
Add a usage note about the "l" modifier.
Tomasz Konojacki [Thu, 29 Oct 2020 17:58:10 +0000 (18:58 +0100)]
win32: remove support for disabling USE_LARGE_FILES
It was enabled by default on all compilers. I don't think it ever
makes sense to disable it.
Karl Williamson [Sat, 17 Oct 2020 12:55:50 +0000 (06:55 -0600)]
Restrict scope/Shorten some very long macro names
The names were intended to force people to not use them outside their
intended scopes. But by restricting those scopes in the first place, we
don't need such unwieldy names
Karl Williamson [Wed, 22 Jul 2020 22:16:41 +0000 (16:16 -0600)]
embed.fnc: Mark reginitcolors as Core only
This is used for internal initialization, and there are no uses on cpan
Karl Williamson [Sun, 6 Sep 2020 16:17:42 +0000 (10:17 -0600)]
perlapi: Consolidate Sv{INU]VX-ish entries
Tony Cook [Sun, 22 Nov 2020 23:57:25 +0000 (10:57 +1100)]
Update gitignore files to reflect files in repo
Graham Knop [Thu, 19 Nov 2020 11:09:55 +0000 (12:09 +0100)]
fix splittree.pl ignore to only apply to root
There is a real splittree.pl in NetWare/, which may be copied to the
root. Ignore the file in the root, but not the file in NetWare/.
Graham Knop [Thu, 19 Nov 2020 11:08:48 +0000 (12:08 +0100)]
remove ignore for perlvms.pod, which is a real file now
Graham Knop [Thu, 19 Nov 2020 11:08:19 +0000 (12:08 +0100)]
move ignore for re into its own dists gitignore
Graham Knop [Thu, 19 Nov 2020 11:07:50 +0000 (12:07 +0100)]
move ignore for XS-APItest into dists own gitignore
Graham Knop [Thu, 19 Nov 2020 11:06:20 +0000 (12:06 +0100)]
remove ignore for Test-Harness directory which no longer exists
Graham Knop [Thu, 19 Nov 2020 11:05:27 +0000 (12:05 +0100)]
remove ignore for dl_win32.xs, since it is a real file now
Graham Knop [Thu, 19 Nov 2020 11:02:15 +0000 (12:02 +0100)]
add gitignore exclusions for files in git
There are a number of files excluded using gitignore rules that are
included in the repository. This can lead to confusion if something
other than git tries to read the ignore files.
Add rules to the gitignore files so that these files won't be ignored.
Karl Williamson [Sun, 6 Sep 2020 16:08:14 +0000 (10:08 -0600)]
sv.h: Add comments
Karl Williamson [Sun, 22 Nov 2020 22:45:05 +0000 (15:45 -0700)]
regcharclass.h: Simplify some expressions
The regen script was improperyly collapsing two-element ranges into two
separate elements, which caused extraneous code to be generated.
Karl Williamson [Sun, 22 Nov 2020 16:36:20 +0000 (09:36 -0700)]
Slience compiler warnings for NV, [IU]V compare
These were occurring on FreeBSD smokes.
warning: implicit conversion from 'IV' (aka 'long') to 'double' changes value from
9223372036854775807 to
9223372036854775808 [-Wimplicit-int-float-conversion]
9223372036854775807 is IV_MAX. What needed to be done here was to use
the NV containing IV_MAX+1, a value that already exists in perl.h
In other instances, simply casting to an NV before doing the comparison
with the NV was what was needed.
This fixes #18328
Karl Williamson [Sun, 6 Sep 2020 04:04:22 +0000 (22:04 -0600)]
perlapi: Consolidate sv_vsetpvf-ish entries
Karl Williamson [Sun, 6 Sep 2020 03:50:10 +0000 (21:50 -0600)]
perlapi: Consolidate sv_catpv-ish entries
Karl Williamson [Sat, 14 Nov 2020 23:22:28 +0000 (16:22 -0700)]
Document dTHXa, dTHXoa
Karl Williamson [Wed, 22 Jul 2020 23:02:37 +0000 (17:02 -0600)]
Document isGV_with_GP
Karl Williamson [Thu, 27 Aug 2020 12:59:49 +0000 (06:59 -0600)]
Document NUM2PTR
or at least lead people to use something better
Karl Williamson [Sat, 7 Nov 2020 20:17:05 +0000 (13:17 -0700)]
Mark despatch_signals as core only
Karl Williamson [Sat, 21 Nov 2020 19:24:53 +0000 (12:24 -0700)]
sv.c: Add missing pod markup
The item referred to in a L<> is in perlapi, so should be marked as
internal to the same pod.
Karl Williamson [Sun, 6 Sep 2020 04:12:01 +0000 (22:12 -0600)]
perlapi: Consolidate sv_vcatpvf-ish entries
Karl Williamson [Sun, 6 Sep 2020 04:08:38 +0000 (22:08 -0600)]
perlapi: Consolidate sv_catpvf-ish entries
Karl Williamson [Sun, 6 Sep 2020 04:03:24 +0000 (22:03 -0600)]
perlapi: Consolidate sv_setpvf-ish entries
Karl Williamson [Sun, 6 Sep 2020 03:55:34 +0000 (21:55 -0600)]
perlapi: Consolidate sv_setpviv-ish entries
Sawyer X [Sat, 21 Nov 2020 12:00:58 +0000 (14:00 +0200)]
Note down all future releasers for this cycle
Karl Williamson [Tue, 22 Sep 2020 13:20:52 +0000 (07:20 -0600)]
Various COPHH macros have a non-const parameter
The pod says these are const, but they won't compile if actually called
with one.
Karl Williamson [Sun, 6 Sep 2020 03:54:15 +0000 (21:54 -0600)]
perlapi: Consolidate newSVsv-ish entries
Karl Williamson [Sun, 6 Sep 2020 03:51:18 +0000 (21:51 -0600)]
perlapi: Consolidate sv_inc-ish entries
Karen Etheridge [Fri, 20 Nov 2020 17:43:31 +0000 (09:43 -0800)]
fix perlfaq version in perldelta
Tom Hukins [Fri, 20 Nov 2020 17:27:45 +0000 (17:27 +0000)]
Fix documentation grammar
Replace "Frees the all the" with "Frees all the". The original wording
was introduced in
c2217cd33590ef654 and
a4395ebabc8655115.
Tom Hukins [Fri, 20 Nov 2020 17:20:05 +0000 (17:20 +0000)]
Prepare Module::CoreList for 5.33.5
Tom Hukins [Fri, 20 Nov 2020 16:59:27 +0000 (16:59 +0000)]
Bump version to 5.33.5
Tom Hukins [Fri, 20 Nov 2020 16:44:11 +0000 (16:44 +0000)]
Create new perldelta for 5.33.5
Tom Hukins [Fri, 20 Nov 2020 15:06:12 +0000 (15:06 +0000)]
Post-release tasks for 5.33.4
Tom Hukins [Fri, 20 Nov 2020 11:55:35 +0000 (11:55 +0000)]
5.33.4 today
Tom Hukins [Fri, 20 Nov 2020 11:40:59 +0000 (11:40 +0000)]
Finalise perldelta for 5.33.4
Tom Hukins [Fri, 20 Nov 2020 11:17:53 +0000 (11:17 +0000)]
Update Module::CoreList for 5.33.4
Karl Williamson [Fri, 20 Nov 2020 03:27:48 +0000 (20:27 -0700)]
perldelta: Note ongoing perlapi work
Chris 'BinGOs' Williams [Thu, 19 Nov 2020 20:19:17 +0000 (20:19 +0000)]
Update ExtUtils-MakeMaker to CPAN version 7.56
[DELTA]
7.56 Thu 19 Nov 19:57:05 GMT 2020
No changes since v7.55_01
7.55_01 Wed 18 Nov 18:23:19 GMT 2020
Bug fixes:
- RT#133762 Explicitly print to STDOUT in EUMM.pm
Tom Hukins [Thu, 19 Nov 2020 13:38:29 +0000 (13:38 +0000)]
perldelta: the FAQ was updated in
09e51a95
Tony Cook [Wed, 18 Nov 2020 23:50:16 +0000 (10:50 +1100)]
perldelta updates
Karl Williamson [Fri, 13 Nov 2020 04:58:19 +0000 (21:58 -0700)]
Make API some C99 typedef work-arounds
I added these some releases ago, but kept them private. No untoward
things have happened, so I'm now making them API.
Karl Williamson [Thu, 12 Nov 2020 21:40:19 +0000 (14:40 -0700)]
re/fold_grind.pl: Test a couple more code points
These add tests for checking that the revised folding in a future commit
works in some edge cases that previously weren't an issue.
Tom Hukins [Wed, 18 Nov 2020 15:40:23 +0000 (15:40 +0000)]
Update Pod-Simple to CPAN version 3.42
Karl Williamson [Wed, 22 Jul 2020 11:56:01 +0000 (05:56 -0600)]
embed.fnc: Mark 3 sighandler fcns as Core only
These appear to be for internal use, with no cpan usage found
Karl Williamson [Sat, 17 Oct 2020 21:45:58 +0000 (15:45 -0600)]
perlapi: Document memzero
Karl Williamson [Thu, 23 Jul 2020 15:24:06 +0000 (09:24 -0600)]
Remove PERLIO_FUNCS_CONST
As the comment said, this was temporary until vtables got to be all
const
Karl Williamson [Wed, 18 Nov 2020 02:15:06 +0000 (19:15 -0700)]
Move regcurly to regcomp.c (from inline.h)
This function is called only at compile time; experience has shown that
compile-time operations are not time-critical. And future commits will
lengthen it, making it not practically inlinable anyway.
Karl Williamson [Sun, 6 Sep 2020 03:31:27 +0000 (21:31 -0600)]
perlapi: Consolidate sv_catsv-ish entries
Karl Williamson [Sun, 6 Sep 2020 03:23:15 +0000 (21:23 -0600)]
perlapi: Consolidate sv_catpvn-ish entries
Nicolas R [Tue, 17 Nov 2020 19:20:07 +0000 (12:20 -0700)]
Limit the number of lines in IRC notification