This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Karl Williamson [Tue, 5 Dec 2017 20:39:27 +0000 (13:39 -0700)]
Allow %j on non-C99 platforms
Now that intmax_t is emulated, the %j format is usable on platforms that
aren't C99.
Karl Williamson [Tue, 5 Dec 2017 20:12:48 +0000 (13:12 -0700)]
Emulate some C99 macros and typedefs
On systems that don't have them, this emulates
U?INT(16|32)_C
U?INTMAX_C
and the typedefs
u?intmax_t
Since, these are typedefs that can't be tested for if they exist, this
creates PERL_U?INTMAX_T typedefs instead, setting them to the standard
values in stdint.h if it is available.
In addition, it moves the pre-existing emulation of U?INT64_C from
handy.h to perl.h. This is because there was duplicate-ish logic in the
two files, and the handy.h version appears to be better thought out.
It converts the couple of places in core that were using the other
deleted logic to instead use the C99 names.
Karl Williamson [Fri, 8 Dec 2017 17:38:24 +0000 (10:38 -0700)]
inline.h: White space only
Add indentation to account for block added in the previous commit around
this code.
Karl Williamson [Fri, 8 Dec 2017 17:20:24 +0000 (10:20 -0700)]
is_utf8_invariant_string(): small speed optimization
By pulling a test out of a while loop condition and doing it before the
while starts, we don't increase the number of conditionals; instead we
avoid doing the conditional each time through, and also skip
some conditionals for strings shorter than a word.
Craig A. Berry [Fri, 8 Dec 2017 20:48:59 +0000 (14:48 -0600)]
Fix WIDEST_UTYPE in Devel::PPPort.
It was redefining this even when it had already been defined, and
because it was using HAS_QUAD to determine whether 64-bit ints were
available, and HAS_QUAD is undef'd in perl.h when PERL_CORE is not
defined, it was as likely as not redefining it to a 32-bit value
even when 64-bit integers are available.
So only define it if it doesn't exist and when we do define it,
make it depend on QUADKIND rather than HAS_QUAD.
Follow-up to
de9e2639368.
Karl Williamson [Fri, 8 Dec 2017 14:27:13 +0000 (07:27 -0700)]
PATCH: [perl #132548] regcomp.c Fix memory leak
Aaron Crane [Fri, 8 Dec 2017 10:17:30 +0000 (10:17 +0000)]
RT#132545: memory leak in S_init_main_stash()
Yves Orton [Fri, 8 Dec 2017 10:00:57 +0000 (11:00 +0100)]
add comment (to test pushing)
Yves Orton [Fri, 8 Dec 2017 09:56:05 +0000 (10:56 +0100)]
switch from _qq to _q in t/re/reg_mesg.t
we want the string as unescaped as is reasonable, as we want to paste
them into perldiag directly.
Karl Williamson [Fri, 8 Dec 2017 01:09:15 +0000 (18:09 -0700)]
handy.h: Fix definition of WIDEST_UTYPE for non-core
Because HAS_QUAD is not defined outside the perl core, this macro was
not getting defined properly for 64-bit systems. This means, for
example, that someone using this to cast could end up with the wrong
answer. For example isASCII(2**32) would yield true, because the high
bit would get dropped by the cast, making the value appear to be zero.
This unfortunately creates a warning message in the compile that
WIDEST_UTYPE is redefined, as the definition of that is defective in
PPPort. It should only define it if it wasn't previously defined, and
it is wrongly using the 32 bit version. This is added impetus to get
PPPort fixed
Karl Williamson [Fri, 8 Dec 2017 00:52:52 +0000 (17:52 -0700)]
handy.h: Make U64, I64 available outside core
The ones corresponding to shorter sizes, like I32, are available
everywhere. There is no reason to restrict just the 64 variety.
This fixes the bug in the definition for INT64_C and UINT64_C which
caused these to not be defined outside core on some platforms, such as
Windows.
See commit
3edba68397e487b39cca6e7fc0b75ab4a2f6a341 for more
explanation
Karl Williamson [Thu, 7 Dec 2017 04:55:21 +0000 (21:55 -0700)]
utf8_length() is not a pure function
Because it can output warnings.
Karl Williamson [Fri, 8 Dec 2017 00:45:23 +0000 (17:45 -0700)]
APItest/t/utf8.t: Clarify a couple of test names
Craig A. Berry [Fri, 8 Dec 2017 01:08:22 +0000 (19:08 -0600)]
Avoid integer overflow with 32-bit ints in hexfp.t.
Zefram [Fri, 8 Dec 2017 00:11:59 +0000 (00:11 +0000)]
delete duplicate _qq from test
Commit
af05e4c0b428a803fcdb60c956b1da7ff8a95926 added a _qq() sub
to t/re/reg_mesg.t that duplicates both the intent and the name of
t/test.pl's _qq(), causing a redefinition warning. Remove the new _qq(),
because t/test.pl's version is better.
Zefram [Fri, 8 Dec 2017 00:03:16 +0000 (00:03 +0000)]
assert min identifier length in S_pending_ident()
Yves Orton [Mon, 26 Jun 2017 11:19:55 +0000 (13:19 +0200)]
fix #131649 - extended charclass can trigger assert
The extended charclass parser makes some assumptions during the
first pass which are only true on well structured input, and it
does not properly catch various errors. later on the code assumes
that things the first pass will let through are valid, when in
fact they should trigger errors.
Yves Orton [Sun, 3 Dec 2017 11:51:50 +0000 (12:51 +0100)]
Avoid like in t/re/reg_mesg.t
Rolling our a own a bit allows us to produce more helpful diagnostics.
Yves Orton [Sun, 3 Dec 2017 11:52:27 +0000 (12:52 +0100)]
in capture_warnings() we need to properly localize Level
otherwise we dont get the right line number back from calls to
like or ok() called from within the callback.
Yves Orton [Sun, 25 Jun 2017 20:31:10 +0000 (22:31 +0200)]
regcomp.c: handle_regex_sets() - add DEBUG_PARSE and fixup 'depth' logic
'depth' is used to track the recursion depth during compilation,
and is used by things like DEBUG_PARSE() to show the compilation
process.
handle_regex_sets() was using its own 'depth' for two different purposes,
which is quite confusing.
At the same time, when we call handle_regex_sets() from reg() it is
important to increment 'depth'.
Tony Cook [Mon, 14 Aug 2017 05:10:22 +0000 (15:10 +1000)]
prevent integer overflow when compiling a regexp
Fixes [perl #131893].
Zefram [Wed, 6 Dec 2017 18:53:16 +0000 (18:53 +0000)]
handle null op_next in stacked filetests
When a filetest op returns false, it skips past following ops that
are stacked filetests. The code to do this was assuming that op_next
would always be non-null, which is not always the case, for example in
a sort comparator. Allow for it to be null. Fixes [perl #129347].
Zefram [Wed, 6 Dec 2017 17:41:59 +0000 (17:41 +0000)]
fix oct/bin fp fractions in non-HEXFP_UQUAD builds
The code for binaryish floating point literals, on builds where
we're not confident of being able to fit a significand into an
integer type, had built-in knowledge that the radix is 16, after
the radix point. This gave erroneous values for octal and binary
literals on those builds. This was shown up by the tests added in
commit
58be57636a42d6c6fd404c48c4e1cb87870182df. Correct it to use the
actual radix.
Zefram [Wed, 6 Dec 2017 17:15:29 +0000 (17:15 +0000)]
clarify "bless" doc
A couple of points came out of discussion on [perl #124428] that are
worthy of explication.
Dagfinn Ilmari Mannsåker [Wed, 6 Dec 2017 17:17:44 +0000 (17:17 +0000)]
Let 'skip' do the skipping in op/hexfp.t
No need for an if/else when skip already bails out of the block.
Dagfinn Ilmari Mannsåker [Wed, 6 Dec 2017 17:15:26 +0000 (17:15 +0000)]
Fix skip count for 64-bit NV-specific tests
Zefram [Wed, 6 Dec 2017 16:28:18 +0000 (16:28 +0000)]
document hostname(@args) deprecation
Passing arguments to Sys::Hostname::hostname() is already deprecated.
Note the deprecation's agreed removal version of Perl 5.32. Also document
it in perldeprecation.pod. [perl #124349]
Zefram [Wed, 6 Dec 2017 16:17:27 +0000 (16:17 +0000)]
fix a =head level in perldeprecation.pod
Ævar Arnfjörð Bjarmason [Wed, 6 Dec 2017 13:21:01 +0000 (13:21 +0000)]
pod: start referring to 5.6 and pre-5.6 as "ancient" instead of just "old"
5.10 and 5.8 are old, 5.6 is ancient archaeology you're very unlikely
to run into, but the casual reader may not know that, add the extra
emphasis in case someone's mistaken about needing to worry about this
for anything more than historical trivia.
Ævar Arnfjörð Bjarmason [Wed, 6 Dec 2017 13:53:45 +0000 (13:53 +0000)]
perlfunc: re-flow docs amended in an earlier commit
There's no wording changes here, just re-flowing this so "An" isn't
left like that on a short line of its own.
Ævar Arnfjörð Bjarmason [Wed, 6 Dec 2017 12:41:58 +0000 (12:41 +0000)]
pod/perlfunc: stop recommending older syntax supported by 5.6.*
Stop recommending the more verbose version syntax supported by 5.6.*,
as noted in the docs 5.8.0 is now old enough to drink in some parts of
the world, so we can switch this around to recommending the version
literals first, and then explaining in passing why someone might run
into the older syntax.
Furthermore, since most perl versions people encounter these days are
>=5.10, switch to 5.24.1 as an example for these versions.
While I'm at it, stop calling "use VERSION" the "peculiar" form, it
adds nothing, and just confuses the reader.
Zefram [Wed, 6 Dec 2017 06:08:22 +0000 (06:08 +0000)]
remove stray NULLOK/NN from apidoc directives
Zefram [Wed, 6 Dec 2017 04:00:04 +0000 (04:00 +0000)]
put shadowing warnings in their own category
As proposed in [perl #125330].
Tony Cook [Tue, 5 Sep 2017 05:26:41 +0000 (15:26 +1000)]
limit digits based on radix for oct/bin fp
All hexadecimal digits were being permitted in octal and binary floating
point literals. (That octal and binary literals are permitted at all
might be an accidental result of permitting hexadecimal?) Restrict which
digits are permitted, in accordance with the radix.
Zefram [Wed, 6 Dec 2017 01:40:43 +0000 (01:40 +0000)]
avoid negative shift in scan_num()
Lengthy binaryish floating point literals used to perform illegal bit
shifts. Ignore digits that are past the end of the significand at an
earlier stage to avoid this. Code fix by Tony C. Fixes [perl #131894].
Zefram [Wed, 6 Dec 2017 01:10:31 +0000 (01:10 +0000)]
assert legality of bitshifts in scan_num()
[perl #131894] found some negative-exponent shifting going on here.
Make the illegality more accessible by asserting.
Zefram [Wed, 6 Dec 2017 00:50:05 +0000 (00:50 +0000)]
don't mistake tr/// for assignable reference
For the lhs of an assignment to be an assignable srefgen, the
srefgen must be its top-level op. ck_refassign() asserted that, but
S_assignment_type() was delving inside a null op looking for the srefgen,
the same way it looks for things that distinguish between scalar and
list assignment. This showed up in a weird situation where a no-op
transliteration could be applied to an srefgen, getting an srefgen inside
a null op. Fixes [perl #130578].
Zefram [Tue, 5 Dec 2017 20:51:19 +0000 (20:51 +0000)]
document hash/block disambig in perlsyn
Fixes [perl #130958].
Zefram [Tue, 5 Dec 2017 19:18:19 +0000 (19:18 +0000)]
correct and clarify doc of operator precedence
Fixes [perl #127391].
Zefram [Tue, 5 Dec 2017 18:08:51 +0000 (18:08 +0000)]
clarify conditions for calling DB::sub
The wording was ambiguous about which subroutine's compilation matters.
Fixes [perl #131672].
Zefram [Tue, 5 Dec 2017 18:03:12 +0000 (18:03 +0000)]
remove doc hedge about autovivification
We're clear by now that we're not going to change the default
autovivification behaviour, so the documentation should no longer say
that it "may be fixed in a future release". Fixes [perl #127712].
Zefram [Tue, 5 Dec 2017 17:47:54 +0000 (17:47 +0000)]
document context provided by refgen
Fixes [perl #131061].
Aaron Crane [Tue, 5 Dec 2017 14:57:58 +0000 (14:57 +0000)]
pod/perlapio.pod: fix incorrect count of list items
The list previously included sfio; when sfio support was deleted in the 5.19
period, the relevant item in the list was also deleted, but the introducing
sentence wasn't updated to match.
Zefram [Tue, 5 Dec 2017 06:13:27 +0000 (06:13 +0000)]
stop using &PL_sv_yes as no-op method
Method lookup yields a fake method for ->import or ->unimport if there's
no actual method, for historical reasons so that "use" doesn't barf
if there's no import method. This fake method used to be &PL_sv_yes
being used as a magic placeholder, recognised specially by pp_entersub.
But &PL_sv_yes is a string, which we'd expect to serve as a symbolic
CV ref. Change method lookup to yield an actual CV with a body in this
case, and remove the special case from pp_entersub. This fixes the
remaining part of [perl #126042].
Zefram [Tue, 5 Dec 2017 03:05:51 +0000 (03:05 +0000)]
document newATTRSUB_x()
Zefram [Tue, 5 Dec 2017 00:02:10 +0000 (00:02 +0000)]
more fully document newCONSTSUB{,_flags}()
Zefram [Mon, 4 Dec 2017 22:44:07 +0000 (22:44 +0000)]
document newXS_len_flags()
Zefram [Mon, 4 Dec 2017 17:13:08 +0000 (17:13 +0000)]
avoid attaching prototype to freed XS sub
XS sub creation in newXS_len_flags() was applying the prototype after
process_special_blocks(), which could free the sub if it's a BEGIN.
Track whether that's freed the sub, in the same way that newATTRSUB_x()
does, and skip adding the prototype if it's been freed. Also sprinkle
some assertions throughout sub building code, about the sub being live.
This arises from [perl #125806], and prevents the immediate cause of its
segv, but doesn't actually fix it. The test case there still fails, a bit
later on in newCONSTSUB_flags(), now hitting one of the new assertions.
Father Chrysostomos [Mon, 4 Dec 2017 23:29:45 +0000 (15:29 -0800)]
Make Bad name error less unhelpful
This was brought up in perl #132485.
Because ‘Bad name after...’ is a croak, it suppresses the more helpful
hints like ‘Might be a runaway multi-line string’, in such cases as:
use Moose;
has erdef => (
isa => 'Int',
is => 'ro,
default => sub { 1 }
);
has cxxc => (
isa => 'Int',
is => 'ro',
default => sub { 1 }
);
We can allay this infelicity by emitting the ‘Missing operator before
bareword’ before the Bad name croak, so in the example above we
end up with:
Bareword found where operator expected at - line 10, near "isa => 'Int"
(Might be a runaway multi-line '' string starting on line 5)
(Do you need to predeclare isa?)
Bad name after Int' at - line 10.
rather than just:
Bad name after Int' at - line 10.
James E Keenan [Wed, 29 Nov 2017 03:07:18 +0000 (22:07 -0500)]
Relax workaround for d_uselocale from RT #128867.
More precisely, tailor the application of the workaround to the FreeBSD
userland version ranges specified in
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211743#c10. (Using
userland version ('uname -U') rather than kernel version ('uname -K') at
suggestion of Mathieu Arnold.
We probably don't need an 'else' branch; let Configure handle it.
David Mitchell [Mon, 4 Dec 2017 11:50:53 +0000 (11:50 +0000)]
multiconcat: don't fold adjacent constants
RT #132385
In something like
$overloaded . "a" . "b"
perl used to do
$overloaded->concat("a")->concat("b")
but since the introduction of OP_MULTICONCAT, started doing:
$overloaded->concat("ab")
This commit restores the old behaviour, by keeping every second adjacent
OP_CONST as an arg rather than optimising it away and adding its contents
to the constant string in the aux struct.
But note that
$overloaded .= "a" . "b"
originally, and still, constant folds.
Karl Williamson [Sun, 3 Dec 2017 20:40:34 +0000 (13:40 -0700)]
perluniprops/mktables: Add code points matched annotations
This commit changes the generated perluniprops to include some or all of
the code points matched by binary tables. All characters matched in the
00-FF range are listed, as well as the first few ranges beyond that.
This is to make this pod more useful for people using it as an index to
look things up.
Karl Williamson [Sun, 3 Dec 2017 18:09:17 +0000 (11:09 -0700)]
perluniprops/mktables: Add Definition concept
This specifies what code points a table matches. This step takes the
Description field from various properties and extracts the code points
matched portion into the Definition, which just changes the generated
perluniprops.pod slightly, in the ordering of how the information about
a given property appears.
David Mitchell [Sun, 3 Dec 2017 16:38:37 +0000 (16:38 +0000)]
re_intuit_start(): skip too short variant utf8 pat
RT #132187
This function searches in the target string for known fixed substrings
of the pattern, either to quickly reject the match, or to find a minimum
start point at which to run the full regex engine.
If the target string is utf8 and the pattern is non-utf8 but contains
chars in the rang 0x80-0xff, the fixed substring to be searched for will
be upgraded to utf8, which causes its length to grow. This can defeat an
early quick rejection test of: "is the known substring longer than the
target string", because that check is done before the upgrade.
It can also trigger the bug reported in the ticket above: a calculation
of the maximum end-point within the target string to find the substring
goes wrong, because (endpoint - N1) gets limited to the start point (since
N1 is longer than the string length), and so the moral equivalent of
((endpoint - N1) + N2) then disappears off the end of the string.
The net effect of this bug is that a few bytes off the end of the string
may be read, triggering complaints by ASAN etc, or even a SEGV.
It makes no difference to the match (which should fail and does fail),
except that it might match slower in the unlikely event that the bytes off
the end of the string match that tail of the searched-for substring, in
which case the full regex engine has to be run to finally reject it.
This commit:
1) adds a second length(substr) > length(target string) check
at the point its going to run the FBM substring search;
2) it tidies up the code that moves the endpoint back, skipping
an expensive utf8 hop-back in more cases.
Karl Williamson [Sun, 3 Dec 2017 05:28:28 +0000 (22:28 -0700)]
perluniprops/mktables: Fix wong output.
perluniprops had a few entries like
XPosixCntrl General_Category=XPosixCntrlControl
It should have read
XPosixCntrl General_Category=Control
Father Chrysostomos [Sat, 2 Dec 2017 15:37:15 +0000 (07:37 -0800)]
substr.t: typo
Father Chrysostomos [Sat, 2 Dec 2017 02:47:58 +0000 (18:47 -0800)]
[perl #132527] Allow 4-arg substr(delete ...)
Commit
19a8de4862 broke 4-arg substr with ‘delete’ (and various other
ops) for its first argument. Since historically these have been
allowed, use a ‘loose’ lvalue context such as entersub when lvaluify-
ing the first argument.
Father Chrysostomos [Mon, 27 Nov 2017 02:46:56 +0000 (18:46 -0800)]
t/lib/warnings/9enabled: update comment
This new description of the file better reflecst what it is actually
used for now.
Yves Orton [Fri, 1 Dec 2017 20:00:05 +0000 (21:00 +0100)]
fixup test that was broken by
3c67ad9b9.
Error message changed from "Can't" to "Cannot" with slightly different
wording, breaking t/run/switches.t
Yves Orton [Fri, 1 Dec 2017 18:35:02 +0000 (19:35 +0100)]
comment entry points to study_chunk
so it is a bit easier to follow what they are used for.
Yves Orton [Fri, 1 Dec 2017 18:32:46 +0000 (19:32 +0100)]
comment out unreachable code and explain why it was/is there
Craig A. Berry [Fri, 1 Dec 2017 17:45:50 +0000 (11:45 -0600)]
Specify afs entries in configure.com.
This prevents op/stat.t from failing due to an undefined variable
warning when $Config{'afsroot'} is checked.
Zefram [Fri, 1 Dec 2017 17:35:35 +0000 (17:35 +0000)]
in Data-Dumper, quote glob names better
Glob name quoting should obey Useqq. Fixes [perl #119831].
Tony Cook [Fri, 1 Dec 2017 03:36:52 +0000 (14:36 +1100)]
(perl #132506) finish the correction to dir_unchanged()
and adjust the error message for renaming the work file
Zefram [Fri, 1 Dec 2017 02:10:33 +0000 (02:10 +0000)]
correct a perldelta description
The threshold for size computation problems in malloc() is a bit smaller
than the description initially indicated.
Zefram [Fri, 1 Dec 2017 01:39:57 +0000 (01:39 +0000)]
revert changes to st_ino signedness handling
This reverts commits
8843856e9716655549cce789b3338e1d4c72fffb,
3676f9e77d46b61f4785aad171f02bed29df0c07, and
793c2ded15ca832d1df1fabbc3b2e7562a057697.
As noted in the large comment above the relevant code, the probed
ST_INO_SIGN is not reliable enough for its purpose, because Configure
makes guesses. The actual compiler knows whether st_ino is signed,
and is perfectly capable of optimising out the negative-handling code
in the usual case that st_ino is unsigned, without any need for us to
preprocess it away.
Zefram [Fri, 1 Dec 2017 01:25:52 +0000 (01:25 +0000)]
in malloc, compute memory sizes in size_t
Some size computations were using the wrong data type, in particular
getting a signed 32-bit type where unsigned 64-bit is required on
LP64 systems. That resulted in truncation and in sign extension during
later conversion to the correct type, either way producing bogus sizes.
Fix by casting everything to size_t suitably early. Fixes [perl #119829].
Karl Williamson [Thu, 30 Nov 2017 20:47:30 +0000 (13:47 -0700)]
perluniprops: Display controls sorted by alpha
The complete set of C0 controls is listed by standard abbreviation, but
it is better to display them alphabetically, and not in ASCII-platform
code point order.
Karl Williamson [Thu, 30 Nov 2017 20:31:52 +0000 (13:31 -0700)]
mktables: Add safety code
This isn't currently necessary to add, but I discovered this deficiency
during debugging, and it could come up in some later change.
This code only writes one file when two tables match identically. But
it could happen that we've got the pointers to the two tables
intertwined so that they each think the other one is the one getting
written out, so neither of them do. This checks for that.
Karl Williamson [Thu, 30 Nov 2017 20:18:18 +0000 (13:18 -0700)]
perluniprops: Make sc property refer to scx
The scx is an improved version of the sc(ript) property. This changes
mktables to generate perluniprops so that the entries for sc tables
refer to the equivalent scx ones.
Karl Williamson [Thu, 30 Nov 2017 19:59:39 +0000 (12:59 -0700)]
perluniprops/mktables: Fix bad entry
I spotted this entry in perluniprops recently:
\p{Nko} \p{Script_Extensions=Nko} (NOT \p{NKo})
It's saying Nko is not NKo. But case isn't supposed to matter. It
turned out that the bug was doing an eq without first canonicalizing the
names to account for case differences. I was expecting there to be more
entries that were erroneous, but it was just this one.
Karl Williamson [Thu, 30 Nov 2017 19:51:43 +0000 (12:51 -0700)]
mktables: Comment fixes only
Karl Williamson [Thu, 30 Nov 2017 19:38:34 +0000 (12:38 -0700)]
mktables: Use global for Script_Extensions object
This is used in several places, so make its scope global to the program.
Karl Williamson [Thu, 30 Nov 2017 03:42:25 +0000 (20:42 -0700)]
perluniprops: \p{Greek} is a shortcut for scx:greek
Since 5.26.0, this (generated) pod has been wrong. The single-form Perl
shortcuts for script names now use the Script_Extensions property
instead of the (inferior) plain Script property.
Craig A. Berry [Thu, 30 Nov 2017 15:07:57 +0000 (09:07 -0600)]
Try harder to define INT64_C and UINT64_C.
These are steadily being used in more and more macros that are
available to extensions as well as core, but the use of Perl's
home-grown versions (for when we don't get them from stdint.h)
has depended on the definition of HAS_QUAD. However, HAS_QUAD
is explicitly turned off in perl.h when PERL_CORE is not defined,
and has warnings about widespread breakage if that undef were to
be removed (referring to RT #119753). So extensions that use
macros that in turn use INT64_C or UINT64_C were failing to
build.
So in order to know that 64-bit integers are available without
using the HAS_QUAD macro that was intended for just that purpose,
use QUADKIND as a way of saying "We know we had HAS_QUAD before
you hid it from us." Ugh.
Chris 'BinGOs' Williams [Thu, 30 Nov 2017 16:06:14 +0000 (16:06 +0000)]
Update File-Fetch to CPAN version 0.56
[DELTA]
0.56 Thu Nov 30 14:47:50 2017
* Blacklist 'lftp' use on hpux
Marco Fontani [Wed, 29 Nov 2017 17:32:20 +0000 (18:32 +0100)]
RT#132520: mention it's OK to attach a patch to an RT ticket
... as was the case of my first patch to perl: I tried to find my use
case in perlhack.pod, failed, and "hoped for the best".
With this, perlhack makes clearer that attaching a patch to an already
existing RT ticket is a perfectly valid and accepted use-case for
getting patches into perl - same as using perlbug.
Steve Hay [Thu, 30 Nov 2017 09:05:45 +0000 (09:05 +0000)]
Fix Windows build following commit
184f90dc41
But t/run/switches.t test 131 still fails, with perl.exe crashing.
Steve Hay [Thu, 30 Nov 2017 08:37:15 +0000 (08:37 +0000)]
Upgrade experimental from version 0.17 to 0.18
Steve Hay [Thu, 30 Nov 2017 08:34:52 +0000 (08:34 +0000)]
Upgrade Test-Simple from version 1.302113 to 1.302120
Tony Cook [Thu, 30 Nov 2017 04:15:26 +0000 (15:15 +1100)]
(perl #132506) remove an unneeded argument
Tony Cook [Thu, 30 Nov 2017 14:05:07 +0000 (01:05 +1100)]
(perl #132506) deal with un-/partly implemented *at() functions
NetBSD 6 provides renameat() etc in it's libc, but in the cases where
we use them they fail with ENOSYS.
So I've modified the in-place edit clean up code to attempt to
fallback to the non-at versions of these functions, after checking
that the current directory is sane.
Once I was sure that worked, since the *at() functions don't work for
my use case on NetBSD 6, I've disabled them in hints.
Karl Williamson [Thu, 30 Nov 2017 03:22:45 +0000 (20:22 -0700)]
PATCH: [perl #132516] locale.c compiler warning
This is a problem on Darwin due to a bug there. MB_CUR_MAX, according
to Tony Cook, is supposed to be an unsigned value according to the C99
standard, and it is in Linux. But Darwin declares it to be signed, even
though the minimum value it can reach is +1. Maybe other systems have
the same defect. But there is a simple fix, just cast it to unsigned.
Nicolas R [Wed, 29 Nov 2017 21:07:15 +0000 (14:07 -0700)]
mark MB_CUR_MAX constant as unsigned long
Avoid a warning in locale.c
comparison of integers of different signs: 'int' and 'unsigned long'
is_utf8 = MB_CUR_MAX >= STRLENs(MAX_UNICODE_UTF8);
RT #132516
Karl Williamson [Wed, 29 Nov 2017 00:44:02 +0000 (17:44 -0700)]
perluniprops: Improve sorting
Unicode has some property values that should be sorted numerically, but
have prefixes that make them not currently appear to be numbers. For
example, CCC101 and V10_5. This commit changes so they are sorted by
their numeric parts.
Nicolas R [Wed, 29 Nov 2017 18:05:17 +0000 (11:05 -0700)]
IO test: adjust require for non CORE perl
fix test t/io_utf8argv.t when run outside of core perl
(noticed this on windows platform)
Jarkko Hietaniemi [Wed, 29 Nov 2017 13:06:16 +0000 (15:06 +0200)]
More UINT64_C.
Jarkko Hietaniemi [Wed, 29 Nov 2017 06:22:29 +0000 (08:22 +0200)]
assert() that the vlnz is not NULL before using it.
Coverity #169272.
Jarkko Hietaniemi [Wed, 29 Nov 2017 05:50:15 +0000 (07:50 +0200)]
Initialize variables.
Coverity #169257, #169265, #169269.
Jarkko Hietaniemi [Wed, 29 Nov 2017 05:24:50 +0000 (07:24 +0200)]
Set safer umask for mkstemp().
Coverity #169258.
Jarkko Hietaniemi [Wed, 29 Nov 2017 05:11:33 +0000 (07:11 +0200)]
More robust version of
793c2ded.
In platforms with st.ino always positive, never even see the negative code.
Coverity #169271.
Marco Fontani [Tue, 28 Nov 2017 12:43:36 +0000 (13:43 +0100)]
second arg to mkdir is MODE, not MASK
RT# 132505
Marco Fontani is now a Perl author.
David Mitchell [Wed, 29 Nov 2017 08:24:21 +0000 (08:24 +0000)]
POSIX.xs: remove unused variable
David Mitchell [Wed, 29 Nov 2017 08:16:26 +0000 (08:16 +0000)]
rpeep(): use OPpPADHV_ISKEYS, not OPpRV2HV_ISKEYS
I added a bit of code with
748f2c65599 that looked like:
o->op_private |= (o->op_type == OP_PADHV ?
OPpRV2HV_ISKEYS : OPpRV2HV_ISKEYS);
That first constant should of course been OPpPADHV_ISKEYS - although
since both constants currently have the same value, it didn't make any
difference at the time.
Spotted by Coverity, and brought to my attention by jhi++.
Dagfinn Ilmari Mannsåker [Tue, 21 Nov 2017 21:12:12 +0000 (21:12 +0000)]
Assigning non-zero to $[ will become fatal in 5.30
As agreed at the Perl5 Core Hackathon.
David Mitchell [Tue, 28 Nov 2017 09:08:09 +0000 (09:08 +0000)]
$overloaded .= $x: don't stringify $x
RT #132385
This is a variant of the ($ref . $overloaded) bug which was fixed with
v5.27.5-195-gb3ab0375cb.
Basically, when the overloaded concat method is called, it should pass
$x as-is, rather than as "$x". This fixes PDL-2.018
Steve Hay [Tue, 28 Nov 2017 09:10:04 +0000 (09:10 +0000)]
perldelta for commit
6f669bf58b
Steve Hay [Tue, 28 Nov 2017 08:40:56 +0000 (08:40 +0000)]
Fix $Config{libpth} for x64 builds with VC++ earlier than 14.1 (VS2017)
This commit adapts and extends a patch from Marc-Philip
<marc-philip@die-werners.de> on perl #132484.
Jarkko Hietaniemi [Tue, 28 Nov 2017 06:15:50 +0000 (08:15 +0200)]
False false.
(Solaris cc got angry.)
Jarkko Hietaniemi [Tue, 28 Nov 2017 05:44:10 +0000 (07:44 +0200)]
STDCHAR * might not be char *.
And therefore one may not be able to subtract the pointers,
for example in HP-UX.