This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
5 years agoregcomp.c: Replace code with fcn that does the same thing
Karl Williamson [Wed, 15 Aug 2018 19:49:55 +0000 (13:49 -0600)]
regcomp.c: Replace code with fcn that does the same thing

This makes one less place that has to know certain details.  Since the
function is inline, there should be no change in the compiled code

5 years agoutf8.h: Update outmoded comment
Karl Williamson [Mon, 20 Aug 2018 04:36:32 +0000 (22:36 -0600)]
utf8.h: Update outmoded comment

5 years agoutf8.c: Rename macro and move to utf8.h, and use it in regcomp.c
Karl Williamson [Mon, 20 Aug 2018 04:35:29 +0000 (22:35 -0600)]
utf8.c: Rename macro and move to utf8.h, and use it in regcomp.c

This hides an internal detail

5 years agoinvlist_inline.h: Two symbols no longer needed in utf8.c
Karl Williamson [Mon, 20 Aug 2018 04:05:04 +0000 (22:05 -0600)]
invlist_inline.h: Two symbols no longer needed in utf8.c

This is because the code using them has been moved to regcomp.c
in cef721997e14497f2fbc4be17ab736ad7ddfda29

5 years agoAdd inline function to hide implementation details
Karl Williamson [Mon, 20 Aug 2018 04:01:09 +0000 (22:01 -0600)]
Add inline function to hide implementation details

5 years agot/re/regexp_unicode_prop.t: Add tests for run-time
Karl Williamson [Mon, 6 Aug 2018 23:12:08 +0000 (17:12 -0600)]
t/re/regexp_unicode_prop.t: Add tests for run-time

User-defined \p{} properties can be referred to in a regex pattern
compilation before their definition is encountered.  This is supposed to
work, and their definitions get compiled when needed at run-time.  But
there was only one test that this worked.  This commit restructures
things so that every user-defined property is compiled into a pattern
before its definition is known, and also into another pattern after its
definition is known.

This removes the need to special case the earlier single one that did
this test.

5 years agot/re/regexp_unicode_prop.t: Reorder a few tests
Karl Williamson [Mon, 6 Aug 2018 22:57:20 +0000 (16:57 -0600)]
t/re/regexp_unicode_prop.t: Reorder a few tests

This is based on knowledge of how the code works, to stress it a little
more.

5 years agot/re/regexp_unicode_prop.t: Avoid a TEST crash if failure
Karl Williamson [Mon, 6 Aug 2018 22:53:23 +0000 (16:53 -0600)]
t/re/regexp_unicode_prop.t: Avoid a TEST crash if failure

This changes the logic to not do a 'like' unless we know that the
operand is a valid pattern.

5 years agot/re/regexp_unicode_prop.t: Add check no warnings generated
Karl Williamson [Mon, 6 Aug 2018 22:47:59 +0000 (16:47 -0600)]
t/re/regexp_unicode_prop.t: Add check no warnings generated

5 years agot/re/regexp_unicode_prop.t: Extract code into a function
Karl Williamson [Mon, 6 Aug 2018 22:46:37 +0000 (16:46 -0600)]
t/re/regexp_unicode_prop.t: Extract code into a function

This is in preparation for it to be called from a 2nd place

5 years agot/re/regexp_unicode_prop.t: White-space only
Karl Williamson [Mon, 6 Aug 2018 22:37:32 +0000 (16:37 -0600)]
t/re/regexp_unicode_prop.t: White-space only

Indent some lines that a future commit will surround with a block,
and outdent others where a block will be removed

5 years agoregcomp.c: Use isFOO_A instead of isFOO
Karl Williamson [Tue, 31 Jul 2018 04:11:52 +0000 (22:11 -0600)]
regcomp.c: Use isFOO_A instead of isFOO

They evaluate to the same thing, but this change emphasizes that only
ASCII characters can pass.

5 years agoregcomp.c: Change parameter name
Karl Williamson [Tue, 31 Jul 2018 03:26:32 +0000 (21:26 -0600)]
regcomp.c: Change parameter name

This makes it clearer what variable this length is for

5 years agoinline.h: Use 'do {} while' instead of 'while {}'
Karl Williamson [Mon, 9 Jul 2018 21:59:16 +0000 (15:59 -0600)]
inline.h: Use 'do {} while' instead of 'while {}'

5 years agot/re/regexp_unicode_prop.t: Make sure returns true
Karl Williamson [Wed, 15 Aug 2018 19:55:43 +0000 (13:55 -0600)]
t/re/regexp_unicode_prop.t: Make sure returns true

5 years agoHandle 3 digit exponents in \p{nv=%e}
Karl Williamson [Wed, 15 Aug 2018 22:33:58 +0000 (16:33 -0600)]
Handle 3 digit exponents in \p{nv=%e}

Prior to this commit, Windows machines which format %e to have a minimum
of 3 digits would fail in looking up the Numeric value properties, and
would revert to the old swash method of doing it.

