This is a live mirror of the Perl 5 development currently hosted at
23 months agoActually fix GH #17370
Karl Williamson [Tue, 17 Dec 2019 21:59:29 +0000 (14:59 -0700)]
Actually fix GH #17370

I only added a test, but not the change in
9f16475a53933d1d9c547f871b97b3b12160cece.  The test passes except when
run under address sanitizer or valgrind.

23 months agodon't use -Werror=declaration-after-statement with C++
Tony Cook [Tue, 17 Dec 2019 00:32:40 +0000 (11:32 +1100)]
don't use -Werror=declaration-after-statement with C++

declaration after statement is normal for C++ and C++ compilers
rightly complain if we try to warn (or error) on them, so don't
try to.

fixes #17353

23 months agoPATCH: GH #17370, read beyond buffer in grok_inf_nan
Karl Williamson [Tue, 17 Dec 2019 21:23:07 +0000 (14:23 -0700)]
PATCH: GH #17370, read beyond buffer in grok_inf_nan

Like GH #17367, this was caused by a failure to check that we aren't at
the end of the buffer after advancing the ptr to it.

23 months agoNote that certain flags are documented
Karl Williamson [Tue, 17 Dec 2019 00:02:53 +0000 (17:02 -0700)]
Note that certain flags are documented

This is useful in Devel::PPPort for generating its api-info data.  That
useful feature of D:P allows someone to find out what was the first
release of Perl to have a function, macro, or flag.  And whether using
ppport.h backports it further.

I went through apidoc.pod and looked for flags that were documented but
that D:P didn't know about.  This commit adds entries for each so that
D:P can find them.

23 months agoPATCH: GH #17367 read 1 beyond end of buffer
Karl Williamson [Wed, 13 Nov 2019 22:39:15 +0000 (15:39 -0700)]
PATCH: GH #17367 read 1 beyond end of buffer

This is a bug in grok_infnan() in which in one place it failed to check
that it was reading within bounds.

23 months agoLocal variable 'o' hides a parameter of the same name.
James E Keenan [Sun, 15 Dec 2019 22:38:35 +0000 (17:38 -0500)]
Local variable 'o' hides a parameter of the same name.

This sub-optimal code has been reported by LGTM static code analysis.
There are actually two such instances very close to one another within
op.c.  This commit handles only the first of them, renaming a variable
and regularizing the indents to make the relevant scope more self-evident.

23 months agosv.h: Fix typo in pod
Karl Williamson [Tue, 17 Dec 2019 00:06:29 +0000 (17:06 -0700)]
sv.h: Fix typo in pod

23 months agoUpdate ExtUtils-MakeMaker to CPAN version 7.40
Chris 'BinGOs' Williams [Mon, 16 Dec 2019 20:36:21 +0000 (20:36 +0000)]
Update ExtUtils-MakeMaker to CPAN version 7.40


7.40    Mon 16 Dec 19:33:13 GMT 2019

    No changes since v7.39_05

7.39_05 Thu 21 Nov 11:45:13 GMT 2019

    Bug fixes:
    - Always assume that libraries are shared on AIX

7.39_04 Mon 18 Nov 14:54:46 GMT 2019

    Test Fixes:
    - Skip "merged /usr" tests on Cygwin

    QA Fixes:
    - Added cygwin testing with Github actions
    - Added macos testing with Github actions

7.39_03 Sun 17 Nov 19:53:04 GMT 2019

    Doc fixes:
    - Fix typo in link to MakeMaker
    - Link to referenced modules from MM_Cygwin maybe_command

7.39_02 Thu  7 Nov 09:33:29 GMT 2019

    Cygwin fixes:
    - Removed MM_Cygwin all_target() override

    Doc fixes:
    - Add crosslinks to various referenced documentation

7.39_01 Mon 16 Sep 07:19:37 BST 2019

    Test fixes:
    - README.pod warnings suppressed during testing
    - Don't parallise dynamic/static tests

23 months agoTick off 5.31.6, released 2019-11-20
Matthew Horsfall [Mon, 16 Dec 2019 13:56:41 +0000 (08:56 -0500)]
Tick off 5.31.6, released 2019-11-20

23 months agoharden IO's cachepropagate-tcp
Tony Cook [Thu, 12 Dec 2019 00:30:59 +0000 (11:30 +1100)]
harden IO's cachepropagate-tcp

