This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
8 years agoUpdate Time-Piece to CPAN version 1.31
Chris 'BinGOs' Williams [Wed, 21 Oct 2015 17:58:58 +0000 (18:58 +0100)]
Update Time-Piece to CPAN version 1.31

  [DELTA]

1.31    2015-10-20
        - No Changes since 1.30_01

1.30_01 2015-09-01
        - Ignore some tests on non *nix platforms
        - fix compile warnings
        - Inherit from Dynaloader (fix static build issues)
        - Fix windows mem corruption

8 years agoModule-CoreList is 5.20151020 on teh CPAN
Chris 'BinGOs' Williams [Wed, 21 Oct 2015 17:57:07 +0000 (18:57 +0100)]
Module-CoreList is 5.20151020 on teh CPAN

8 years agoCarp: fix test not working on older toolchain
Peter Rabbitson [Wed, 21 Oct 2015 02:02:19 +0000 (22:02 -0400)]
Carp: fix test not working on older toolchain

The newly introduced _dump() utility function is a faithful
representation of what explain() does in newer Test::More versions

8 years agoCarp: fix test incorrectly assuming a recent-enough Carp.pm in @INC
Peter Rabbitson [Wed, 21 Oct 2015 01:58:01 +0000 (21:58 -0400)]
Carp: fix test incorrectly assuming a recent-enough Carp.pm in @INC

8 years agoRe-run two regen/ programs to clear up test failures in t/porting/regen.t
James E Keenan [Wed, 21 Oct 2015 01:44:41 +0000 (21:44 -0400)]
Re-run two regen/ programs to clear up test failures in t/porting/regen.t

./perl -Ilib regen/regcharclass.pl
./perl -Ilib regen/mk_invlists.pl

8 years agoNote the resource hungriness of mktables.
Jarkko Hietaniemi [Wed, 21 Oct 2015 00:28:25 +0000 (20:28 -0400)]
Note the resource hungriness of mktables.

8 years agomake non-zero exit from Makefile.PL fatal in make_ext.pl
Daniel Dragan [Tue, 20 Oct 2015 22:03:45 +0000 (18:03 -0400)]
make non-zero exit from Makefile.PL fatal in make_ext.pl

A non-zero exit is fatal according to
http://www.nntp.perl.org/group/perl.qa/2008/08/msg11236.html so do not
continue building even if a Makefile was generated (an END block or code
after WriteMakefile() could have died for example).

This patch is from trying to fix problems in this thread
http://www.nntp.perl.org/group/perl.perl5.porters/2015/10/msg231903.html

8 years agoPrepare Module::CoreList for 5.23.5
Steve Hay [Tue, 20 Oct 2015 23:09:32 +0000 (00:09 +0100)]
Prepare Module::CoreList for 5.23.5

8 years agoBump version to 5.23.5
Steve Hay [Tue, 20 Oct 2015 22:53:22 +0000 (23:53 +0100)]
Bump version to 5.23.5

8 years agoCreate perldelta for 5.23.5
Steve Hay [Tue, 20 Oct 2015 22:42:55 +0000 (23:42 +0100)]
Create perldelta for 5.23.5

8 years agoTick off 5.23.4
Steve Hay [Tue, 20 Oct 2015 22:30:33 +0000 (23:30 +0100)]
Tick off 5.23.4

8 years agoAdd 5.23.4 epigraph
Steve Hay [Tue, 20 Oct 2015 22:28:59 +0000 (23:28 +0100)]
Add 5.23.4 epigraph

8 years agoLast-minute perldelta tweak v5.23.4
Steve Hay [Tue, 20 Oct 2015 19:19:24 +0000 (20:19 +0100)]
Last-minute perldelta tweak

8 years agoPerl 5.23.4 today
Steve Hay [Tue, 20 Oct 2015 19:11:49 +0000 (20:11 +0100)]
Perl 5.23.4 today

8 years agoFinalize perldelta
Steve Hay [Tue, 20 Oct 2015 19:09:32 +0000 (20:09 +0100)]
Finalize perldelta

8 years agoUpdate Module::CoreList for 5.23.4
Steve Hay [Tue, 20 Oct 2015 18:59:55 +0000 (19:59 +0100)]
Update Module::CoreList for 5.23.4

8 years agoregcomp.c: Keep parse pointer on full character boundary
Karl Williamson [Tue, 20 Oct 2015 17:23:40 +0000 (11:23 -0600)]
regcomp.c: Keep parse pointer on full character boundary

I think, but am unsure, that this commit isn't necessary.  Without it,
the parse pointer can point to an interior byte of a multi-byte
character.  Recent work has sensitized me to trying to avoid this.  So
this commit advances the pointer a full character width at a time.

8 years agoperldelta for #126181
Karl Williamson [Tue, 20 Oct 2015 17:21:47 +0000 (11:21 -0600)]
perldelta for #126181