5 years agomktables: Handle platforms with 3 digit exponents
Karl Williamson [Wed, 15 Aug 2018 21:18:06 +0000 (15:18 -0600)]
mktables: Handle platforms with 3 digit exponents

C99 says there shouldn't be more than 2 digits in an exponent unless
needed.  But Windows uses three.  This messes some stuff up that is
expecting two.  Change to remove leading zeros so that only two digits
are used.  This allows mktables to properly operate on Windows.

5 years agoUpdate Time-Piece to CPAN version 1.33
Chris 'BinGOs' Williams [Mon, 20 Aug 2018 10:15:20 +0000 (11:15 +0100)]
Update Time-Piece to CPAN version 1.33

  [DELTA]

1.33    2018-08-18
        - Allow objects in overloaded methods

5 years agoperldelta for 56191551147fe888e34f15ef84f08013f4fbb5aa
James E Keenan [Sat, 18 Aug 2018 00:19:49 +0000 (20:19 -0400)]
perldelta for 56191551147fe888e34f15ef84f08013f4fbb5aa

5 years agoSynch with CPAN Test-Simple 1.302140.
Chad Granum [Sat, 18 Aug 2018 00:02:40 +0000 (20:02 -0400)]
Synch with CPAN Test-Simple 1.302140.

Addressing RT 133382.

5 years agoperlre: Add some clarifying script run documentation
Karl Williamson [Thu, 16 Aug 2018 22:48:05 +0000 (16:48 -0600)]
perlre: Add some clarifying script run documentation

5 years agoperlre, perlrecharclass: Add examples
Karl Williamson [Thu, 16 Aug 2018 22:27:52 +0000 (16:27 -0600)]
perlre, perlrecharclass: Add examples

This adds more concrete cases of how mixed script digits can be
hazardous.

5 years agoFix script run bug '1' followed by Thai digit
Karl Williamson [Thu, 16 Aug 2018 22:14:01 +0000 (16:14 -0600)]
Fix script run bug '1' followed by Thai digit

This does not have a ticket, but was pointed out in
http://nntp.perl.org/group/perl.perl5.porters/251870

The logic for deciding if it was needed to check if a character is a
digit was flawed.

5 years agoregexec.c: Use a macro for clarity
Karl Williamson [Thu, 16 Aug 2018 21:08:27 +0000 (15:08 -0600)]
regexec.c: Use a macro for clarity

This commit #defines a macro and uses it, which makes the code easier to
understand.

5 years agoregexec.c: Fix UNLIKELY() scope
Karl Williamson [Thu, 16 Aug 2018 20:54:23 +0000 (14:54 -0600)]
regexec.c: Fix UNLIKELY() scope

The expression as a whole is unlikely to be true, not just the portion
that was marked so.

5 years agoReleaser for 5.29.2
Sawyer X [Sat, 11 Aug 2018 19:24:51 +0000 (22:24 +0300)]
Releaser for 5.29.2