This failed on Win32 like in the #17351 CI checks with:

../dist/if/t/if.t .................................................. ok
Can't call method "sockdomain" on an undefined value at t/cachepropagate-tcp.t line 46.
# Looks like your test exited with 9 just after 5.
../dist/IO/t/cachepropagate-tcp.t ..................................
Dubious, test returned 9 (wstat 2304, 0x900)
Failed 3/8 subtests

I suspect what happened is there was a race between the parent
accepting the connection and the child exiting and closing the

The Microsoft documentation for accept() indicates one possible
reason for failure is:

An incoming connection was indicated, but was subsequently
        terminated by the remote peer prior to accepting the call.

which I suspect happened here.

So I've:

- added a basic error check for the result of accept()
- made the child to wait for the parent to close the socket
- the parent explicitly closes the socket

23 months agotreat TAINT_get and TAINTING_get as unlikely
Tony Cook [Thu, 12 Dec 2019 05:49:11 +0000 (16:49 +1100)]
treat TAINT_get and TAINTING_get as unlikely

While testing #17359 it appeared that inlining of SvTRUE was being
suppressed (indicated by -Winline) by being used in the statement:

  if (TAINT_get || SvTRUE(error)) {

but making TAINT_get unlikely allowed it to be inlined.

I expect even in a program that does use taint the vast majority
of data will be untainted, so I think it's safe to make TAINT_get

TAINTING_get is a harder case, but it's only used in a relatively
much smaller number of cases, and I expect most runs of a system
perl will have neither -T nor -t.

23 months agoRevert "Move PL_check to the interp vars to fix threading issues"
Tony Cook [Sun, 15 Dec 2019 21:56:52 +0000 (08:56 +1100)]
Revert "Move PL_check to the interp vars to fix threading issues"

and the associated commits, at least until a way to make
wrap_op_checker() work is available.

23 months agoUpdate release schedule
Sawyer X [Sun, 15 Dec 2019 20:39:01 +0000 (22:39 +0200)]
Update release schedule

23 months agot/re/pat.t: White-space only
Karl Williamson [Thu, 5 Dec 2019 20:16:22 +0000 (13:16 -0700)]
t/re/pat.t: White-space only

23 months agot/re/pat.t: Fix skip count for limited mem platforms
Karl Williamson [Fri, 6 Dec 2019 00:03:43 +0000 (17:03 -0700)]
t/re/pat.t: Fix skip count for limited mem platforms

And rearrange so is easier to see the correct value.

23 months agot/re/pat.t: Skip tests that don't work on EBCDIC
Karl Williamson [Wed, 4 Dec 2019 20:45:24 +0000 (13:45 -0700)]
t/re/pat.t: Skip tests that don't work on EBCDIC

These are fuzzer generated, and don't translate well to EBCDIC

23 months agoperlreref: Fix typos
Karl Williamson [Sat, 14 Dec 2019 04:36:49 +0000 (21:36 -0700)]
perlreref: Fix typos

Pointed out in GH #17363

23 months agoavoid identical stack traces
David Mitchell [Fri, 13 Dec 2019 13:48:25 +0000 (13:48 +0000)]
avoid identical stack traces

GH #15109

The output of caller() (e.g. as produced by carp::Confess) produces
multiple identical outputs when within a nested use/require. This is
because at the time of calling the 'BEGIN { require ... }', PL_curcop is
set to &PL_compiling, which is a fixed buffer within the interpreter,
whose individual file and line fields are saved and restored when doing
a new require/eval. This means that within the innermost require,
PL_compiling has file:lineno of the innermost source file, and multiple
saved PL_curcop values in the context stack frames all point to the same
&PL_copmpiling.  So all levels of the stack trace appear to come from the
innermost file.

This commit fixes this (after a fashion) by, at the start of calling a
BEGIN, making PL_curcop point to a temporary copy of PL_compiling

This is all a bit of a hack.

23 months agoEnable Cygwin smoking on all kinds of branches
Max Maischein [Fri, 13 Dec 2019 18:05:47 +0000 (19:05 +0100)]
Enable Cygwin smoking on all kinds of branches

23 months agoRemove bad "git switch" command
Max Maischein [Fri, 13 Dec 2019 18:05:35 +0000 (19:05 +0100)]
Remove bad "git switch" command

"git switch" isn't supported by Github git anyway

23 months agoIO: update the ChangeLog after a (trial) release of IO to CPAN
Ricardo Signes [Thu, 12 Dec 2019 18:23:34 +0000 (13:23 -0500)]
IO: update the ChangeLog after a (trial) release of IO to CPAN

23 months agoperldelta for a559786348e0
Chris 'BinGOs' Williams [Thu, 12 Dec 2019 01:03:52 +0000 (01:03 +0000)]
perldelta for a559786348e0

23 months agoperldelta for e6c7056ba6f1
Tony Cook [Thu, 12 Dec 2019 00:40:14 +0000 (11:40 +1100)]
perldelta for e6c7056ba6f1

23 months agoun-TODO pl_check.t and remove io/handle.t
Tony Cook [Mon, 9 Dec 2019 00:22:25 +0000 (11:22 +1100)]
un-TODO pl_check.t and remove io/handle.t

io/handle.t depends on IO::Handle using the PL_check hack, but
Nicholas's back portable fix no longer uses that

Fix threaded perl detection, thanks to James Keenan.

23 months agoMove PL_check to the interp vars to fix threading issues
Stefan Seifert [Wed, 30 Oct 2019 15:23:01 +0000 (16:23 +0100)]
Move PL_check to the interp vars to fix threading issues

Fixes issue #14816

23 months agoprovide a test for the PL_check mis-behaviour
Tony Cook [Sun, 8 Dec 2019 23:51:19 +0000 (10:51 +1100)]
provide a test for the PL_check mis-behaviour

Nicholas Clark's fix for IO makes the test in niner's patch
meaningless, so test it separately.

23 months agoNote that G_RETHROW is documented
Karl Williamson [Wed, 11 Dec 2019 18:37:58 +0000 (11:37 -0700)]
Note that G_RETHROW is documented

This is for Devel::PPPort.

23 months agoFix where we look for the Sun/Solaris/Developer Studio compiler
Chris 'BinGOs' Williams [Wed, 11 Dec 2019 18:11:15 +0000 (18:11 +0000)]
Fix where we look for the Sun/Solaris/Developer Studio compiler

The movable feast that is the sun/solaris/developer compiler

23 months agoperlpacktut: fix broken url
Ask Bjørn Hansen [Wed, 11 Dec 2019 09:12:54 +0000 (01:12 -0800)]
perlpacktut: fix broken url

This is my best guess as for what it's meant to point to.

Reported in

23 months agoregexec.c: Clarify comment
Karl Williamson [Tue, 10 Dec 2019 03:28:24 +0000 (20:28 -0700)]
regexec.c: Clarify comment

23 months agoRmv leading underscore from macro name
Karl Williamson [Tue, 10 Dec 2019 03:27:02 +0000 (20:27 -0700)]
Rmv leading underscore from macro name

These are illegal in C, but we have plenty of them around; I happened
to be looking at this function, and decided to fix it.  Note that only
the macro name is illegal; the function was fine, but to change the
macro name means changing the function one.

23 months agoOnly allow punct delimiter for regex subpattern
Karl Williamson [Tue, 10 Dec 2019 02:37:28 +0000 (19:37 -0700)]
Only allow punct delimiter for regex subpattern

The experimental feature that allows wildcard subpatterns in finding
Unicode properties, is supposed to only allow ASCII punctuation for
delimitters.  But if you preceded the delimitter by a backslash, the
check was skipped.  This commit fixes that.

It may be that we will eventually want to loosen the restriction and
allow a wider range of delimiters.  But until we have valid use-cases
that would push us in that direction, I don't want to get into
supporting stuff that we might later regret, such as invisible
characters for delimitters.  This feature is not really required for
programs to work, so I don't view it as necessary to be as general as

23 months agoClarify in documentation that sv_isa_sv does not invoke magic
Paul "LeoNerd" Evans [Wed, 11 Dec 2019 12:05:06 +0000 (12:05 +0000)]
Clarify in documentation that sv_isa_sv does not invoke magic

23 months agoAPItest.xs: Increase version
Pali [Tue, 10 Dec 2019 16:48:10 +0000 (17:48 +0100)]
APItest.xs: Increase version

23 months agoAPItest.xs: Fix compile warning: format ‘%d’ expects argument of type ‘int’, but...
Pali [Tue, 10 Dec 2019 14:26:19 +0000 (15:26 +0100)]
APItest.xs: Fix compile warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘line_t {aka long unsigned int}’

Use "%u" format modifier instead of "%d" as line_t is unsigned. Type line_t
is of U32 type and therefore casting it to unsigned int is safe on most

23 months agoEnable smoke-testing on all branches
Max Maischein [Tue, 10 Dec 2019 17:29:39 +0000 (18:29 +0100)]
Enable smoke-testing on all branches

Previously, branch names that contain a "/" (as in "smoke-me/Corion-foo")
were skipped

23 months agoFix superfluous article and comma splice
Felipe Gasper [Tue, 10 Dec 2019 15:08:11 +0000 (10:08 -0500)]
Fix superfluous article and comma splice

23 months agoAdd the `isa` operator
Paul "LeoNerd" Evans [Wed, 23 Oct 2019 18:00:38 +0000 (19:00 +0100)]
Add the `isa` operator

Adds a new infix operator named `isa`, with the semantics that

  $x isa SomeClass

is true if and only if `$x` is a blessed object reference that is either
`SomeClass` directly, or includes the class somewhere in its @ISA
hierarchy. It is false without warning or error for non-references or
non-blessed references.

This operator respects `->isa` method overloading, and is intended to
replace boilerplate code such as

  use Scalar::Util 'blessed';

  blessed($x) and $x->isa("SomeClass")

23 months agoregcomp.c: Make some refcnt changes NN
Karl Williamson [Sun, 8 Dec 2019 19:25:04 +0000 (12:25 -0700)]
regcomp.c: Make some refcnt changes NN

to save a few cycles

23 months agore/regexp_unicode_prop.t: Add comment
Karl Williamson [Sun, 8 Dec 2019 19:19:08 +0000 (12:19 -0700)]
re/regexp_unicode_prop.t: Add comment

23 months agoregcomp.c: White-space only
Karl Williamson [Sun, 8 Dec 2019 19:18:11 +0000 (12:18 -0700)]
regcomp.c: White-space only

Indent after the previous commit introduced a new block around this

23 months agoPATCH GH #17025 \p{user-defined} overrides official Unicode
Karl Williamson [Sun, 8 Dec 2019 19:16:29 +0000 (12:16 -0700)]
PATCH GH #17025 \p{user-defined} overrides official Unicode

Prior to this patch, they only sometimes overrode.

23 months agoregcomp.c: Replace a loop with strcspn()
Karl Williamson [Sat, 7 Dec 2019 23:08:15 +0000 (16:08 -0700)]
regcomp.c: Replace a loop with strcspn()

A later commit will add a terminating character for the span, so we use
this function instead of memchr.

23 months agoCorrect typo: the warning has 'statement' in singular
James E Keenan [Mon, 9 Dec 2019 00:27:39 +0000 (19:27 -0500)]
Correct typo:  the warning has 'statement' in singular

23 months agofix Github URL in message posted to #p5p-qa
Tony Cook [Tue, 3 Dec 2019 22:27:49 +0000 (09:27 +1100)]
fix Github URL in message posted to #p5p-qa

the repository key is deprecated, and we now produce the correct
full URL, so the comment is meaningless

23 months agore-work travis cases to test more variety
Tony Cook [Tue, 3 Dec 2019 21:50:26 +0000 (08:50 +1100)]
re-work travis cases to test more variety

I expect a -DPERL_GLOBAL_STRUCT_PRIVATE build to catch most
-DPERL_GLOBAL_STRUCT issues, and these are very rarely used options
anyway, so eliminate the second.

Expand the usesitecustomize case to also check long doubles and
an English Unicode locale.

Replace the removed case to check quadmath, cbacktrace and a non-English
Unicode locale.

23 months agoregcomp.c: Replace a loop with memchr
Karl Williamson [Sat, 7 Dec 2019 22:39:18 +0000 (15:39 -0700)]
regcomp.c: Replace a loop with memchr

23 months agoregcomp.c: After AvARRAY(), don't use av_store
Karl Williamson [Thu, 27 Jun 2019 15:49:33 +0000 (09:49 -0600)]
regcomp.c: After AvARRAY(), don't use av_store

We are manimpulating the array directly here, so don't revert to going
through the regular interface, as not all the hand-offs have been done

23 months agoregcomp.c: White space only
Karl Williamson [Thu, 27 Jun 2019 15:45:52 +0000 (09:45 -0600)]
regcomp.c: White space only

23 months agoregcomp.c: Use inRANGE macro
Karl Williamson [Thu, 3 Oct 2019 03:19:22 +0000 (21:19 -0600)]
regcomp.c: Use inRANGE macro

This is faster and clearer

23 months agot/op/die.t: 'use utf8'
Karl Williamson [Thu, 3 Oct 2019 03:09:24 +0000 (21:09 -0600)]
t/op/die.t: 'use utf8'

This file is encoded in UTF-8, even though it didn't say it was.

23 months agohandy.h: Fix typo in little-used macro
Karl Williamson [Wed, 4 Dec 2019 20:46:35 +0000 (13:46 -0700)]
handy.h: Fix typo in little-used macro

This only affected an EBCDIC build where no other tools are around.
This is no longer really used.  It was used to bootstrap EBCDIC when
first porting to it (after the 5.8 series).

23 months agoext/XS-APItest/t/ Fix for EBCDIC
Karl Williamson [Sat, 7 Dec 2019 18:31:48 +0000 (11:31 -0700)]
ext/XS-APItest/t/ Fix for EBCDIC

There were some flaws here that showed up in EBCDIC testing.

23 months agoext/XS-APItest/t/ Don't recalculate value
Karl Williamson [Sat, 7 Dec 2019 18:27:23 +0000 (11:27 -0700)]
ext/XS-APItest/t/ Don't recalculate value

This value is already available in a different variable

23 months agoext/XS-APItest/t/ Fix comment typos
Karl Williamson [Sat, 7 Dec 2019 18:21:52 +0000 (11:21 -0700)]
ext/XS-APItest/t/ Fix comment typos

23 months agoregen/ Fix bug in decoding some high code points
Karl Williamson [Wed, 4 Dec 2019 20:50:12 +0000 (13:50 -0700)]
regen/ Fix bug in decoding some high code points

This affected non-allocated or little-used high code points.

23 months agoregen/ Comments only: typo, add column headings
Karl Williamson [Sat, 7 Dec 2019 17:38:06 +0000 (10:38 -0700)]
regen/ Comments only: typo, add column headings

23 months agoFix UTF8_IS_START on EBCDIC
Karl Williamson [Thu, 5 Dec 2019 19:26:21 +0000 (12:26 -0700)]

23 months agoUpdate IO-Compress to CPAN version 2.093
Chris 'BinGOs' Williams [Sat, 7 Dec 2019 20:10:12 +0000 (20:10 +0000)]
Update IO-Compress to CPAN version 2.093

23 months agoUpdate Compress-Raw-Bzip2 to CPAN version 2.093
Chris 'BinGOs' Williams [Sat, 7 Dec 2019 20:09:35 +0000 (20:09 +0000)]
Update Compress-Raw-Bzip2 to CPAN version 2.093

23 months agoUpdate Compress-Raw-Zlib to CPAN version 2.093
Chris 'BinGOs' Williams [Sat, 7 Dec 2019 20:08:41 +0000 (20:08 +0000)]
Update Compress-Raw-Zlib to CPAN version 2.093

23 months agoUpdate IO-Compress to CPAN version 2.092
Chris 'BinGOs' Williams [Fri, 6 Dec 2019 14:44:28 +0000 (14:44 +0000)]
Update IO-Compress to CPAN version 2.092


  2.092 4 December 2019

      * No changes

23 months agoUpdate Compress-Raw-Bzip2 to CPAN version 2.092
Chris 'BinGOs' Williams [Fri, 6 Dec 2019 14:42:54 +0000 (14:42 +0000)]
Update Compress-Raw-Bzip2 to CPAN version 2.092


  2.092 4 December 2019

      * No changes

23 months agoUpdate Compress-Raw-Zlib to CPAN version 2.092
Chris 'BinGOs' Williams [Fri, 6 Dec 2019 14:41:39 +0000 (14:41 +0000)]
Update Compress-Raw-Zlib to CPAN version 2.092


  2.092 4 December 2019

      * No Changes

23 months agoLocal variable 'last' hides a parameter of the same name
James E Keenan [Tue, 3 Dec 2019 14:16:07 +0000 (09:16 -0500)]
Local variable 'last' hides a parameter of the same name

LGTM static analysis identified a situation where it recommended
renaming a variable.


Better variable name per khw review

23 months agoUpdate link to Birrell's threads paper
brian d foy [Thu, 5 Dec 2019 18:49:36 +0000 (13:49 -0500)]
Update link to Birrell's threads paper

23 months agoLocal variable 'imode' hides a parameter of the same name
James E Keenan [Tue, 3 Dec 2019 02:50:17 +0000 (21:50 -0500)]
Local variable 'imode' hides a parameter of the same name

LGTM static code analysis of Perl 5 source code issued this
recommendation.  Implement fix.

23 months agoperldelta for 5e91ca38cafa2b006f7671e941287e05d31c2d97
James E Keenan [Thu, 5 Dec 2019 02:58:47 +0000 (21:58 -0500)]
perldelta for 5e91ca38cafa2b006f7671e941287e05d31c2d97

23 months agoperldelta for 41fb88e3240, b34c1a7ee25
Tony Cook [Thu, 5 Dec 2019 00:06:08 +0000 (11:06 +1100)]
perldelta for 41fb88e3240b34c1a7ee25

23 months agoupdates to $^H{feature_validname} now update cop_features
Tony Cook [Mon, 2 Dec 2019 04:50:49 +0000 (15:50 +1100)]
updates to $^H{feature_validname} now update cop_features

This removes $^{FEATURE_BITS}, since it's no longer needed.

23 months agotests for the faster features problem sprout pointed out
Tony Cook [Mon, 2 Dec 2019 04:22:48 +0000 (15:22 +1100)]
tests for the faster features problem sprout pointed out

23 months agoCorrect inconsistent version numbers in
James E Keenan [Wed, 4 Dec 2019 15:05:35 +0000 (10:05 -0500)]
Correct inconsistent version numbers in

Per commit message by David Mitchell in 142a37fd (Jul 24 2013), the code
changes affecting the performance of $`, $&, $' weren't fully enabled
until 5.20.  Hence, the documentation should caution for 5.18 and

As reported by peterdd++ in

23 months agoperldelta for 62fc08893a06fdb5633e7656e3c783d705682fd1
James E Keenan [Wed, 4 Dec 2019 14:59:38 +0000 (09:59 -0500)]
perldelta for 62fc08893a06fdb5633e7656e3c783d705682fd1

23 months agoUpdate Test-Simple to CPAN version 1.302170
Chad Granum [Wed, 4 Dec 2019 14:36:07 +0000 (09:36 -0500)]
Update Test-Simple to CPAN version 1.302170

From Changes:

    1.302170  2019-12-02 13:25:48-08:00 America/Los_Angeles

    - Fix unwanted END phase event (#840)

23 months agoskip code that requires dynamic loading and minitest works
Tony Cook [Mon, 18 Nov 2019 03:34:13 +0000 (14:34 +1100)]
skip code that requires dynamic loading and minitest works

23 months agofix skip for loop over locales
Tony Cook [Mon, 18 Nov 2019 03:33:31 +0000 (14:33 +1100)]
fix skip for loop over locales

Any skips inside this loop was skipping over the entire loop,
not just the current iteration, from the conditions tested in
the loop this seemed incorrect (besides messing up the test count.)

23 months agoPOSIX isn't loadable in miniperl
Tony Cook [Sun, 17 Nov 2019 21:29:47 +0000 (08:29 +1100)]
POSIX isn't loadable in miniperl

23 months agomove the implementation of %-, %+ into core
Tony Cook [Wed, 13 Nov 2019 21:02:34 +0000 (08:02 +1100)]
move the implementation of %-, %+ into core

Previousl this could cause problems during minitest.

Fixes #17293

23 months agoRegenerate Configure and friends after metaconfig changes
Karl Williamson [Mon, 2 Dec 2019 16:52:14 +0000 (09:52 -0700)]
Regenerate Configure and friends after metaconfig changes

A probe for wcrtomb() and one for attribute always inline have been
added, and the ones for:
1) checking if there is a C backtrace facility; and
2) character data alignedness
have been revised

23 months agometaconfig.h: Add entry for wcrtomb()
Karl Williamson [Mon, 2 Dec 2019 15:42:20 +0000 (08:42 -0700)]
metaconfig.h: Add entry for wcrtomb()

23 months agometaconfig.h: Rmv temporary entries
Karl Williamson [Mon, 2 Dec 2019 15:41:43 +0000 (08:41 -0700)]
metaconfig.h: Rmv temporary entries

These are no longer needed

23 months agoUpdate documentation for UTF8f
Pali [Tue, 3 Dec 2019 09:53:03 +0000 (10:53 +0100)]
Update documentation for UTF8f

23 months agoregcomp.c: Silence compiler warning
Karl Williamson [Mon, 2 Dec 2019 17:05:38 +0000 (10:05 -0700)]
regcomp.c: Silence compiler warning

23 months agoStorable: Fix compile warning: comparison between signed and unsigned integer expressions
Pali [Mon, 2 Dec 2019 15:09:46 +0000 (16:09 +0100)]
Storable: Fix compile warning: comparison between signed and unsigned integer expressions

gcc -m32 -c   -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -Wall -Werror=declaration-after-statement -Werror=pointer-arith -Wextra -Wc++-compat -Wwrite-strings -O2   -DVERSION=\"3.18\" -DXS_VERSION=\"3.18\" -fPIC "-I../.."   Storable.c
Storable.xs: In function ‘retrieve_lvstring’:
Storable.xs:1238:46: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         else if (PerlIO_read(cxt->fio, x, y) != y) {            \
Storable.xs:1238:46: note: in definition of macro ‘SAFEPVREAD’
         else if (PerlIO_read(cxt->fio, x, y) != y) {            \

23 months agoStorable: Fix compile warning: format ‘%d’ expects argument of type ‘int’, but argume...
Pali [Mon, 2 Dec 2019 15:09:43 +0000 (16:09 +0100)]
Storable: Fix compile warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘I32 {aka long int}’

gcc -m32 -c   -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -Wall -Werror=declaration-after-statement -Werror=pointer-arith -Wextra -Wc++-compat -Wwrite-strings -O2   -DVERSION=\"3.18\" -DXS_VERSION=\"3.18\" -fPIC "-I../.."   Storable.c
Storable.xs: In function ‘get_regexp’:
Storable.xs:3446:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘I32 {aka long int}’ [-Wformat=]
       CROAK(("re::regexp_pattern returned only %d results", count));
Storable.xs:583:55: note: in definition of macro ‘CROAK’
 #define CROAK(x) STMT_START { cxt->s_dirty = 1; croak x; } STMT_END
Storable.xs: In function ‘retrieve_regexp’:
Storable.xs:6867:16: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘I32 {aka long int}’ [-Wformat=]
         CROAK(("Bad count %d calling _make_re", count));
Storable.xs:583:55: note: in definition of macro ‘CROAK’
 #define CROAK(x) STMT_START { cxt->s_dirty = 1; croak x; } STMT_END

23 months agolocale.c: Use proper #ifdef to enable behavior
Karl Williamson [Thu, 28 Nov 2019 02:18:13 +0000 (19:18 -0700)]
locale.c: Use proper #ifdef to enable behavior

This changes to use USE_POSIX_2008_LOCALE instead of
HAS_POSIX_2008_LOCALE.  Rarely do they differ, but someone may choose to
configure their installation to not use these more modern functions,
even if available, perhaps because they're buggy on that system.

23 months agolocale.c white space only
Karl Williamson [Wed, 30 Jan 2019 16:56:15 +0000 (09:56 -0700)]
locale.c white space only

23 months agoPATCH: GH #17081: Workaround glibc bug with LC_MESSAGES
Karl Williamson [Thu, 28 Nov 2019 02:15:11 +0000 (19:15 -0700)]
PATCH: GH #17081: Workaround glibc bug with LC_MESSAGES

Please see the ticket for a full explanation.  This bug has been
submitted to glibc, without any real action forthcoming so far.

This invalidates the message cache each time the locale of LC_MESSAGES
is changed, as glibc should be doing this when uselocale changes that,
but glibc fails to do so.

This patch is an extension to the one submitted by Niko Tyni++.

I don't know how to test it, since a test would rely on several
different locales in different languages being available, and that
depends on what's installed on the platform.  I suppose that one could
go through the available locales, and try to find three with different
wording for the same message.  Doing so however would trigger the bug,
and at the end, if we didn't get three that differed, we wouldn't know
we wouldn't know if it is because of the bug, or that they just didn't
exist on the system.

However, below is a perl program that demonstrated the patch worked.
You could adjust it to the available locales.  The buggy code shows the
same text for all locales.  The fixed shows three different languages.

use strict;

use Locale::gettext;
use POSIX;

$ENV{LANG} = 'C.UTF-8';

for my $lang (qw(fi_FI fr_FR en_US)) {
    $ENV{LANGUAGE} = $lang;
    setlocale(LC_MESSAGES, '');
    my $d = Locale::gettext->domain("bash");
    print $d->get('syntax error'), "\n";

23 months Catch more errors
Karl Williamson [Sat, 30 Nov 2019 15:20:54 +0000 (08:20 -0700)] Catch more errors

The previous commit fixed an error in an =for apidoc line.  This commit
fixes to catch bugs like it, and also that there aren't
multiple places that document the same function.  This necessitated a
way to note that sample documentation wasn't the real stuff.

23 months agoFix wrong apidoc line
Karl Williamson [Sat, 30 Nov 2019 15:11:19 +0000 (08:11 -0700)]
Fix wrong apidoc line

23 months agoWe don't need to switch branches in git at all
Max Maischein [Tue, 26 Nov 2019 20:51:48 +0000 (21:51 +0100)]
We don't need to switch branches in git at all

We can directly determine the (authors of) the commits
in a pull request by using the latest branch-off point
between bleadperl and the pull request branch and the
SHA that Github gives us.

23 months agoRemove -Dissymlink='test -h'
Max Maischein [Tue, 26 Nov 2019 18:43:31 +0000 (19:43 +0100)]
Remove -Dissymlink='test -h'

This is a vestige of previously failed attempts. The previous attempts
failed due to non-Cygwin test.exe being in $ENV{PATH}.

23 months agoperlguts: Add missing '=for apidoc' lines
Karl Williamson [Fri, 29 Nov 2019 14:34:15 +0000 (07:34 -0700)]
perlguts: Add missing '=for apidoc' lines

Spotted by Pali++

2 years agoPOSIX/t/time.t: Reset LC_CTYPE to C
Karl Williamson [Thu, 28 Nov 2019 05:32:53 +0000 (22:32 -0700)]
POSIX/t/time.t: Reset LC_CTYPE to C

The C standard says about the format in strftime(): "The format shall be
a multibyte character sequence, beginning and ending in its initial
shift state"

Tony Cook and I interpret that as meaning that to be sure, not only does
LC_TIME have to be reset, but LC_CTYPE to account for all possible
variations in these tests.

2 years agot/ Silence 'undef' warning
Karl Williamson [Thu, 28 Nov 2019 05:30:57 +0000 (22:30 -0700)]
t/ Silence 'undef' warning

2 years agoregcomp.c: Silence (stupid) compiler warning
Karl Williamson [Wed, 27 Nov 2019 04:19:56 +0000 (21:19 -0700)]
regcomp.c: Silence (stupid) compiler warning

This can't really happen, but some compilers don't realize it.

2 years agoMove data for PL_InBitmap to charclass_invlists.h
Karl Williamson [Mon, 25 Nov 2019 04:21:39 +0000 (21:21 -0700)]
Move data for PL_InBitmap to charclass_invlists.h

This makes it consistent with the other inversion lists for this sort of
thing, and finishes the fix for GH #17154

2 years agoMove regex global variables to interpreter level
Karl Williamson [Mon, 25 Nov 2019 03:48:54 +0000 (20:48 -0700)]
Move regex global variables to interpreter level

This is part of fixing gh #17154

This scenario from the ticket
shows why this fix is necessary:

    main interpreter initializes PL_AboveLatin1 to an SV it owns

    loads threads::lite and creates a new thread/interpreter which
    initializes PL_AboveLatin1 to a SV owned by the new interpreter

    threads::lite child interpreter finishes, freeing all of its SVs,
    PL_AboveLatin1 is now invalid

    main interpreter uses a regexp that relies on PL_AboveLatin1, dies

By making these interpreter level variables, this is avoided.  There is
extra copying, but it is just the SV headers, as the real data is kept
as static C arrays.

2 years agoUpdate perlpolicy to reference GitHub issue tracker
Dan Book [Wed, 27 Nov 2019 00:12:33 +0000 (19:12 -0500)]
Update perlpolicy to reference GitHub issue tracker

2 years agoConvert issue links from to GitHub
Dan Book [Wed, 27 Nov 2019 00:04:57 +0000 (19:04 -0500)]
Convert issue links from to GitHub