This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Richard Leach [Fri, 19 Nov 2021 21:37:48 +0000 (21:37 +0000)]
Update bignum, Math::BigInt, Math::BigInt::FastCalc, and Math::BigRat
bignum
======
0.63 2021-10-08
* This version instroduces no changes to the Perl modules, only the
tests.
* Remove tests that don't work on old Perls and that were actually
testing
Math::Big(Int|Float|Rat) more than big(int|num|rat).
* Skip tests that don't work on older versions of Perl.
* Remove Perl v5.10.0 as dependency. This distribution is compatible
with
Perls back to at least v5.6.1, although some functionality
(e.g., nesting the pragmas) requires more recent versions of Perl.
0.62 2021-10-03
* Add support for multiple options in import(), so that one can use,
e.g.,
use bignum accuracy => 20, lib => "GMP";
* Make sure the bigrat pragma always returns Math::BigRat objects.
* Make the "trace" option work as indended, or at least according to
what I
believe is the intention.
* Improve documentation. Fix typos, improve wording, add more examples
etc.
0.61 2021-10-01
* Improve documentation related to floating point literals.
* Skip tests that fail due to Perl's broken handling of floating point
literals before v5.32.0.
0.60 2021-09-28
* Separate the bigint, bignum, and bigrat pragmas.
- The bigint pragma now converts every numeric constant that
represents an
integer to a Math::BigInt object. Non-integers are converted to
Math::BigInt NaNs. With the previous behaviour, only some numeric
constant integers were converted to a Math::BigInt.
- The bignum pragma now converts every numeric constant to a
Math::BigFloat
object.
- The bigrat pragma now converts every numeric constant to a
Math::BigRat
pragma.
The pragmas no longer activate upgrading and downgrading. The
upgrading and
downgrading must now be activated explicitly. The rationale behind
deactivating it by default is that can cause infinite looping where
objects
bounce back and forth between different classes. Explicitly
requesting a
specific class doesn't always work either, because the object might
be
automatically upgraded or downgraded to a different class.
Only one pragma can be used at a time in a given scope. Enabling one
pragma
disables the others in the same scope.
* Implementat working version of "no bigint", "no bignum", and "no
bigrat".
Previously, the upgrading and downgrading activated by, e.g., "use
bigint"
was not deactivated by "no bigint".
* Sync behaviour with the Math-BigInt distribution.
Math::BigInt
============
1.999827 2021-10-03
* Improve error message for missing library argument.
* Skip tests that don't work on older Perls. Also skip tests that
compare
floating point numbers.
1.999826 2021-10-01
* Improve documentation related to floating point literals.
* Skip tests that fail due to Perl's broken handling of floating point
literals before v5.32.0.
1.999825 2021-09-28
* Make Math::BigInt accept integers regardless of whether they are
written as
decimal, binary, octal, or hexadecimal integers or decimal, binary,
octal,
or hexadecimal floating point number.
* When numeric constants are overloaded (with the ":constant" option)
in
Math::BigInt, every numeric constant that represent an integer is
converted
to an object regardless of how it is written. All finite non-integers
are
converted to a NaN.
* When numeric constants are overloaded (with the ":constant" option)
in
Math::BigFloat, every numeric constant is converted to an object
regardless
of how it is written.
* Add method from_dec() (cf. from_bin(), from_oct(), and from_hex()).
It is
like new() except that it does not accept anything but a string
representing a finite decimal number.
1.999824 2021-09-20
* Don't allow mixing math libraries. Use the first backend math library
that
is successfully loaded, and ignore any further attempts at loading a
different backend library. This is a solution to the re-occurring
problem
of using objects using different math libraries.
* Add missing documentation.
* Miscellaneous minor improvements.
Math::BigInt::FastCalc
======================
0.5012 2021-09-28
* Sync test files with Math-BigInt.
0.5011 2021-09-20
* Sync test files with Math-BigInt.
* Add missing documentation.
* Make the test files only print to the standard error when there is an
actual error.
* Miscellaneous changes and updates to author and release test files.
Math::BigRat
============
0.2620 2021-10-03
* Skip tests that don't work on older Perls. Also skip tests that
compare
floating point numbers.
0.2619 2021-10-01
* Correct the handling of Inf and NaN in numify().
* Improve constant overloading. When numeric constants are overloaded
(with the ":constant" option) in Math::BigRat, every numeric constant
is converted to an object regardless of how it is written.
0.2618 2021-09-28
* Add new method binv() for the inverse.
* Add new method dparts(), which returns the integer part and fraction
part
of a number. For example, 9/4 is split into 2 and 1/4. This method is
equivalent to the Math::BigInt and Math::BigFloat methods with the
same
name.
* Improve blog(). Handle cases $x->blog($b) where the numerator of $x
and/or $b is 1 as special.
* Sync tests with Math-BigInt.
Tony Cook [Mon, 15 Nov 2021 00:49:25 +0000 (11:49 +1100)]
Tony Cook [Thu, 21 Oct 2021 03:19:49 +0000 (14:19 +1100)]
correct the comment distinguishing between threaded/unthreaded cop macros
Tony Cook [Thu, 21 Oct 2021 03:16:54 +0000 (14:16 +1100)]
Add CopFILEAVn() and use it when cleaning up COP pointers
On threaded builds CopFILEAV() calls gv_fetchfile(), which always
created the *{"::_<filenamehere"} glob, so the attempted clean up
here could recreate the glob, even if it has already been removed
when cleaning up a string eval.
To avoid this, add CopFILEAVn() that never creates the glob,
nor the AV so that the clean up never adds new objects.
This change makes the check for PL_phase unnecessary, but that check
is much cheaper than the call for gv_fetchfile_flags() that the
macro hides, so retain the check.
Tony Cook [Thu, 21 Oct 2021 02:51:17 +0000 (13:51 +1100)]
don't try to clean up the COP pointer during global destruction
At this point there should be no further debugging code trying to
use the COP pointer.
On threaded builds the call to CopFILEAV() could cause a segmentation
fault, since during late destruction gv_fetchfile() could return
NULL, which the threaded version of CopFILEAV() would blindly call
GvAV() on.
Tony Cook [Wed, 20 Oct 2021 04:36:44 +0000 (15:36 +1100)]
remove cop addressed from saved lines when the cop is freed
This could cause a bad read and write when the debugger tried to
set a breakpoint on the line.
Fixed #19198
Tony Cook [Wed, 20 Oct 2021 04:33:31 +0000 (15:33 +1100)]
document the DebugWrap class used internally to perl5db.t
saves me having to find the difference between "output" and
"contents" each time I write a debugger test
Tony Cook [Wed, 20 Oct 2021 04:31:44 +0000 (15:31 +1100)]
allow DebugWrap to take the test code as an argument
This increases the locality of the code being tested to the test and
avoids littering the tree with little test files.
James E Keenan [Tue, 2 Nov 2021 19:24:09 +0000 (19:24 +0000)]
Unencrypted git protocol no longer supported by github.com
Reference: https://github.blog/2021-09-01-improving-git-protocol-security-github/
For: https://github.com/Perl/perl5/pull/19220
Ricardo Signes [Tue, 2 Nov 2021 18:23:45 +0000 (14:23 -0400)]
Merge branch 'features-for-5-36' into blead
Ricardo Signes [Sat, 30 Oct 2021 19:22:21 +0000 (15:22 -0400)]
perldelta: update feature bundle changes for bareword_filehandles
Ricardo Signes [Sat, 30 Oct 2021 19:20:52 +0000 (15:20 -0400)]
feature.pm: remove bareword_filehandles from :5.36
Ricardo Signes [Sat, 30 Oct 2021 18:48:51 +0000 (14:48 -0400)]
feature updates: tweaks from code review
Ricardo Signes [Sat, 16 Oct 2021 23:08:51 +0000 (19:08 -0400)]
perldelta: note changes to feature bundle
Ricardo Signes [Sat, 16 Oct 2021 22:54:24 +0000 (18:54 -0400)]
perlfunc: note that bareword open is now often forbidden
Ricardo Signes [Sat, 9 Oct 2021 21:12:31 +0000 (17:12 -0400)]
feature: remove indirect and multidimensional in v5.36
Dagfinn Ilmari Mannsåker [Tue, 2 Nov 2021 18:14:56 +0000 (18:14 +0000)]
Remove missed mention of perldos POD document in plan9/mkfile
Dagfinn Ilmari Mannsåker [Mon, 27 Jul 2020 13:31:25 +0000 (14:31 +0100)]
Remove AT&T UWIN support
UWIN is a UNIX compatibility layer for Windows. It was last released
in 2012 and has been superseded by Cygwin these days.
Dagfinn Ilmari Mannsåker [Thu, 16 Jul 2020 16:32:16 +0000 (17:32 +0100)]
Remove DOS/DJGPP support
DJGPP is a port of the GNU toolchain to 32-bit x86 systems running DOS.
The last known attempt to build Perl on it was on 5.20, which only got
as far as building miniperl.
James E Keenan [Tue, 2 Nov 2021 17:45:38 +0000 (17:45 +0000)]
One character spelling error
Tony Cook [Mon, 1 Nov 2021 23:03:23 +0000 (10:03 +1100)]
bump $GDBM_File::VERSION
Sergey Poznyakoff [Mon, 11 Oct 2021 15:58:44 +0000 (15:58 +0000)]
gdbm: Define error codes; provide the global $gdbm_errno variable.
* ext/GDBM_File/GDBM_File.pm: Export gdbm error codes.
Improve documentation.
* ext/GDBM_File/GDBM_File.xs (BOOT): Define the GDBM_File::gdbm_errno
variable.
(gdbm_errno): Return a value usable both in numeric and string
contexts.
* ext/GDBM_File/Makefile.PL: Define gdbm error codes.
* Document GDBM_* constants used with tie().
Richard Leach [Fri, 28 May 2021 01:00:17 +0000 (02:00 +0100)]
pp_system: safe to switch in sv_setpvn_fresh here
Richard Leach [Wed, 26 May 2021 23:40:27 +0000 (00:40 +0100)]
pp_match: newSVpvn_flags now more efficient than sv_newmortal + sv_setpvn.
Richard Leach [Wed, 26 May 2021 17:01:44 +0000 (18:01 +0100)]
sv.c: use Perl_sv_grow_fresh & Perl_sv_setvpn_fresh
Richard Leach [Wed, 26 May 2021 17:00:11 +0000 (18:00 +0100)]
sv.c: add Perl_sv_grow_fresh & Perl_sv_setvpn_fresh
H.Merijn Brand [Fri, 29 Oct 2021 17:42:38 +0000 (19:42 +0200)]
Regen Configure and friends after backports
Ricardo Signes [Fri, 29 Oct 2021 14:22:06 +0000 (10:22 -0400)]
release schedule: neilb to handle 2021-12
James E Keenan [Sat, 23 Oct 2021 23:59:36 +0000 (23:59 +0000)]
Merge branch 'fix-grammar' into blead
For: https://github.com/Perl/perl5/pull/19209
Robert Rothenberg [Fri, 22 Oct 2021 11:57:27 +0000 (12:57 +0100)]
lib/diagnostics.pm remove obscure wording in POD
The text "While apparently a whole nuther program" is too informal
and too obscure for non-Native English speakers.
It is also a misspelling of "whole nother" [1].
[1] https://www.merriam-webster.com/dictionary/whole%20nother
Committer: Robert Rothenberg is now a Perl author.
Increment $VERSION in lib/diagnostics.pm.
Leon Timmermans [Thu, 21 Oct 2021 21:04:31 +0000 (23:04 +0200)]
Prepare Module::Corelist for 5.35.6
Leon Timmermans [Thu, 21 Oct 2021 20:44:17 +0000 (22:44 +0200)]
Bump version to 5.35.6
Leon Timmermans [Thu, 21 Oct 2021 20:17:26 +0000 (22:17 +0200)]
new perldelta for 5.35.6
Leon Timmermans [Thu, 21 Oct 2021 20:12:08 +0000 (22:12 +0200)]
Tick off 5.35.5 from release schedule
Leon Timmermans [Thu, 21 Oct 2021 20:10:03 +0000 (22:10 +0200)]
Add epigraph for 5.35.5
Leon Timmermans [Thu, 21 Oct 2021 18:05:51 +0000 (20:05 +0200)]
Add 5.35.5 to perlhist
Leon Timmermans [Thu, 21 Oct 2021 18:05:13 +0000 (20:05 +0200)]
Update perldelta for 5.35.5 release
Leon Timmermans [Wed, 20 Oct 2021 21:39:27 +0000 (23:39 +0200)]
Update Module::CoreList for 5.35.5
Tomasz Konojacki [Wed, 20 Oct 2021 14:51:58 +0000 (16:51 +0200)]
inline.h: _BitScanForward64 is available only on 64-bit architectures
Fixes #19205
Tomasz Konojacki [Wed, 20 Oct 2021 14:47:45 +0000 (16:47 +0200)]
inline.h: remove superfluous Visual C++ version checks
We no longer support Visual C++ 2012 and older.
Leon Timmermans [Wed, 20 Oct 2021 19:39:44 +0000 (21:39 +0200)]
Revert "Introduce a "declaration after statement" into inline.h"
This reverts commit
632ce96a35d784df9e43bc8ad87b4e8f1f24a590.
Sereal hasn't been fixed yet to deal with the fallout of this change,
so we postpone this change for a later moment
Leon Timmermans [Wed, 20 Oct 2021 19:39:27 +0000 (21:39 +0200)]
Add dropping old MSVC++ (pre-VC12) to perldelta
Nicholas Clark [Sun, 17 Oct 2021 08:41:19 +0000 (08:41 +0000)]
Perl_newHVhv should use share_hek_hek() instead of share_hek_flags()
share_hek_hek() manipulates the shared HEK's reference count directly,
without needing to find it in the shared string table. It was added after
Perl_newHVhv() was implemented, and no-one noticed that it could be used
there.
Nicholas Clark [Sat, 16 Oct 2021 18:06:44 +0000 (18:06 +0000)]
Fix the build and tests when NODEFAULT_SHAREKEYS is defined
Defining this macro causes newHV() to create hashes without shared hash key
scalars. The default is that hashes are created with shared hash keys.
Nicholas Clark [Sat, 16 Oct 2021 07:52:56 +0000 (07:52 +0000)]
Perl_newHVhv() did not correctly copy hashes with non-shared keys
It created a hash built with non-shared keys, but left the "shared keys"
flag set on the hash.
This hasn't been spotted in 20 years, which shows just how much we use
hashes with unshared keys.
Nicholas Clark [Tue, 12 Oct 2021 07:14:30 +0000 (07:14 +0000)]
hv_delete_common() must not call GvAV() on a non-GV
hv_delete_common() must update isa magic stash records when *ISA is deleted
(see commit
6146d9e1c87d449f)
However, it's only valid to use the macro GvAV() on an SV that is a GV.
Previously the code was not checking this, hence if someone deliberately
manipulated the symbol table to first store something other than a typeglob,
and then delete that entry from the symbol table, then (at best) an
assertion would fail, at worst illegal memory accesses.
Do this by moving the check for `SvTYPE(sv) == SVt_PVGV` up to the if() that
governs both code blocks.
Note that you could only trigger this bug by running code that manipulates
symbol tables directly. Compilation of Perl code would not hit it, nor could
user-controlled data in executing Perl programs, unless the programs both
contain code to manipulate symbol tables, and permit unvalidated user data
to reach those code paths.
(Such programs are likely insecure already, as their control flow can be
subverted by user controlled data without requiring any interpreter bugs.)
Dagfinn Ilmari Mannsåker [Tue, 19 Oct 2021 15:51:05 +0000 (16:51 +0100)]
op.c: use %zd to format PADOFFSET values
PADOFFSET is SSize_t, so %lu is wrong even if long and SSize_t are the
same size.
Leon Timmermans [Tue, 19 Oct 2021 23:14:25 +0000 (01:14 +0200)]
Add NetWare removal to perlport
Leon Timmermans [Tue, 19 Oct 2021 23:13:07 +0000 (01:13 +0200)]
Add nick@i3.procura.nl to mailmap
Leon Timmermans [Tue, 19 Oct 2021 21:04:03 +0000 (23:04 +0200)]
Update Encode to 3.16
Leon Timmermans [Tue, 19 Oct 2021 20:58:43 +0000 (22:58 +0200)]
Update Scalar-List-Util to 1.60
Leon Timmermans [Tue, 19 Oct 2021 20:54:30 +0000 (22:54 +0200)]
Update experimental to 0.025
Leon Timmermans [Tue, 19 Oct 2021 20:47:16 +0000 (22:47 +0200)]
Update Test-Simple to 1.302188
Steve Hay [Thu, 14 Oct 2021 16:37:08 +0000 (17:37 +0100)]
Remove old MSVC++ (pre-VC12) support from Windows Makefiles
Also remove the Platform SDK 2003 SP1/R2 64-bit compiler since (having just
tried it) it no longer builds perl because it doesn't allow mixed code and
declarations.
Also remove mention of the Windows SDK since it doesn't appear to contain
the compiler or linker any more. This page says that the VC++ 2010 compiler
and linker were included in the Windows 7 SDK but then makes no mention of
it for the Windows 8 SDK:
https://docs.microsoft.com/en-us/previous-versions/visualstudio/windows-sdk/
ff660763(v=vs.110)
The page notes that it is no longer being updated, but the whole of the
C:\Program Files (x86)\Windows Kits folder on my system (which contains
8.0, 8.10 and 10) does not contain any cl.exe or link.exe.
I've re-worded some of the if/else conditions in the makefiles to pick out
earlier versions rather than later versions. Thus, the current versions
become the "else" case, which means that the next version of Visual C++ is
more likely to work without requiring any changes.
Tony Cook [Mon, 18 Oct 2021 22:12:00 +0000 (09:12 +1100)]
don't overwrite the faked up type details for hv-with-aux
CID 340472
Nicholas Clark [Fri, 15 Oct 2021 19:59:34 +0000 (19:59 +0000)]
`for my($k, $v) (%hash)` should not be a syntax error
No-one had thought to test for this explicitly. After all, both
`for my $foo ...` and `for my$foo ...` are valid syntax, so tweaking the
C lexer code to add an optional '(' should work, surely?
The problem was that, *as was*, the lexer code didn't "accept" those two
syntax variants the way the comments would suggest.
`for my $foo ...` was treated as
1) we saw 'my '
2) we saw the dollar sign
3) success!
but `for my$foo ...` was treated as
0) we didn't see 'my ' or 'our '
1) we saw the literal string 'my' which is valid as a package name
2) we saw the dollar sign
3) success!
ie some sort of mangled variant of `for my Dog $spot ...` without 'my'
*but* as the lexer was happy with what it saw, it returned that the input
stream was valid for a "for" token, and control continues to the grammar.
The grammar, of course, didn't make these mistakes, so parsed everything
properly and built the correct optree.
(And, if presented with `for Dog $spot (...)` the grammar wouldn't match,
so all invalid code was correctly rejected)
However, all this came unstuck with `for my($k` because that didn't
mis-tokenise as some crazy package name 'my(', so it reported a syntax error.
Hence rewrite yyl_foreach() to actually tokenise everything correctly.
"Correctly", to be clear, is bug-for-bug compatible with the current emergent
behaviour for various corner cases for "parses and runs" vs "syntax error".
We don't always report identical error messages for certain syntax errors,
where the precise message reported was itself emergent behaviour from the
bugs in the previous implementation.
Nicholas Clark [Mon, 18 Oct 2021 13:16:40 +0000 (13:16 +0000)]
for CORE::my $var (...) {} is legal syntax, hence test it
We had tests for CORE::state, but not CORE::my or CORE::our. It happens that
they are all legal syntax, but seemingly more be accident than design. They
are only accepted by yyl_foreach() as a quirk of the current implementation.
Note that for my Dog $spot (...) {} is legal, but not CORE::my. our Dog is
legal, CORE::our is not. Neither state Dog nor CORE::state are legal. These
are all emergent behaviour of the parser - do not take these tests as
"correct", merely as verifying that current behaviour doesn't change unless
we intended it to.
Tony Cook [Mon, 18 Oct 2021 03:44:48 +0000 (14:44 +1100)]
add customized entries for the latest Memoize changes
Sergey Poznyakoff [Fri, 15 Oct 2021 12:41:29 +0000 (15:41 +0300)]
Fix Memoize tests, where GDBM_File is involved
* cpan/Memoize/t/errors.t: Use GDBM_NEWDB as the flags argument
when tying to GDBM_File.
* cpan/Memoize/t/tie_gdbm.t: Likewise.
Dan Book [Sun, 17 Oct 2021 21:59:44 +0000 (17:59 -0400)]
perlop - clarify that hyphens are interpreted literally in tr with single quotes
Tomasz Konojacki [Wed, 13 Oct 2021 12:50:29 +0000 (14:50 +0200)]
install libgdbm and libdb in GitHub Actions
This ensures that DB_File and GDBM_File will be built and tested.
Tomasz Konojacki [Fri, 15 Oct 2021 17:45:20 +0000 (19:45 +0200)]
disable LeakSanitizer in GitHub Actions
It randomly fails with a fatal error for no apparent reason.
Fixes #19189
Ricardo Signes [Fri, 15 Oct 2021 13:42:23 +0000 (09:42 -0400)]
Merge branch 'pp_iter' into blead
Nicholas Clark [Wed, 22 Sep 2021 10:58:00 +0000 (10:58 +0000)]
Pod improvements suggested by Matthew Horsfall
Nicholas Clark [Thu, 16 Sep 2021 09:19:25 +0000 (09:19 +0000)]
for my ($foo,,, $bar) { ... } should parse as ($foo, $bar)
Multiple commas between the lexicals in the list shouldn't change the
parsing.
Nicholas Clark [Wed, 15 Sep 2021 20:06:53 +0000 (20:06 +0000)]
Test next, continue and redo with n-at-a-time for loops
Nicholas Clark [Wed, 15 Sep 2021 17:47:32 +0000 (17:47 +0000)]
Note why this if block in pp_iter is empty
Nicholas Clark [Tue, 22 Jun 2021 05:27:28 +0000 (05:27 +0000)]
perldelta for n-at-a-time for loops.
Nicholas Clark [Mon, 21 Jun 2021 20:29:13 +0000 (20:29 +0000)]
n-at-a-time for loops now warn by default (as 'experimental::for_list').
Nicholas Clark [Mon, 21 Jun 2021 19:34:29 +0000 (19:34 +0000)]
Add a new warning experimental::for_list.
Nicholas Clark [Tue, 27 Apr 2021 06:00:14 +0000 (06:00 +0000)]
Move reading CxTYPE(cx) out of the loop, to be clear that it doesn't change.
Move some other variable declarations into a tighter scope, and initialise
variables at the point of declaration where possible.
With the recent changes, the function consists of a 4-way switch inside a
loop, where each iteration of the loop will take the same case in the
switch. This implies a branch taken on each iteration of the loop, which
is less efficient than the alternative structure of taking the branch once
and then looping.
However, the way the code is structured (particularly how two of the cases
share code, by jumping sideways), means that rewriting it to "switch first"
structure would not be clearer (and likely would also be hard to get
right). Hence it seems better to let a compiler optimiser choose what is
best. However, it might not realise that CxTYPE(cx) won't be changed, even
as a side effect of any function called by this code. Hence hoist it into a
constant variable to make this unequivocal.
Nicholas Clark [Mon, 26 Apr 2021 11:23:33 +0000 (11:23 +0000)]
B::Deparse now handles n-at-a-time for.
Nicholas Clark [Mon, 26 Apr 2021 11:05:21 +0000 (11:05 +0000)]
B::Concise now handles n-at-a-time for.
Nicholas Clark [Mon, 26 Apr 2021 08:22:43 +0000 (08:22 +0000)]
Regression tests and documentation for n-at-a-time for.
Nicholas Clark [Sun, 25 Apr 2021 09:20:51 +0000 (09:20 +0000)]
Implement n-at-a-time for loops.
For example, this now works:
for my ($key, $value) (%hash) { ... }
Only for scalars declared with my as a list in the for loop statement.
As many as you want (unless you want more than
4294967296).
Nicholas Clark [Sun, 25 Apr 2021 19:35:40 +0000 (19:35 +0000)]
Generate the optree for n-at-a-time for loops.
Perl_newFOROP can now also take an OP_LIST corresponding to two or more
lexicals to iterate over n-at-a-time, where those lexicals are all
declared in the for statement, and occupy consecutive pad slots.
Nicholas Clark [Sun, 25 Apr 2021 20:03:37 +0000 (20:03 +0000)]
Iterate for loops $n-at-a-time in PP_ITER.
This commit provides the runtime changes needed to iterate for loops over
two or more variables.
Nicholas Clark [Sat, 24 Apr 2021 19:25:42 +0000 (19:25 +0000)]
Re-indent the case statement in pp_iter, ready for the next commit.
Add braces and indent a block that will become a `for` loop in the next
commit. With the exception of these and merging 3 opening braces onto the
`if` or `else` on the previous lines, this commit is purely a whitespace
change.
Nicholas Clark [Mon, 26 Apr 2021 10:26:17 +0000 (10:26 +0000)]
Tests for existing for loop optrees.
Sergey Poznyakoff [Sat, 9 Oct 2021 10:15:48 +0000 (13:15 +0300)]
GDBM_File: Implement crash-tolerance and export/import functions.
* ext/GDBM_File/Makefile.PL: Register new constants: gdbm_open
flags and return values for gdbm_latest_snapshot.
* ext/GDBM_File/GDBM_File.pm: Update documentation.
Export new constants.
Raise version to 1.21.
* ext/GDBM_File/GDBM_File.xs (dbcroak): Include system error
infomation, when appropriate.
(gdbm_syserrno): Return a meaningful value if not_here.
(gdbm_dump, gdbm_load, gdbm_convert)
(gdbm_failure_atomic, gdbm_latest_snapshot)
(gdbm_crash_tolerance_status): New functions.
* ext/GDBM_File/t/dump.t: New testcase.
* ext/GDBM_File/t/snapshot.t: New testcase.
* MANIFEST: List new files.
James E Keenan [Wed, 13 Oct 2021 21:55:59 +0000 (21:55 +0000)]
Merge branch 'perlbug-string-3' into blead
For p.r. https://github.com/Perl/perl5/pull/19181; last of 3 pull
requests for https://github.com/Perl/perl5/issues/19183
James E Keenan [Sat, 9 Oct 2021 16:38:04 +0000 (16:38 +0000)]
Send bugs to GitHub
Do not advise sending mail to 'perlbug@perl.org', as that now simply
triggers a response redirecting sender to GitHub.
Karl Williamson [Wed, 13 Oct 2021 15:15:51 +0000 (09:15 -0600)]
perlhacktips: Fix typo
Nicholas Clark [Sun, 10 Oct 2021 18:35:06 +0000 (18:35 +0000)]
Add a section to INSTALL describing that we now rely on some C99
And the implications for XS authors writing code to work on both current and
earlier perl installations.
Nicholas Clark [Wed, 6 Oct 2021 18:50:09 +0000 (18:50 +0000)]
perldelta for C99 support
Nicholas Clark [Wed, 6 Oct 2021 18:16:26 +0000 (18:16 +0000)]
Devel::PPPort shouldn't unconditionally -Wdeclaration-after-statement
Add the flag for gcc for perl v5.34.4 and earlier.
Nicholas Clark [Wed, 6 Oct 2021 14:02:55 +0000 (14:02 +0000)]
Introduce a "declaration after statement" into inline.h
The core now permits some C99 code, so extensions need to ensure that any
C compiler flags they add or change permit C99 code.
This code is inlined by XS extensions in the core and on CPAN. The intent
is that this commit should show up for any failure bisection, making it
obvious what the cause is, and what the fix needs to be.
Nicholas Clark [Wed, 6 Oct 2021 13:49:28 +0000 (13:49 +0000)]
Update README.win32 to the new C99/MSVC 12.0 requirements
* Remove specific notes related to Microsoft Visual C++ 2005 Express Edition
and earlier
* Visual Studio 2013 is the only version that still has Express edition (in
addition to Community), so simplify the text by only mentioning Community
* Remove the reference to IA64, and mention x86_64 along with x86
* In the context of x86_64, clarify that mingw's binaries can run on both
* Update the URL for mingw
Nicholas Clark [Wed, 6 Oct 2021 14:29:51 +0000 (14:29 +0000)]
Note how best to confirm that other C99 features can be relied upon
If C99 functionality can't be emulated on platforms which don't provide it,
then one really needs to test whether MSVC and the VMS compiler support it.
Nicholas Clark [Wed, 6 Oct 2021 12:01:25 +0000 (12:01 +0000)]
Update perlhack with details of the C99 features we can now use
Also update INSTALL to mention C99.
Nicholas Clark [Sun, 10 Oct 2021 18:30:44 +0000 (18:30 +0000)]
cflags.sh should not add -std=c99 if -std=gnu99 is already set
Having both looks like it ought to cause the build to fail, as with -std=c99
second it will override any previous -std=gnu99, and some platforms need the
former to both compile C99 code and have correct includes during Configure
probing.
However testing on those platforms without this change doesn't show any
errors. So this change doesn't seem to strictly be necessary. But it does
prevent our generated compiler command lines having contradictory flags,
and hence looking daft.
Nicholas Clark [Sun, 10 Oct 2021 18:26:54 +0000 (18:26 +0000)]
Test declarations after statement in Configure's C99 probe code
Also ensure that the relevant failure error message is output even with
Configure's -s flag, as we shouldn't stay silent for a message that causes
Configure default to aborting.
With these changes, Configure will fail the C99 probe test if passed
-Accflags="-Werror=declaration-after-statement" or
-Accflags="-Werror=long-long"
Nicholas Clark [Sun, 18 Jul 2021 08:52:10 +0000 (08:52 +0000)]
Teach Configure and cflags.SH about C99
Probe to see whether we need -std=gnu99 or -std=c99 to get C99 code to
compile. In cflags.SH, remove code that added gcc warning flags that were
compatible with C89 but are not compatible with C99.
Richard Leach [Sun, 26 Sep 2021 19:24:13 +0000 (20:24 +0100)]
pp_match: remove is_utf8_string check, used by removed (v5.24) \C char class
Nicholas Clark [Wed, 22 Sep 2021 14:12:51 +0000 (14:12 +0000)]
Leave the checkout `fetch-depth` at its default (1) for most jobs
The default is a shallow checkout.
Keep the full checkout for the "sanity test" job so that it runs all the
tests in t/porting. Add a comment explaining the reasoning.
Nicholas Clark [Mon, 27 Sep 2021 18:04:37 +0000 (18:04 +0000)]
A CI test that manicheck reports no errors on a clean checkout
Do this on the "minitest" job as that has no "manicheck" step yet, and the
"minitest" job does not have a "matrix", so we only run this actual test
once.
Nicholas Clark [Mon, 27 Sep 2021 18:01:49 +0000 (18:01 +0000)]
A CI test that manicheck has no errors after `git clean -dxf`
Nicholas Clark [Wed, 22 Sep 2021 13:09:15 +0000 (13:09 +0000)]
Add CI tests for `make distclean` and Porting/manicheck
Nicholas Clark [Wed, 22 Sep 2021 08:57:33 +0000 (08:57 +0000)]
manicheck now optionally exits non-zero if it finds problems
This will enable it to be used in a CI test.
Refactor the code to avoid the temporary array @files by iterating over the
lines of MANIFEST as they are read in.
Nicholas Clark [Wed, 22 Sep 2021 07:04:48 +0000 (07:04 +0000)]
In manicheck be explicit that the code is stripping './'
The regex had been written as /^../, which strictly was correct as the
string passed would *always* start with './', but this wasn't clear.
One had to stop and double check how File::Find::find() works, and what
argument it was called with. And it's not exactly clear when the '.' in
the regex text matches '.' and then '/', but the '/' in the regex is the
delimiter.
Given that the regex is being changed, move it later - previously the code
was performing a substitution on the value of $File::Find::name before it
knew that it needed it. (ie doing work for all directories.)