5 years agoPATCH: [perl #41202] text->float gives wrong answer
sisyphus [Wed, 1 Aug 2018 12:33:38 +0000 (22:33 +1000)]
PATCH: [perl #41202] text->float gives wrong answer

This changes to use Perl_strtod() when available, and that turns out to
be the key to fixing this bug.

S_mulexp10() is removed from embed.fnc to avoid repeating the
complicated prerequisites for defining Perl_strtod().  This works
because this static function already was defined before use in
numeric.c, and always called in full form without using a macro.

James Keenan fixed a file permissions problem originally introduced by
this commit, but the fix has been squashed into it.

5 years agoperl.h - mingw-w64 builds use __mingw_strtold instead of strtold
sisyphus [Wed, 1 Aug 2018 12:32:00 +0000 (22:32 +1000)]
perl.h - mingw-w64 builds use __mingw_strtold instead of strtold

There are bugs in strtold().

James Keenan fixed a file permissions problem originally introduced by
this commit, but the fix has been squashed into it.

5 years agolib/locale.t - no longer special case quadmath builds
sisyphus [Wed, 1 Aug 2018 12:29:57 +0000 (22:29 +1000)]
lib/locale.t - no longer special case quadmath builds

The previous commit now has these respect locale

5 years agonumeric.c: Move some code around
Karl Williamson [Wed, 8 Aug 2018 17:23:31 +0000 (11:23 -0600)]
numeric.c: Move some code around

For readability, this changes

if (f00) {  MANY LINES } else { FEW LINES }

to

if (! f00) { FEW LINES } else { MANY LINES }

5 years agonumeric.c: White-space only
Karl Williamson [Wed, 8 Aug 2018 17:22:09 +0000 (11:22 -0600)]
numeric.c: White-space only

Remove trailing blanks, add a few blank lines

5 years agonumeric.c: Quadmath now honors LC_numeric
Karl Williamson [Wed, 8 Aug 2018 17:20:01 +0000 (11:20 -0600)]
numeric.c: Quadmath now honors LC_numeric

Previously the code compiled under quadmath did not bother to check for
locale.  Fixing this was a simple matter of a little rearrangement.

5 years ago(perl #133422) handle Off_t smaller than size_t
Tony Cook [Wed, 8 Aug 2018 04:21:33 +0000 (14:21 +1000)]
(perl #133422) handle Off_t smaller than size_t

5 years agotime::HiRes: don't truncate nanosec utime
David Mitchell [Fri, 27 Apr 2018 11:43:44 +0000 (12:43 +0100)]
time::HiRes: don't truncate nanosec utime

When passed a floating point atime/mtime value, T::HR::utime()
was converting it into two longs: secs and nsec. But the nanosec value
was calculated using a final NV to long cast, which truncates any
fractional part rather than rounding to nearest. Use a 0.5 addition to
force rounding.

This was manifesting as a test in lib/File/Copy.t failing to preserve
the same mtime after a couple of round trips with utime() and stat().

In particular, the test was attempting to set an mtime to the literal
floating-point value

    1000000000.12345

This value can't be represented exactly as an NV, so was actually
(under -Dquadmath)

1000000000.1234499999999999999999999568211720247320

which was (using truncation) being converted into the two sec/nsec
longs:

    1000000000123449999

After this commit, it instead correctly gets converted to

    1000000000123450000

5 years agoUpgrade HTTP::Tiny from version 0.070 to 0.076
Steve Hay [Wed, 8 Aug 2018 13:04:52 +0000 (14:04 +0100)]
Upgrade HTTP::Tiny from version 0.070 to 0.076

5 years agoUpgrade Filter::Util::Call from version 1.58 to 1.59
Steve Hay [Wed, 8 Aug 2018 13:02:38 +0000 (14:02 +0100)]
Upgrade Filter::Util::Call from version 1.58 to 1.59

5 years agoPA-RISC is obsolted
H.Merijn Brand [Wed, 8 Aug 2018 13:58:07 +0000 (15:58 +0200)]
PA-RISC is obsolted

Itanium in not "new". It is newer than PA-RISC though, and PA-RISC is
getting rarer

5 years agoUpdate HP-UX readme
H.Merijn Brand [Wed, 8 Aug 2018 12:51:25 +0000 (14:51 +0200)]
Update HP-UX readme

• Porting center released 5.28.0 :)
• EOL matrix link was dead

5 years agoTime-HiRes/t/itimer.t: avoid race condition.
David Mitchell [Tue, 7 Aug 2018 11:26:31 +0000 (12:26 +0100)]
Time-HiRes/t/itimer.t: avoid race condition.

This test script sets a repeating interval timer going, and after 4
'ticks' (SIGVTALRM), disables the timer (by setting it to zero).

The main loop which does CPU burning, does a getitmer() every now and
again, and when the value is zero, assumes the signal handler has
disabled the timer,  and so finishes.

The trouble was that it was checking the 'time left', which can reach
zero because the interval timer has counted down to zero, and the signal
handler is about to be called, but the interval hasn't been reset back
to 0.4s yet.

i.e. the code doesn't distinguish between "timer disabled" and "timer
just reached zero".

In that scenario, the cleanup code in the test script disables the
SIGVTALRM handler while the timer is still active, and so the process
gets killed if another signal is raised.

This commit changes the test to check the second value returned by
getitmer() for being zero rather than the first - the second being the
repeat interval, whichb is always 0.4 until the timer is disabled.

5 years agodump.c: Fix space before tabs
Karl Williamson [Mon, 6 Aug 2018 15:58:46 +0000 (09:58 -0600)]
dump.c: Fix space before tabs

These generate git warnings

5 years agoUse sv_catpvs where appropriate vs sv_catpv
Karl Williamson [Sun, 5 Aug 2018 12:41:05 +0000 (06:41 -0600)]
Use sv_catpvs where appropriate vs sv_catpv

This moves calculations definitely to compile time; some optimizing
compilers may already do this, but some may not.

5 years agoperlapi: Fix up pod for utf8n_to_uvchr_error()
Karl Williamson [Sat, 4 Aug 2018 19:19:58 +0000 (13:19 -0600)]
perlapi: Fix up pod for utf8n_to_uvchr_error()

There are two return flags signalling that the input UTF-8 was malformed
by being too short.  This commit adds detail comparing and contrasting
the meanings of the two

5 years agoperlapi: Fix up SV handling pod
Karl Williamson [Sat, 4 Aug 2018 19:15:58 +0000 (13:15 -0600)]
perlapi: Fix up SV handling pod

The pod for this has gotten screwed up over the releases, with a section
entitled SV-Body Allocation containing a bunch of SV manipulation
functions, and another section with that name containing still more with
no real rhyme or reason as to why one would be in one vs the other.  And
one function was in both places.  This commit consolidates all these
into one section entitled "SV Manipulation Functions"

5 years agoperlapi: Clarify sv_insert()
Karl Williamson [Sat, 4 Aug 2018 19:13:32 +0000 (13:13 -0600)]
perlapi: Clarify sv_insert()

5 years agoregcomp.c: Add comments
Karl Williamson [Sat, 4 Aug 2018 19:11:52 +0000 (13:11 -0600)]
regcomp.c: Add comments

5 years agoperlunicode: Clarifiy user-defined props
Karl Williamson [Sat, 4 Aug 2018 19:09:43 +0000 (13:09 -0600)]
perlunicode: Clarifiy user-defined props

5 years agoperl.h: Use TAINT_get, instead of PL_tainting.
Karl Williamson [Fri, 3 Aug 2018 19:27:47 +0000 (13:27 -0600)]
perl.h: Use TAINT_get, instead of PL_tainting.

The former is designed to be compilable out.

5 years agoperl.c: Use TAINT_get, instead of PL_tainting.
Karl Williamson [Fri, 3 Aug 2018 19:25:57 +0000 (13:25 -0600)]
perl.c: Use TAINT_get, instead of PL_tainting.

The former is designed to be compilable out.

5 years agoThe HP-UX optimizer fails again (on Itanium only this time)
H.Merijn Brand [Sun, 5 Aug 2018 07:56:10 +0000 (09:56 +0200)]
The HP-UX optimizer fails again (on Itanium only this time)

5 years agomathoms.c: Use my_strnlen, not strnlen
Karl Williamson [Sat, 4 Aug 2018 14:28:51 +0000 (08:28 -0600)]
mathoms.c: Use my_strnlen, not strnlen

Spotted by H. Merijn Brand.

5 years agoMake utf8_to_uvchr() slightly safer
Karl Williamson [Tue, 31 Jul 2018 03:41:44 +0000 (21:41 -0600)]
Make utf8_to_uvchr() slightly safer

Recent commit aa3c16bd709ef9b9c8c785af48f368e08f70c74b made this
function safe if the input is a NUL-terminated string.  But if not, it
can read past the end of the buffer.  It used as a limit the maximum
length a UTF-8 code point can be.  But most code points in real-world
use aren't nearly that long, and we know how long that can be by looking
at the first byte.  Therefore, use the length determined by the first
byte as the limit instead of the maximum possible.

5 years agoRevise kludge for [perl #133136]
Karl Williamson [Wed, 25 Jul 2018 21:00:15 +0000 (15:00 -0600)]
Revise kludge for [perl #133136]

Lexical::SealRequireHints has a test that is looking for internal Perl
behavior that has changed, and the maintainer has been unresponsive.
Since this test is high in the cpan river, in order to get 5.28
released, a kludge was added that used the old behavior.  But that old
behavior is about to be completely removed, so this does a different
kludge that loads utf8.pm, and that is what the .t is actually
expecting.  This leaves us free to remove the behavior without affecting
the module.

5 years agomathoms.c: Make safer a deprecated function
Karl Williamson [Wed, 25 Jul 2018 03:41:41 +0000 (21:41 -0600)]
mathoms.c: Make safer a deprecated function

This function is deprecated because it is lacking a length parameter, so
malformed UTF-8 may cause it to read beyond the buffer.  This commit
causes it to not read beyond a NUL character, which makes it safe for
the common case that the input is a C string.

5 years agoutf8.c: Make safer some deprecated functions
Karl Williamson [Wed, 25 Jul 2018 03:28:42 +0000 (21:28 -0600)]
utf8.c: Make safer some deprecated functions

This function is a common function, only called from various deprecated
functions, but they may be moved to ppport.h.  They are lacking a length
parameter, so malformed UTF-8 may cause them to read beyond the buffer.
This commit causes this common function to not read beyond a NUL
character, which makes all its callers safe for the common case that
the input is a NUL-terminated C string.

5 years agoutf8.c: Avoid some unnecessary work
Karl Williamson [Wed, 25 Jul 2018 01:52:25 +0000 (19:52 -0600)]
utf8.c: Avoid some unnecessary work

The code changed by this commit used to check that the input was valid
UTF-8, and if so, calculated the code point, using a fast function
that doesn't do any error checking.

However, the changes earlier in 5.29 make the time spent in checking for
validity hardly less than the time spent in calculating the code point
at the same time.  So this commit switches to calculating the code point
from the start, avoiding a second pass through the byte string.

5 years agoutf8.c: Remove unused parameters
Karl Williamson [Wed, 25 Jul 2018 01:43:19 +0000 (19:43 -0600)]
utf8.c: Remove unused parameters

These functions used to have swashes, but now all have inversion lists
instead, so we can get rid of the code that handled their swashes.

5 years agoutf8.c: Remove common code
Karl Williamson [Tue, 24 Jul 2018 23:25:13 +0000 (17:25 -0600)]
utf8.c: Remove common code

Call another function that incorporates the same code that is removed by
this commit.

5 years agomktables: Some tests are invalid
Karl Williamson [Wed, 25 Jul 2018 02:12:24 +0000 (20:12 -0600)]
mktables: Some tests are invalid

These tests have been wrongly passing.  A future commit will change
that.

5 years agoutf8.c: Make safer a deprecated function
Karl Williamson [Tue, 24 Jul 2018 23:20:08 +0000 (17:20 -0600)]
utf8.c: Make safer a deprecated function

This function is only called from deprecated functions, but they may be
moved to ppport.h.  It is lacking a length parameter, so malformed UTF-8
may cause it to read beyond the buffer.  This commit causes it to not
read beyond a NUL character, which makes it safe for the common case
that the input is a C string.

5 years agoutf8.c: Make unused parameter signal its status
Karl Williamson [Wed, 25 Jul 2018 01:35:55 +0000 (19:35 -0600)]
utf8.c: Make unused parameter signal its status

Change the string in this string parameter to indicate it is unused,
like the similar calls nearby.

5 years agoInitialize some inversion lists at start-up.
Karl Williamson [Wed, 25 Jul 2018 01:16:46 +0000 (19:16 -0600)]
Initialize some inversion lists at start-up.

The time it takes for these is trivial, since they are using compiled-in
Unicode values.

5 years agoinline.h: Init a variable to silence stupid compilers
Karl Williamson [Fri, 3 Aug 2018 04:48:55 +0000 (22:48 -0600)]
inline.h: Init a variable to silence stupid compilers

In looking at smokes, I noticed some compilers wrongly warn that this
variable is used uninitialize.  It's easiest to humor them.

5 years agoAvoid extra newlines on VMS in t/opbasic/arith.t
Craig A. Berry [Thu, 2 Aug 2018 22:30:21 +0000 (17:30 -0500)]
Avoid extra newlines on VMS in t/opbasic/arith.t

Separate print statements through a pipe with autoflush on cause
extra newlines due a bug in the VMS pipe implementation, and were
causing this test to fail with an "unexpected output" message. So
consolidate into a single print statement.

5 years agoAvoid extra newlines on VMS in t/op/local.t.
Craig A. Berry [Thu, 2 Aug 2018 22:23:50 +0000 (17:23 -0500)]
Avoid extra newlines on VMS in t/op/local.t.

Separate print statements through a pipe with autoflush on cause
extra newlines due a bug in the VMS pipe implementation, and were
causing this test to fail with an "unexpected output" message. So
consolidate into a single print statement.

5 years agoMove Unicode \p{} definitions to regcomp.c
Karl Williamson [Mon, 30 Jul 2018 22:00:25 +0000 (16:00 -0600)]
Move Unicode \p{} definitions to regcomp.c

These are only used in compiling patterns.  They previously were placed
in utf8.c because they are large, and there is a copy of regcomp.c in
ext/re, so they would have use twice the space.

This commit changes things so that they only are used and defined in
regcomp.c, (not re_comp.c) so that duplication does not occur.  They are
accessed only from one function, and that is also moved from utf8.c to
regcomp.c, only compiled in regcomp.c, and referred to as an external by
re_comp.c

I had to change the names of the table.  Previously they started with
'PL_' in case any got exposed, but globvar.t mindlessly assumes that any
such variables in the file regcomp.c are globals, and wrongly complains.
It was easier to just change the prefix to 'UNI_' instead.

A few tables are used in regexec.c, and are duplicated in re_exec.c.
Things could be adjusted so that only one copy is used.  I tried this,
but the tables are far more intertwined in regexec.c functions than
the ones changed in this commit, as only a single function accesses
these.  Thus doing this would be a lot harder, and the payback isn't all
that much.  I started work to make them EXTCONSTs, and then discovered
the intertwining, but left in that work, unused.

5 years agoext/POSIX/t/posix.t - Fix 'strtold works' test
sisyphus [Thu, 2 Aug 2018 07:59:50 +0000 (17:59 +1000)]
ext/POSIX/t/posix.t - Fix 'strtold works' test

5 years agot/run/locale.t - Add missing SKIP:{} block
sisyphus [Thu, 2 Aug 2018 07:55:44 +0000 (17:55 +1000)]
t/run/locale.t - Add missing SKIP:{} block

5 years agoConfigure: redirect try.c errors to /dev/null
Karl Williamson [Tue, 31 Jul 2018 04:00:13 +0000 (22:00 -0600)]
Configure: redirect try.c errors to /dev/null

5 years agoperldelta for 028f02e7e97a, 3d5e9c119db6 and bbc9927bf24e
Tony Cook [Wed, 1 Aug 2018 06:54:02 +0000 (16:54 +1000)]
perldelta for 028f02e7e97a3d5e9c119db6 and bbc9927bf24e

5 years agowin32: fix argumentless sleep()
Tomasz Konojacki [Sun, 15 Jul 2018 00:33:16 +0000 (02:33 +0200)]
win32: fix argumentless sleep()

Before this commit, pause() was implemented as a macro calling
win32_sleep((32767L << 16) + 32767), which was causing the following
problems with argumentless sleep():

- it was sleeping for 4262198 seconds (~50 days) instead of forever
- it was triggering "sleep(2147450879) too large" warning

This commit implements pause() as a proper function which calls
win32_msgwait() with an INFINITE timeout.

[perl #133376]

5 years ago(perl #133314) always close the directory handle on clean up
Tony Cook [Mon, 2 Jul 2018 00:43:19 +0000 (10:43 +1000)]
(perl #133314) always close the directory handle on clean up

Previously the directory handle was only closed if the rest of the
magic free clean up is done, but in most success cases that code
doesn't run, leaking the directory handle.

So always close the directory if our AV is available.

5 years ago(perl #133314) test for handle leaks from in-place editing
Tony Cook [Wed, 1 Aug 2018 01:55:22 +0000 (11:55 +1000)]
(perl #133314) test for handle leaks from in-place editing

5 years agobump $Storable::VERSION
Tony Cook [Tue, 31 Jul 2018 00:29:37 +0000 (10:29 +1000)]
bump $Storable::VERSION

since I made a substansive change to stacklimit

5 years ago(perl #133411) don't try to load Storable with -Dusecrosscompile
Tony Cook [Mon, 30 Jul 2018 11:00:52 +0000 (21:00 +1000)]
(perl #133411) don't try to load Storable with -Dusecrosscompile

5 years agoFix setting GCCTARGET in win32/makefile.mk when CCTYPE is set to GCC
Steve Hay [Mon, 30 Jul 2018 07:31:10 +0000 (08:31 +0100)]
Fix setting GCCTARGET in win32/makefile.mk when CCTYPE is set to GCC

This just copies a piece of logic from win32/GNUmakefile to get GCCTARGET
set when CCTYPE is already set to GCC.

5 years agofix version autodetect for Visual C 64bit edition
Daniel Dragan [Fri, 27 Jul 2018 20:44:26 +0000 (16:44 -0400)]
fix version autodetect for Visual C 64bit edition

-replace *= with := in makefile.mk because we dont want to run
 "gcc.exe -dumpmachine" multiple times
-64 bit Visual C has the major version number at 1 "token" less than
 32 bit edition, so the autodetect code was saying VC 2005 64b was
 CCTYPE="MSVC-60" because shell var %i was "00" in the "set /A", VC 2005
 32b wasn't affected, MS when they created 64 bit VC took some liberties
 in changing the version string, rumor has it many legacy code bases do a
 string test for "80x86", so that is why it was never updated by MS. I
 think detecting 64b VC version numbers has been broken since day 1 of
 the autodetect code that I wrote in commit ca30c090c3 . I just never
 tested it on 64b before.
-copy the "info" target from GNUMakefile to makefile.mk for debugging
 reasons, mostly so I can verify this revised autodetect logic works but
 since the target uses alot of CPU/IO/many procs launched to compute the
 version and many cmd.exes are launched for all those echo line, dont by
 default execute the "info" target from "all" target on dmake makefile.mk
 to save build time. Copying "info" target also reduces diff-ness between
 the 2 makefiles. Maybe one day remove running the info target by dafault
 on a target "all" from GNUmakefile too, but not in this commit.
-consolidate the recipe lines for "info" target so less cmd.exe procs are
 launched by the make tools, unroll echo CCTYPE into both branches. For
 me with dmake, the "info" targets execution time went from 398ms to 141 ms
-there was a skip of "VC" version vs "cl.exe" version between VC 2013 aka
 VC 12 and VC 2015 aka VC 14, so at cl.exe ver 19 the skip must be
 accounted for, also starting in VC 2017, the MINOR version number started
 being relevent since MS stopped ticking up the MAJOR version number so
 take the "X" from AB.XY.CD.EF and append it to the version number, the 2nd
 number in "tokens" sets %j var to be that number, but dont look at minor
 number for older VCs since the only old "AB.10" VC compiler, which is
 VC 2003 aka 7.10 and VC 2002 aka 7.00 are treated identically and combined
 to 7.00 for perl purposes
-fixed a bug that a console without gcc and without vc in the PATH
 autodetected to a gibberish MSVC version instead of erroring to the user

5 years agoBump Time::HiRes $VERSION since its XS was changed in the previous commit
Steve Hay [Fri, 27 Jul 2018 07:40:10 +0000 (08:40 +0100)]
Bump Time::HiRes $VERSION since its XS was changed in the previous commit

5 years agoremove distros from needing ppport.h in core
Daniel Dragan [Thu, 26 Jul 2018 12:12:56 +0000 (13:12 +0100)]
remove distros from needing ppport.h in core

These changes are towards a goal of removing mkppport one day as part of
a optimization for parallel building (less deps needed before XS
extensions are built). This is a follow-on patch to the dummy ppport.h
trick in Perl #128438 ticket that had issues.

-for Time::HiRes the DEFINE() in Makefile.PL can't be be in sub init()
 because that sub isn't called on windows
-SLU has not needed ppport.h in core since commit 5e99e069f5
 aka 1.47 import from cpan
-Cwd used to be a no ppport.h since 3.25, in 3.30_02 the code (Cwd.xs) was
 deleted/broken under commit 9bc94e3dae, or changes file
 "Remove more special logic required for core perl.". Put back the Cwd.xs
 code and remove Cwd from the ppport.h list

5 years agot/porting/manifest.t - Don't strip out MANIFEST.SKIP files
Steve Hay [Wed, 25 Jul 2018 12:16:29 +0000 (13:16 +0100)]
t/porting/manifest.t - Don't strip out MANIFEST.SKIP files

The previous commit's addition of Devel-PPPort's MANIFEST.SKIP caused this
test to fail because it was stripping that file out of the list of files
tracked by git and then complaining that it wasn't in the list of files
tracked by git!

We only have two MANIFEST.SKIP files in core. They're both listed in the
MANIFEST and they're both tracked by git, so nothing special needs doing
here.

5 years agoAdd dist/Devel-PPPort/MANIFEST.SKIP to MANIFEST
Steve Hay [Wed, 25 Jul 2018 07:46:49 +0000 (08:46 +0100)]
Add dist/Devel-PPPort/MANIFEST.SKIP to MANIFEST

5 years agoRevert "Delete MANIFEST.SKIP from dist/Devel-PPPort for now"
Steve Hay [Wed, 25 Jul 2018 07:19:15 +0000 (08:19 +0100)]
Revert "Delete MANIFEST.SKIP from dist/Devel-PPPort for now"

This reverts commit 077685406080f6c6256731ba0cc7c07e8b91e160.

5 years agoremove all exported symbols from GCC win32 miniperl
Daniel Dragan [Thu, 15 Mar 2018 00:11:51 +0000 (20:11 -0400)]
remove all exported symbols from GCC win32 miniperl

Similar to commit a19baa613 and same reasoning. Makes binary smaller/more
chances for optimization but mingw linker is still much less smart than
the VC linker.

Remaining problems are that GCC miniperl.exe still links to WS2_32.dll
(winsock library) yet the win32_* socket functions have nothing calling
them.

GCC 4.9.2 i686-w64-mingw32

miniperl.exe 1660KB before this no exports commit
miniperl.exe 1584KB after this no exports commit

5 years agoDon't compile S_env_alloc() when not used
David Mitchell [Mon, 23 Jul 2018 08:15:38 +0000 (09:15 +0100)]
Don't compile S_env_alloc() when not used

RT #133360

I recently added S_env_alloc() as a helper function for
Perl_my_setenv(); but it's not needed on all platforms, so #ifdef it to
only be compiled on platforms where its needed.

Avoids a compiler warning.

5 years agoFix trivial compilation warning in Data::Dumper
Aaron Crane [Sun, 22 Jul 2018 17:10:21 +0000 (18:10 +0100)]
Fix trivial compilation warning in Data::Dumper

Apparently a declaration of a static function that's never defined can
count as an unused function.

5 years agoembed.fnc: Rmv wrong marker that a fcn has docs
Karl Williamson [Sun, 22 Jul 2018 15:28:04 +0000 (09:28 -0600)]
embed.fnc: Rmv wrong marker that a fcn has docs

This was a copy paste error.  This is a function that should not be
called directly, and isn't documented.

5 years agolib/warnings.pm: Bump version to 1.43
Karl Williamson [Sun, 22 Jul 2018 15:44:49 +0000 (09:44 -0600)]
lib/warnings.pm: Bump version to 1.43

5 years agolib/Config/Extensions.pm: Bump version to .03
Karl Williamson [Sun, 22 Jul 2018 15:44:24 +0000 (09:44 -0600)]
lib/Config/Extensions.pm: Bump version to .03

5 years ago[MERGE] Data::Dumper fixes for older Perl versions
Aaron Crane [Sun, 22 Jul 2018 12:52:58 +0000 (13:52 +0100)]
[MERGE] Data::Dumper fixes for older Perl versions

Notably, this restores deparsing support in the XS dumper.

5 years agoData::Dumper: restore XS-mode deparse support in older Perls
Aaron Crane [Sat, 21 Apr 2018 18:16:05 +0000 (20:16 +0200)]
Data::Dumper: restore XS-mode deparse support in older Perls

5 years agoData::Dumper: handle incomplete support for Unicode glob names
Aaron Crane [Sat, 21 Apr 2018 14:59:46 +0000 (16:59 +0200)]
Data::Dumper: handle incomplete support for Unicode glob names

Before version 5.16, Perl didn't have full support for Unicode in glob
names. This change allows Data::Dumper's tests to pass in Perl 5.8 through
5.14.

5 years agoData::Dumper: ensure character-classification macros use U8
Aaron Crane [Sat, 21 Apr 2018 14:58:35 +0000 (16:58 +0200)]
Data::Dumper: ensure character-classification macros use U8

This fixes some tests on older Perls.

5 years agodist/Data-Dumper/t/dumper.t: clarify some test names
Aaron Crane [Sat, 21 Apr 2018 14:47:57 +0000 (16:47 +0200)]
dist/Data-Dumper/t/dumper.t: clarify some test names

5 years agodist/Data-Dumper/t/dumper.t: add missing test name
Aaron Crane [Sat, 21 Apr 2018 14:47:36 +0000 (16:47 +0200)]
dist/Data-Dumper/t/dumper.t: add missing test name

5 years agodist/Data-Dumper/t/indent.t: avoid scalar split
Aaron Crane [Sat, 21 Apr 2018 14:41:45 +0000 (16:41 +0200)]
dist/Data-Dumper/t/indent.t: avoid scalar split

Older versions of Perl yield a warning for this usage.

5 years agoPorting/epigraphs.pod: fix a typo in an old epigraph
Aaron Crane [Sun, 22 Jul 2018 12:29:32 +0000 (13:29 +0100)]
Porting/epigraphs.pod: fix a typo in an old epigraph

5 years agoEnsure perlmodlib.pod contains all non-dual-life modules
Aaron Crane [Mon, 25 Jun 2018 14:42:33 +0000 (15:42 +0100)]
Ensure perlmodlib.pod contains all non-dual-life modules

The pod/perlmodlib.pod file is generated at build time by pod/perlmodlib.PL,
which looks at the POD of library and pragma files to find "=head1 NAME"
directives. It reads each file a paragraph at a time ($/ = ""), and considers
each individual paragraph as potentially containing POD.

However, if it finds no "=head1 NAME" entry in a module, it silently ignores
it. That's reasonable for dual-life modules — there's often a good reason
why a particular file has no POD — but for single-life modules, this could
well indicate an issue.

In particular, commit effd17dc012719d584aa712c6c7bd5dc142885b6, as part of
rearranging the contents of lib/warnings.pm, inadvertently changed the
context of its "=head1 NAME" line so that it's no longer the start of a
paragraph. This had the effect of removing warnings.pm from perlmodlib; that
gap was pointed out by pink_mist++ on IRC.

The fix for that is trivial: add a blank in the appropriate place in
regen/warnings.pl, and regen.

The change to pod/perlmodlib.PL to die on missing "=head1 NAME" lines has
also yielded a second module (Config::Extensions) that was missing from
perlmodlib for the same reason; that's also fixed in this commit.

5 years agoregen/mk_invlists.pl: Collapse unused boundary values
Karl Williamson [Sat, 21 Jul 2018 20:09:24 +0000 (14:09 -0600)]
regen/mk_invlists.pl: Collapse unused boundary values

Each Unicode property that specifies a boundary conditions, like
Word_Break, partitions all the Unicode code points into equivalence
classes.  So, for example, combining marks are placed into the Extend
class, because they are usually used to extend the previous character
and don't stand on their own.  mk_invlists.pl creates a boolean table of
all pairwise combinations of these classes, so that it knows by simple
lookup if the first character is class X and the next character is class
Y, if a break is permitted between these.

However, in some cases the answer isn't as simple as this, and other
means such as the characters in the vicinity of X and Y must be used to
disambiguate.  In these cases the table value in the cell (X,Y) isn't a
boolean, but is some other number indicating some specially crafted code
section to execute to resolve the issue.

Over the years, Unicode has tended to subdivide partitions into smaller
ones, as they've refined their algorithms.  But with Unicode 11, they
used another method and actually removed partitions.  Rather, they
retain the partitions, but no code point actually takes on the value of
an obsolete partition.

In order to not have to change the algorithm unnecessarily between
Unicode releases (who knows, they might change their minds, and
unobsolete these next time), mk_invlists has just kept the tables
around, but those cells won't ever get accessed because no code point in
the current release evaluates to them.

But that makes the tables unnecessarily large.  We can achieve the same
thing by mapping each unused equivalence class to the same value, which
we call 'unused'.  The algorithms that refer to the obsolete partitions
go through the data assigning values to the cells, but now the cells
overlap, since all obsolete classes map to the same row or column.  Thus
the data is total garbage.  But that doesn't matter, since that row or
column is never read by the data in the Unicode release the table is
constructed for.

mk_invlists also can compile older Unicode releases, and this makes
those tables smaller than before, with all unused classes in a
given release collapsed into a single row and single column of (unused)
garbage.

5 years agoregen/mk_invlists.pl: Make adjacent comment and its code
Karl Williamson [Wed, 18 Jul 2018 20:53:43 +0000 (14:53 -0600)]
regen/mk_invlists.pl: Make adjacent comment and its code

5 years agoregen/mph.pl: Add comments
Karl Williamson [Sat, 21 Jul 2018 03:34:16 +0000 (21:34 -0600)]
regen/mph.pl: Add comments

These are from http://nntp.perl.org/group/perl.perl5.porters/251395

5 years agoUse Unicode 11.0
Unicode Consortium [Fri, 20 Jul 2018 20:46:28 +0000 (14:46 -0600)]
Use Unicode 11.0

This completes the process of upgrading to Unicode 11.0.