8 years agoPATCH: [perl #126181] regex: handle \cX inside (?[])
Victor Adam [Sun, 27 Sep 2015 08:22:08 +0000 (10:22 +0200)]
PATCH: [perl #126181] regex: handle \cX inside (?[])

The \cX notation for control characters used to cause panics and unexpected
behavior when used insed an extended character class. See bug #126181.

The solution is to ignore the byte following \c during the first parsing
pass of a (?[]) construct.

8 years agoAUTHORS: Add Victor Adam
Victor Adam [Fri, 2 Oct 2015 17:38:25 +0000 (19:38 +0200)]
AUTHORS: Add Victor Adam

8 years agoImprove pod for [ah]v_(clear|undef)
David Mitchell [Tue, 6 Oct 2015 10:50:06 +0000 (11:50 +0100)]
Improve pod for [ah]v_(clear|undef)

See [perl #117341].

8 years agoperldelta for #126404
Karl Williamson [Tue, 20 Oct 2015 05:00:40 +0000 (23:00 -0600)]
perldelta for #126404

8 years agoPATCH: [perl #12406] regnode panic
Karl Williamson [Tue, 20 Oct 2015 04:51:53 +0000 (22:51 -0600)]
PATCH: [perl #12406] regnode panic

This was due to an "=" that should have been a "+=", which ended up in
this situation not allocating enough space for the pattern.  This is not
likely to cause real field problems since the generated pattern won't
succeed, and the problem is warned about and would be corrected.

8 years agoconst vtables in win32/perlhost.h
Daniel Dragan [Mon, 19 Oct 2015 21:47:16 +0000 (17:47 -0400)]
const vtables in win32/perlhost.h

This allows some more memory to be shared between 2 perl processes since
it is const. VC 2013 32b build, before Virtual Size of perl523.dll
sections, .rdata 0x3DE00 bytes .data 0x1B90, after .rdata 0x3E140
.data 0x18B0.

8 years agoPATCH: [perl #126404] Assertion fail in (?[...])
Karl Williamson [Tue, 20 Oct 2015 04:24:24 +0000 (22:24 -0600)]
PATCH: [perl #126404] Assertion fail in (?[...])

This was due to the '()' in the test case being empty, and not reducing
to an operand.  The code didn't expect it, but was guarded by an
assertion.  Now it generates a proper error.

8 years agofix pod error introduced in 65c4791f
Tony Cook [Tue, 20 Oct 2015 04:11:42 +0000 (15:11 +1100)]
fix pod error introduced in 65c4791f

8 years agoMention the HP-UX cadvise (Code Advisor).
Jarkko Hietaniemi [Tue, 20 Oct 2015 02:32:45 +0000 (22:32 -0400)]
Mention the HP-UX cadvise (Code Advisor).

8 years agoAdd link for the Coverity perl5 project.
Jarkko Hietaniemi [Tue, 20 Oct 2015 02:26:56 +0000 (22:26 -0400)]
Add link for the Coverity perl5 project.

8 years agoMention http://sourceforge.net/p/predef/wiki/Home/
Jarkko Hietaniemi [Tue, 20 Oct 2015 01:55:12 +0000 (21:55 -0400)]
Mention http://sourceforge.net/p/predef/wiki/Home/

8 years agoMake __ASSERT__() empty under Coverity, avoiding many false alerts.
Jarkko Hietaniemi [Tue, 20 Oct 2015 01:11:15 +0000 (21:11 -0400)]
Make __ASSERT__() empty under Coverity, avoiding many false alerts.

(As suggested by khw.)

8 years agoperldelta tweaks
Steve Hay [Mon, 19 Oct 2015 21:27:21 +0000 (22:27 +0100)]
perldelta tweaks

8 years agoperl.h: Remove some unused, non-portable #defines
Karl Williamson [Mon, 19 Oct 2015 21:17:17 +0000 (15:17 -0600)]
perl.h: Remove some unused, non-portable #defines

See http://nntp.perl.org/group/perl.perl5.porters/231533

These #defines are ASCII-platform only, so any code that might use them
would be wrong for non-ASCII ones.

8 years agoAdd test for [perl #126204]
Karl Williamson [Mon, 19 Oct 2015 21:13:18 +0000 (15:13 -0600)]
Add test for [perl #126204]

This bug is the same cause as #126180, fixed by
5a55ed33047e05399ce1a3781bb35f300aa7fb63

This current commit just adds the test case for #126204 to the test
suite.

8 years agoPATCH: [perl #126177] Document /(?n)/
Karl Williamson [Mon, 19 Oct 2015 19:40:23 +0000 (13:40 -0600)]
PATCH: [perl #126177] Document /(?n)/

This adds /n to various places in perlre where it was omitted, and adds
a heading to better structure the document, and a clarifying sentence.

8 years agoperldelta for #126319
Karl Williamson [Mon, 19 Oct 2015 19:12:29 +0000 (13:12 -0600)]
perldelta for #126319

8 years agoPATCH: [perl #126319] Seg fault
Karl Williamson [Mon, 19 Oct 2015 18:41:10 +0000 (12:41 -0600)]
PATCH: [perl #126319] Seg fault

This is a merge into blead of a branch that fixes several errors in the
\b{gcb}, \b{wb}, and \b{sb} (and \B{} corresponding) constructs added in
v5.22.

Finding and fixing the bug in the ticket caused several other
bugs to show up, so that fixing just that one caused other tests to
fail.

8 years agoRemove TODOs from tests now passing
Karl Williamson [Mon, 19 Oct 2015 18:21:30 +0000 (12:21 -0600)]
Remove TODOs from tests now passing

These were instituted commits prior to this one.

8 years ago"" =~ /\b{gcb}/ should fail; same \b{wb}, \b{sb}
Karl Williamson [Mon, 19 Oct 2015 18:14:36 +0000 (12:14 -0600)]
"" =~ /\b{gcb}/ should fail; same \b{wb}, \b{sb}

The Unicode standard indicates that these breaks should succeed at the
beginning and end of text.  It appears to me to be an oversight on their
part to not make an exception when there is no actual text.  (Their test
suite does not cover this case.)  I blindly implemented their algorithm
for 5.22, but it really is the wrong thing to do.

8 years agoFix some bugs in \B[sb}, \B{wb}, \B[gcb}
Karl Williamson [Mon, 19 Oct 2015 17:59:05 +0000 (11:59 -0600)]
Fix some bugs in \B[sb}, \B{wb}, \B[gcb}

Under \B{} the result is the complement of the \b{} result.  However in
this code, the result was getting complemented again, wrongly.

8 years agoregexec.c: Combine some if's
Karl Williamson [Mon, 19 Oct 2015 17:41:00 +0000 (11:41 -0600)]
regexec.c: Combine some if's

The previous commit removed all but a single if statement each from
within the scope of other if statements.  Combine them into one each.

8 years agoFix some bugs with \b{gcb}, wb and sb
Karl Williamson [Mon, 19 Oct 2015 17:16:58 +0000 (11:16 -0600)]
Fix some bugs with \b{gcb}, wb and sb

These were thinkos.  These things shouldn't have been in the
conditional, but after it so they are executed each time through the
loop.

8 years agoFix look-behind bug with \b{wb}
Karl Williamson [Mon, 19 Oct 2015 15:56:27 +0000 (09:56 -0600)]
Fix look-behind bug with \b{wb}

The algorithm for determining a word break requires look-behind in some
cases.  Certain characters are ignored in the look-behind, but until
this commit, the parse pointer was unchanged, causing things to get out
of sync in some edge cases.

8 years agoAdd TODO tests for [perl #126319]
Karl Williamson [Mon, 19 Oct 2015 15:12:46 +0000 (09:12 -0600)]
Add TODO tests for [perl #126319]

Some of these pass already, but may temporarily fail as a result of the
next few commits, until it all gets straightened out in the end.

8 years agoregexec.c: Remove extraneous 'break'
Karl Williamson [Mon, 19 Oct 2015 18:08:41 +0000 (12:08 -0600)]
regexec.c: Remove extraneous 'break'

8 years agoregexec.c: Add comment
Karl Williamson [Mon, 19 Oct 2015 17:35:15 +0000 (11:35 -0600)]
regexec.c: Add comment

8 years agot/re/subst.t: Use loc_tools for skipping locale tests
Karl Williamson [Mon, 19 Oct 2015 15:04:59 +0000 (09:04 -0600)]
t/re/subst.t: Use loc_tools for skipping locale tests

t/loc_tools.pl is used as a centralized place for providing
infrastructure for core testing involving locales.

8 years agomktables: Improve .t diagnostic message
Karl Williamson [Mon, 19 Oct 2015 14:18:05 +0000 (08:18 -0600)]
mktables: Improve .t diagnostic message

Through an oversight, the text that was supposed to be printed as the
name for a test was just getting output as a 1 or 0.

8 years agomktables: Update comments
Karl Williamson [Mon, 19 Oct 2015 14:11:26 +0000 (08:11 -0600)]
mktables: Update comments

This function's capabilities has expanded beyond its original use, but
the descriptive comments weren't until now.

8 years agoregexec.c: Change function return from I32 to bool
Karl Williamson [Sun, 18 Oct 2015 16:04:51 +0000 (10:04 -0600)]
regexec.c: Change function return from I32 to bool

This only returns TRUE or FALSE; no need for a wider return value.

8 years agoperldelta: Nit
Karl Williamson [Mon, 19 Oct 2015 18:31:14 +0000 (12:31 -0600)]
perldelta: Nit

8 years agoFix broken link in perldelta added by f83db99040
Steve Hay [Mon, 19 Oct 2015 17:31:39 +0000 (18:31 +0100)]
Fix broken link in perldelta added by f83db99040

8 years agoRemove boilerplate stuff from perldelta
Steve Hay [Mon, 19 Oct 2015 17:18:41 +0000 (18:18 +0100)]
Remove boilerplate stuff from perldelta

8 years agoFill in perldelta
Steve Hay [Mon, 19 Oct 2015 17:02:52 +0000 (18:02 +0100)]
Fill in perldelta

8 years agoperl #126396 IRIX longdouble infinity issues
Jarkko Hietaniemi [Mon, 19 Oct 2015 02:30:43 +0000 (22:30 -0400)]
perl #126396 IRIX longdouble infinity issues

In IRIX longdouble (which uses the double-double format, bigendian)
multiplying with infinity introduces garbage bytes to the second double
of the double-double.

This garbage, in turn, seems to tickle another bug in long doubles,
in comparing infinities, where these garbage bytes errorneously matter
when they should not.

Workaround: zero these garbage bytes in multiplication.

The garbage bytes seem to appear only the multiplication, as far as
t/op/infnan.t can detect.

Even though we could place the multiplication result to a temporary NV
variable (for easier infiniteness inspection) for all the platforms and
depend on optimizer doing away with the temporary, let's be conservative.

8 years agoIRIX long-double sqrt(2) one bit error in the least significant end.
Jarkko Hietaniemi [Mon, 19 Oct 2015 11:10:45 +0000 (07:10 -0400)]
IRIX long-double sqrt(2) one bit error in the least significant end.

8 years agoIRIX cc -c99 does -D__c99 but none of the other C99 macros.
Jarkko Hietaniemi [Mon, 19 Oct 2015 02:28:37 +0000 (22:28 -0400)]
IRIX cc -c99 does -D__c99 but none of the other C99 macros.

Admittedly this change could make C99-ness visible also
on platforms beyond IRIX, but that should be a good thing.

8 years agoIRIX long double: use the C99/C11-style generic math macros.
Jarkko Hietaniemi [Mon, 19 Oct 2015 12:05:19 +0000 (08:05 -0400)]
IRIX long double: use the C99/C11-style generic math macros.

Without this the IRIX libmath _isinfl/_isnanl APIs are not used,
and the explicit comparison against NV_MAX/-NV_MAX is used instead,
which seems to work, but is definitely ickier and probably slower.

In the ideal world we could have a Configure test for these math macros.

8 years agoperldelta copy-editing
Steve Hay [Mon, 19 Oct 2015 08:07:11 +0000 (09:07 +0100)]
perldelta copy-editing

8 years agoClean-up temporary directories in Module-Metadata tests
Steve Hay [Mon, 19 Oct 2015 07:26:32 +0000 (08:26 +0100)]
Clean-up temporary directories in Module-Metadata tests

Already merged upstream, and no version bump required for this test-only
module.

8 years agoreimplement $^WIN32_SLOPPY_STAT as a magic var
Daniel Dragan [Fri, 16 Oct 2015 21:49:20 +0000 (17:49 -0400)]
reimplement $^WIN32_SLOPPY_STAT as a magic var

The original implementation in commit cba61fe146 was sloppy. It is named
like a special var, it is listed as a special var, but it was a regular GV.
Since nobody knows this var exists, and full stat is the default (which I
disagree with see below). There will be alot more PP and C/XS perl stat()
calls (atleast a couple to dozens or low 100s for short lived perl
processes) than reads/writes to this global scalar (rounded to 0 R/Ws)
in a Win32 perl process. So avoid the 1 usually failing GV package (hash)
lookup for each PP/XS/PL C stat by using magic vars and a C bool. This is
a perf increase. Use sv_true instead of SvTRUE_NN because this code is
extremely rare to execute and the macro has large machine code.

I disagree with the default being full stat with since this increases the
number of kernel IO calls and ASCII->UTF16 conversions, and there was
perf criticism in the original thread that implemented this
this http://www.nntp.perl.org/group/perl.perl5.porters/2006/02/msg109917.html
but why full stat is default is for another ticket. This patch lessens the
overhead of full stat until something else is decided.

Change the initial value of the sloppystat setting for miniperl to be true
instead of doing it in buildcustomize.pl in PP. Revert part of
commit 8ce7a7e8b0 "speed up miniperl require on Win32" to acomplish this.
Unlike Unix perl, no object files are shared between mini and full perl,
so changing the default is fine on Win32 Perl. If minitest/miniperl really
need hard link testing/support, they can explictly turn off sloppy stat
and enable full stat with the special var. Changing the stat default from
C for miniperl avoids creating the special GV on each miniperl process
start as it previously was with the buildcustomize.pl way.

Changing stat setting in C and not PP also saves a couple IO calls in
win32_stat when opening the first .pl if it isn't -e, and
opening buildcustomize.pl in all permutations. The PP code in S_parse_body
contains a -f. See ticket for this patch for details.

Only CPAN use of this special var is
File-Stat-Moose-0.06/lib/File/Stat/Moose.pm#L208  according to cpangrep.

8 years agoMake IO::Poll->poll call _poll even with an empty fd array
Dagfinn Ilmari Mannsåker [Fri, 16 Oct 2015 16:23:40 +0000 (17:23 +0100)]
Make IO::Poll->poll call _poll even with an empty fd array

Now that _poll() properly handles an empty array, this fixes
[rt.cpan.org #25049].  The commit referenced in that ticket never made
it to CPAN nor blead.

8 years agoFix assertion when calling IO::Poll::_poll() with an empty fd array
Dagfinn Ilmari Mannsåker [Fri, 16 Oct 2015 16:20:04 +0000 (17:20 +0100)]
Fix assertion when calling IO::Poll::_poll() with an empty fd array

  perl: IO.xs:322: XS_IO__Poll__poll: Assertion
  `PL_valid_types_PVX[((svtype)((_svpvx)->sv_flags & 0xff)) & 0xf]'
  failed.

This is because NEWSV(…, 0) returns undef, with a grabage pointer in
the PV slot.  This doesn't seem to matter in practice, since nothing
actually dereferences the pointer when nfds is zero, but to be safe we
should pass in _some_ valid pointer, so just use the SV* itself;

8 years agoremove extra stat() call from .pm opening+remove extra safepath check
Daniel Dragan [Fri, 16 Oct 2015 21:40:38 +0000 (17:40 -0400)]
remove extra stat() call from .pm opening+remove extra safepath check

Originally S_doopen_pm had 2 stat calls, one on the .pm path, and another
on the .pmc, to get mtimes of both. Commit a91233bf4c "Load .pmc always,
even if they are older than a matching .pm file." (see
http://www.nntp.perl.org/group/perl.perl5.porters/2006/03/msg110639.html )
got rid of one of the stat calls but the other was left in place, possibly
as an oversight. S_check_type_and_open itself does another stat call on
unix to check for bad kinds of FS entries (reading a dir as a file), so
assuming someone used .pmc files, a good .pmc would be stat, stat,
open instead of the ideal, stat, open. Remove the extra stat from
S_doopen_pm for efficiency. Since the timestamp compare was removed, the
role of S_doopen_pm has been to verify an attempted path is acceptable to
pass to the FS (no IO done), and generate a .pmc path (no IO done), the
IO side of thing is in S_check_type_and_open, it shouldn't be in
S_doopen_pm.

On Win32, on a no .pmc build, an open is directly done on the attempted
.pm path for efficiency, no stat is done normally (see commit d345f48775
"Win32: stat() only after a failed open() on a module"). Before this patch
the .pmc attempted path got a stat which on Win32 is more than 1 IO call,
compared to Win32 open which is 1 IO call. With this patch, the Win32
specific IO logic in S_check_type_and_open executes instead of a generic
Win32 stat so there is just 1 failing IO call for file not found (typical
case for .pmc) instead of multiple file not found IO calls. See ticket for
details.

When .pmc files are enabled (enabled is default), 2 checks for bad null
char paths were done, once in S_doopen_pm, then again in lower level
S_check_type_and_open. Do the check only once in the higher level call
(S_doopen_pm) for efficiency, there is no way for string "c" which is
catted on to contain a null. There was an existing comment refering to
the problem of a low level check for null returning a message about a
".pmc" instead of a ".pm", so that is another reason to do it at a higher
level. Note on no PMC builds, S_check_type_and_open replaces S_doopen_pm
and still must do the check.

8 years agoFor IRIX the official symbol is __sgi, not __irix__.
Jarkko Hietaniemi [Sat, 17 Oct 2015 23:03:01 +0000 (19:03 -0400)]
For IRIX the official symbol is __sgi, not __irix__.

The __sgi is defined both by SGI cc and gcc.

The change does not seem to change the set of failures with
uselongdouble build; there are two known ones in general
[perl #125298] (warnings) and [cpan #105030] (Time::Piece %z),
and then for uselongdouble a bunch of infnan and locale failures
that I haven't gotten around to reporting or fixing.

8 years agosome perldelta entries
David Mitchell [Sun, 18 Oct 2015 11:30:22 +0000 (12:30 +0100)]
some perldelta entries

for

    6768377 make EXTEND() and stack_grow() safe(r)
    052a7c7 fix up EXTEND() callers

and a missed one (my fault) from 5.23.2:

    a5f4850 re-implement OPpASSIGN_COMMON mechanism

8 years agooptimise save/restore of PL_delaymagic.
David Mitchell [Tue, 13 Oct 2015 16:02:39 +0000 (17:02 +0100)]
optimise save/restore of PL_delaymagic.

A few places (pp_push, pp_unshift, pp_aassign) have to
set PL_delaymagic on entry, and restore it on exit. These are hot
pieces of code. Rather than using  ENTER/SAVEI16(PL_delaymagic)/LEAVE,
add an extra field to the jumpenv struct, and make the JUMPENV_PUSH / POP
macros automatically save and restore this var.

This means that pp_push etc only need to do a local save:

    U16 old_delaymagic = PL_delaymagic;
    PL_delaymagic = DM_DELAY;
    ....
    PL_delaymagic = old_delaymagic;

and in case of an exception being raised, PL_delaymagic still gets
restored.

This transfers the cost of saving PL_delaymagic from each call to
pp_aassign etc to each time a new run level is invoked. The latter should
be much less frequent.

Note that prior to this commit, pp_aassign wasn't actually saving and
restoring PL_delaymagic; it was just setting it to 0 at the end. So this
commit also makes pp_aassign safe against PL_delaymagic re-entrancy like
pp_push and pp_unshift already were.

8 years agoDelay @ISA magic while unshifting
Dagfinn Ilmari Mannsåker [Fri, 18 Sep 2015 16:40:01 +0000 (17:40 +0100)]
Delay @ISA magic while unshifting

pp_unshift() first calls av_unshift(), which prepends the the
requisite number of undefs, then calls av_store() for each item.
However, unlike pp_push() it was not setting PL_delaymagic around the
av_store() loop, so when unshifting onto @ISA, its magic would be
triggered while there were still undefs in the array, causig the
following spurious warning:

    $ perl -wE 'package Foo; unshift @ISA, qw(A B)'
    Use of uninitialized value in unshift at -e line 1.

Also fix pp_push() to save and restore PL_delaymagic instead of
clearing it, so that e.g. unshifting a tied value with FETCH pushing
onto another @ISA doesn't erroneously clear the value from underneath
the unshift.

8 years agort.perl.org #123977 - clear errno in IRIX PERLIO=stdio
Jarkko Hietaniemi [Sat, 17 Oct 2015 22:11:37 +0000 (18:11 -0400)]
rt.perl.org #123977 - clear errno in IRIX PERLIO=stdio

Under some circumstances IRIX stdio fgetc() and fread() set the errno
to ENOENT, which makes no sense according to either IRIX or POSIX docs.
Just clear such an errno.

8 years agoBook-keeping for the previous commit (which restored the VC6 build, btw)
Steve Hay [Sat, 17 Oct 2015 21:22:55 +0000 (22:22 +0100)]
Book-keeping for the previous commit (which restored the VC6 build, btw)

8 years agoWin32 inet_pton fallback misc fixes
Daniel Dragan [Thu, 10 Sep 2015 07:36:36 +0000 (03:36 -0400)]
Win32 inet_pton fallback misc fixes

-VC complains in inet_pton
 "warning C4715: 'inet_pton' : not all control paths return a value"
 this isn't much a problem since Socket.xs doesn't allow anything but
 AF_INET and AF_INET6 on a XSUB level but fix the implementation anyway
 since the previous cargo culted off the internet version has flaws, so
 the Socket.xs version is usable elsewhere if necessery
-remove copying the string to C auto array, unix inet_ptoa requires null
 terminated strings, so does WSAStringToAddress. WSAStringToAddress's docs
 dont mention a maximum length to the input string, so no reason to
 truncate and re-null terminate it
-MSDN's docs for WSAStringToAddress mentions that filling in sin_family
 is required, even though lpAddress is an output arg, not input and a
 duplicate of arg AddressFamily, there is probably some legacy protocol
 driver out in the world that requires this
-static the functions, these fallbacks dont need to be visible in any other
 .o, and with static they might be inlined/further optimized
-provide fallbacks for Visual C 6 (circa 1998) with very old headers that
 were created before RFC 2553 was created

8 years agoReplace 2 strcat()s with strlen() and memcpy() in dl_dlopen.xs.
Nicholas Clark [Sat, 17 Oct 2015 13:25:23 +0000 (15:25 +0200)]
Replace 2 strcat()s with strlen() and memcpy() in dl_dlopen.xs.

In the #if defined(DLOPEN_WONT_DO_RELATIVE_PATHS) block, there were two uses
of strcat() that that the OpenBSD linker spotted and grumbled about.

It can't see that the code was clear enough to be "obviously no bugs".
However, I can see that with 2 successive calls to strcat() there's one more
O(1) scan of the string length than there needs to be. So refactoring to
eliminate strcat() also removes avoidable inefficiencies.

Fortunately, this code isn't in a block that the MS compiler will ever see.
So it won't be suggesting that memcpy_s() is obviously more secure than
memcpy() (because two lengths are better than one).

8 years agort.perl.org perl #88814 was revived in openbsd by commit 23705063.
Jarkko Hietaniemi [Sat, 17 Oct 2015 00:57:55 +0000 (20:57 -0400)]
rt.perl.org perl #88814 was revived in openbsd by commit 23705063.

openbsd pre-5.2 + threads + signals is broken,
and 23705063 made threads the default.

Similar case to 8e7f1f72.

8 years agoperl #126306: openbsd t/io/errno.t tests fail randomly
Jarkko Hietaniemi [Fri, 16 Oct 2015 23:52:30 +0000 (19:52 -0400)]
perl #126306: openbsd t/io/errno.t tests fail randomly

perl #71504 added the skip for openbsd+threads+stdio;
then commit 23705063 made -lpthread the default,
necessitating the skip even without threads.

8 years agoAdd the OS X processor support.
Jarkko Hietaniemi [Fri, 16 Oct 2015 22:38:11 +0000 (18:38 -0400)]
Add the OS X processor support.

8 years agoOS X versioning dance.
Jarkko Hietaniemi [Fri, 16 Oct 2015 00:33:59 +0000 (20:33 -0400)]
OS X versioning dance.

Note the difference between the OS X version (10.X) and the kernel version,
it's the latter that Configure knows as $osvers.  Adding a cross-reference
table for these versions rom the NetBSD project.

For OS X 10.6 or above, do not any more use the MACOSX_DEPLOYMENT_TARGET,
the toolchains should work fine without.  Until now the deployment target
was hardwired to 10.3.  This logic comes from
https://rt.perl.org/Public/Bug/Display.html?id=117433

For OS X releases from 10.3 until 10.5, no change, still using
the MACOSX_DEPLOYMENT_TARGET=10.3 for linking.

For OS X releases before 10.3, no change, still not using
the MACOSX_DEPLOYMENT_TARGET=10.3.

New: always add -mmacosx-version-min to ccflags and ldflags from
the env var $MACOSX_DEPLOYMENT_TARGET, if set.  If the var is not set,
set the min from the OS X version, from sw_vers(1).  Setting the var
should become handy for people building and packaging Perl for earlier
OS X versions.

We assume that the toolchain/SDK installed to system will be able to build
for the requested minimum versions and deployment targets, or if it is not,
it should properly warn or die.

Some related tickets, past and present:

https://rt.perl.org/Public/Bug/Display.html?id=126360
https://rt.perl.org/Public/Bug/Display.html?id=123985
https://rt.perl.org/Public/Bug/Display.html?id=123831
https://rt.perl.org/Public/Bug/Display.html?id=117433

8 years agort.perl.org 126152 compile error after re-running Configure since AmigaOS merge
Jarkko Hietaniemi [Thu, 15 Oct 2015 12:39:42 +0000 (08:39 -0400)]
rt.perl.org 126152 compile error after re-running Configure since AmigaOS merge

Configure /proc issues, honor d_procselfexe and procselfexe hints.

8 years agoNote some files missing from blead in two upstream => blead distributions
Steve Hay [Fri, 16 Oct 2015 17:15:24 +0000 (18:15 +0100)]
Note some files missing from blead in two upstream => blead distributions

8 years agoTry to avoid doubling the cppflags if rerun without removing config.sh
Jarkko Hietaniemi [Fri, 16 Oct 2015 12:10:40 +0000 (08:10 -0400)]
Try to avoid doubling the cppflags if rerun without removing config.sh

This bug has been here since 2001, introduced by yours truly
in 58e77565.  Hasn't been too harmful, obviously.  It doubles
the cppflags only once, thankfully, unlimited doubling would
probably have been noticed earlier.

The avoidance maneuver is far from fool-proof.  To be more
fooler-proofer, some sort of order-preserving deduping would
be needed.

8 years agoIRIX <sys/prctl.h> is not what Configure expects.
Jarkko Hietaniemi [Tue, 13 Oct 2015 12:55:08 +0000 (08:55 -0400)]
IRIX <sys/prctl.h> is not what Configure expects.

It exists, but the API is something completely different,
so the compilation attempt ends up in a fireworks display.

8 years agoVMS-specific statbuf in Perl_find_script.
Craig A. Berry [Thu, 15 Oct 2015 14:12:21 +0000 (09:12 -0500)]
VMS-specific statbuf in Perl_find_script.

In 97466d2cbf895b I added a declaration at function scope, but in
some paths that was overridden at an inner scope, leaving the
function-level one declared but not used.  So lets go back to the
original intent of 45a23732c73c8 and have a separate declaration
in each block that needs it.

8 years agoRevert "Missed one statbuf declaration in 45a23732c73."
Craig A. Berry [Thu, 15 Oct 2015 14:08:36 +0000 (09:08 -0500)]
Revert "Missed one statbuf declaration in 45a23732c73."

This reverts commit 97466d2cbf895b35ac41b8bf7c31db955b52d48e.

Adding a declaration at function scope causes unused variable
warnings when there are paths that redeclare it at an inner scope.

8 years agoUpgrade bignum from version 0.40 to 0.41
Steve Hay [Thu, 15 Oct 2015 13:06:53 +0000 (14:06 +0100)]
Upgrade bignum from version 0.40 to 0.41

8 years agoMove bignum from dist/ to cpan/
Steve Hay [Thu, 15 Oct 2015 13:04:28 +0000 (14:04 +0100)]
Move bignum from dist/ to cpan/

Also, blead is actually in sync with 0.40, not 0.37.

8 years agoUpgrade Math::BigInt::FastCalc from 0.31 to 0.34
Steve Hay [Thu, 15 Oct 2015 12:43:14 +0000 (13:43 +0100)]
Upgrade Math::BigInt::FastCalc from 0.31 to 0.34

This removes the minor blead customizations: I couldn't see any sign of
them having been deliberately added to blead. They looked more like
differences that cropped up because CPAN changes hadn't all been imported
into blead.

8 years agoUpgrade Math::BigInt from 1.999701 to 1.999704
Steve Hay [Thu, 15 Oct 2015 12:36:38 +0000 (13:36 +0100)]
Upgrade Math::BigInt from 1.999701 to 1.999704

This removes the minor blead customizations: I couldn't see any sign of
them having been deliberately added to blead. They looked more like
differences that cropped up because CPAN changes hadn't all been imported
into blead.

8 years agoext/XS-APItest/t/hash.t: Fix for EBCDIC
Karl Williamson [Fri, 25 Sep 2015 18:19:55 +0000 (12:19 -0600)]
ext/XS-APItest/t/hash.t: Fix for EBCDIC

The .xs file was returning malformed UTF-8 due to not accounting for
length differences when substituting one code point for another.  It
just so happened that the code points chosen to be tested were the same
length as the substituted ones on ASCII platforms, but not EBCDIC

And the .t is changed to convert Unicode code points to native

8 years agoDynaLoader.t: Skip test on z/OS
Karl Williamson [Tue, 13 Oct 2015 03:55:24 +0000 (21:55 -0600)]
DynaLoader.t: Skip test on z/OS

See thread beginning at
http://nntp.perl.org/group/perl.perl5.porters/231613

dl_findfile() does not find z/OS hospitable.

8 years agoMath-BigRat is (nearly) in sync with 0.260801
Steve Hay [Wed, 14 Oct 2015 12:23:07 +0000 (13:23 +0100)]
Math-BigRat is (nearly) in sync with 0.260801

8 years agoMath-BigInt-FastCalc has a slightly customized .pm file
Steve Hay [Wed, 14 Oct 2015 12:22:21 +0000 (13:22 +0100)]
Math-BigInt-FastCalc has a slightly customized .pm file

Not sure if these customizations are required; just noting them here
for now.

8 years agoMath-BigInt is (nearly) in sync with 1.999701
Steve Hay [Wed, 14 Oct 2015 12:20:59 +0000 (13:20 +0100)]
Math-BigInt is (nearly) in sync with 1.999701

8 years agoSocket.pm is customized (for the ++$VERSION) as well as Socket.xs
Steve Hay [Wed, 14 Oct 2015 12:19:50 +0000 (13:19 +0100)]
Socket.pm is customized (for the ++$VERSION) as well as Socket.xs

8 years agoModule-Metadata-1.000029-TRIAL is in blead
Steve Hay [Wed, 14 Oct 2015 12:18:36 +0000 (13:18 +0100)]
Module-Metadata-1.000029-TRIAL is in blead

8 years agoCorrect the paths in the Encode customizations
Steve Hay [Wed, 14 Oct 2015 12:17:54 +0000 (13:17 +0100)]
Correct the paths in the Encode customizations

Blead doesn't actually need these trivial customizations but they can't
be corrected without needing to bump the corresponding .pm file $VERSIONs
otherwise porting/cmp_version.t will fail since the customized versions
have already escaped in the last blead release. There is no sense in
adding customizations for the .pm files just to remove these
customizations, so they will have to stay for now.

8 years agoCompress-Raw-Bzip2-2.069 has two more excluded files than were listed
Steve Hay [Wed, 14 Oct 2015 12:11:28 +0000 (13:11 +0100)]
Compress-Raw-Bzip2-2.069 has two more excluded files than were listed

8 years agoMakefile: add TAGS target (etags, not ctags)
Reini Urban [Mon, 9 Feb 2015 09:08:45 +0000 (10:08 +0100)]
Makefile: add TAGS target (etags, not ctags)

8 years agomake -s: silent means silent
Reini Urban [Mon, 9 Feb 2015 08:41:43 +0000 (09:41 +0100)]
make -s: silent means silent

check MAKEFLAGS for -s|--silent|--quiet and honor it

8 years ago[perl #126242] make the constant hash seeds unsigned char *
Tony Cook [Tue, 13 Oct 2015 23:51:21 +0000 (10:51 +1100)]
[perl #126242] make the constant hash seeds unsigned char *

...to prevent warnings on most C compilers and build failures on C++
compilers for -DNO_HASH_SEED builds.

8 years agofix NO_HASH_SEED build
Daniel Dragan [Thu, 1 Oct 2015 19:04:29 +0000 (15:04 -0400)]
fix NO_HASH_SEED build

commit b1300a738f added PERL_HASH_FUNC_ONE_AT_A_TIME_HARD algo, which was
the first one to introduce 8 byte seeds, previously all the algos used 4
or 16 byte seeds. No case was added to the CPP tree for 8 byte const
seeds, so add one now. Otherwise the #error at the end of the tree runs
and breaks the build. NO_HASH_SEED define was public API in the past and
could be considered to still be public API, see commit f36626324a.
My use for NO_HASH_SEED is reducing entropy for tracking down memory
corruption.

8 years agoPATCH: [perl #126180] /(?[\ &!])/ segfaults
Karl Williamson [Mon, 12 Oct 2015 22:38:32 +0000 (16:38 -0600)]
PATCH: [perl #126180] /(?[\ &!])/ segfaults

8 years agoqr/\p{pkg1::...foo}/ must be a user-defined property
Karl Williamson [Mon, 12 Oct 2015 18:31:58 +0000 (12:31 -0600)]
qr/\p{pkg1::...foo}/ must be a user-defined property

So, if it isn't found and 'foo' doesn't begin with 'In' or 'Is', we know
that there would be a run-time error, which we can fail with at
compile time instead.  We use a different error message than if we don't
know if it is a user-defined property.

See thread beginning at
http://nntp.perl.org/group/perl.perl5.porters/231658

I didn't make a perldelta entry, as I doubt that this has ever come up
in the field, as I discovered the issue myself while playing around
investigating other bugs.