platform/upstream/perl.git
10 years agoModule-CoreList 3.07 released to CPAN, bump core version to 3.08
Chris 'BinGOs' Williams [Fri, 21 Feb 2014 16:08:01 +0000 (16:08 +0000)]
Module-CoreList 3.07 released to CPAN, bump core version to 3.08

10 years agoFix syncing of Config-Perl-V with CPAN version 0.20
Steve Hay [Fri, 21 Feb 2014 08:37:37 +0000 (08:37 +0000)]
Fix syncing of Config-Perl-V with CPAN version 0.20

Commit d0fa2fb96e removed some erroneous changes made by commit 0b39d4dc4a
but didn't quite restore 21_plv518.t to match the CPAN version.

10 years agoUpgrade HTTP-Tiny from version 0.042 to 0.043
Steve Hay [Fri, 21 Feb 2014 08:12:35 +0000 (08:12 +0000)]
Upgrade HTTP-Tiny from version 0.042 to 0.043

10 years agoperldelta for 257518b902
Tony Cook [Fri, 21 Feb 2014 04:15:26 +0000 (15:15 +1100)]
perldelta for 257518b902

10 years agobump $base::VERSION to 2.22
Tony Cook [Mon, 17 Feb 2014 04:21:34 +0000 (15:21 +1100)]
bump $base::VERSION to 2.22

10 years ago[perl #121196] only examine the name being included
Tony Cook [Mon, 17 Feb 2014 04:19:34 +0000 (15:19 +1100)]
[perl #121196] only examine the name being included

Checking the location called from broke require overrides.

10 years agoperldelta for 3e63bed3c5, 58572ed82f
Tony Cook [Fri, 21 Feb 2014 03:47:05 +0000 (14:47 +1100)]
perldelta for 3e63bed3c558572ed82f

10 years agoUpdate Module-Load to CPAN version 0.32
Chris 'BinGOs' Williams [Thu, 20 Feb 2014 23:31:43 +0000 (23:31 +0000)]
Update Module-Load to CPAN version 0.32

  [DELTA]

0.32    Thu Feb 20 22:53:19 GMT 2014
* Fix tests to support statically built perls

10 years agoOnly define Perl__get_regclass_nonbitmap_data once.
Craig A. Berry [Thu, 20 Feb 2014 22:25:28 +0000 (16:25 -0600)]
Only define Perl__get_regclass_nonbitmap_data once.

It was added in 77d654fbc7477bd but since it is exported, it
should not be defined in both the core and the extension versions
of regex code.  Doing so causes a multiply defined symbol warning
in the VMS linker and results in a build failure.  It might cause
trouble in any other environment with a strict linker.

10 years ago[perl #120939] at least fix the leak in const_av_xsub
Tony Cook [Thu, 20 Feb 2014 22:12:58 +0000 (09:12 +1100)]
[perl #120939] at least fix the leak in const_av_xsub

10 years agoUpdate ExtUtils-MakeMaker to CPAN version 6.90
Chris 'BinGOs' Williams [Thu, 20 Feb 2014 20:56:46 +0000 (20:56 +0000)]
Update ExtUtils-MakeMaker to CPAN version 6.90

  [DELTA]

6.90 Thu Feb 20 20:46:04 GMT 2014

    No changes from 6.89_01

6.89_01 Mon Feb 17 15:56:39 GMT 2014
    Bug fixes:
    * Libraries are not transitive on Android

10 years agoRestore proper functioning of -Mdiagnostics
Karl Williamson [Thu, 20 Feb 2014 18:29:15 +0000 (11:29 -0700)]
Restore proper functioning of -Mdiagnostics

Commit 1c604e7c7f fixed some pod errors, but broke

./perl -Ilib -Mdiagnostics -e '$/=[]'

This fixes that.

10 years agoChange 'semantics' to 'rules'
Karl Williamson [Thu, 20 Feb 2014 18:10:39 +0000 (11:10 -0700)]
Change 'semantics' to 'rules'

The term 'semantics' in documentation when applied to character sets is
changed to 'rules' as being a shorter less-jargony synonym in this case.
This was discussed several releases ago, but I didn't get around to it.

10 years agoChange av_len calls to av_tindex for clarity
Karl Williamson [Thu, 20 Feb 2014 17:28:58 +0000 (10:28 -0700)]
Change av_len calls to av_tindex for clarity

av_tindex is a more clearly named synonym for av_len, available starting
in v5.18.  This changes the core uses to it, including modules in /ext,
which are not dual-lifed.

10 years agoBump version numbers
Karl Williamson [Thu, 20 Feb 2014 17:23:23 +0000 (10:23 -0700)]
Bump version numbers

These four core-only modules are about to be changed so that they call
av_tindex instead of av_len.  There's no chance that any of the version
numbers will need to be reverted, as we think that bumping a single-life
module's version is harmless.

10 years agoUpdate ribasushi's e-mail address.
Nicholas Clark [Thu, 20 Feb 2014 15:54:09 +0000 (16:54 +0100)]
Update ribasushi's e-mail address.

10 years agoFix pod typo (kentnl++)
Peter Rabbitson [Thu, 20 Feb 2014 15:14:42 +0000 (16:14 +0100)]
Fix pod typo (kentnl++)

10 years agoOne typo fix was missed in upgrading Config::Perl::V to 0.20
H.Merijn Brand [Thu, 20 Feb 2014 11:00:15 +0000 (12:00 +0100)]
One typo fix was missed in upgrading Config::Perl::V to 0.20

The modified for blead change has been reverted
The -V output as checked for 5.10.x and 5.18.x will not change
with changes in blead.

I will add new test files for all most recent maint releases
and will add one for 5.10.0 when it is out

10 years agoModule-CoreList 3.06 released to CPAN
Chris 'BinGOs' Williams [Thu, 20 Feb 2014 10:54:58 +0000 (10:54 +0000)]
Module-CoreList 3.06 released to CPAN

10 years agoAmend Porting/core-cpan-diff
H.Merijn Brand [Thu, 20 Feb 2014 10:37:47 +0000 (11:37 +0100)]
Amend Porting/core-cpan-diff

Allow -v with -x
Show diff for customized scripts when -d and -v
Allow -v #
Set -d if -v 3 and up

10 years agoprepare Module::CoreList for next release
Tony Cook [Thu, 20 Feb 2014 07:10:51 +0000 (18:10 +1100)]
prepare Module::CoreList for next release

10 years agobump to version 5.19.10 and fix the version number reference in op.c
Tony Cook [Thu, 20 Feb 2014 05:32:01 +0000 (16:32 +1100)]
bump to version 5.19.10 and fix the version number reference in op.c

10 years agonew perldelta for 5.19.10
Tony Cook [Thu, 20 Feb 2014 05:06:18 +0000 (16:06 +1100)]
new perldelta for 5.19.10

10 years agoavoid leaving the old perldelta as a symlink
Tony Cook [Thu, 20 Feb 2014 05:02:57 +0000 (16:02 +1100)]
avoid leaving the old perldelta as a symlink

In a built tree, the name we copy perldelta.pod to is a symlink to
perldelta.pod, and if you blindly follow the git adds, you end up
adding a symlink to the commit.

unlink() the name we're about to overwrite before we overwrite it to
prevent that.

10 years agorecord the 5.19.9 epigraph
Tony Cook [Thu, 20 Feb 2014 04:56:00 +0000 (15:56 +1100)]
record the 5.19.9 epigraph

10 years agomerge 5.19.9 release branch
Tony Cook [Thu, 20 Feb 2014 04:40:24 +0000 (15:40 +1100)]
merge 5.19.9 release branch

10 years agoregcomp.c: Don't read uninitialized data
Karl Williamson [Thu, 20 Feb 2014 04:14:44 +0000 (21:14 -0700)]
regcomp.c: Don't read uninitialized data

I keep forgetting that the OP of a regnode is not defined in Pass 1 of
the regex compiler.  This is likely the cause of inconsistent results in
lib/locale.t, as valgrind shows there to be a read of uninitialized
data before this patch, and the result is randomly tainting when there
shouldn't be, consistent with the test failures.

10 years agonote lib/locale.t rare failure
Tony Cook [Thu, 20 Feb 2014 03:24:53 +0000 (14:24 +1100)]
note lib/locale.t rare failure

10 years agoupdate perlhist for 5.19.9
Tony Cook [Thu, 20 Feb 2014 02:50:08 +0000 (13:50 +1100)]
update perlhist for 5.19.9

10 years agofinalize perldelta for 5.19.9
Tony Cook [Thu, 20 Feb 2014 02:44:11 +0000 (13:44 +1100)]
finalize perldelta for 5.19.9

10 years agoUpdate Module::CoreList for 5.19.9
Tony Cook [Thu, 20 Feb 2014 00:22:22 +0000 (11:22 +1100)]
Update Module::CoreList for 5.19.9

10 years agolib/locale.t: Remove tests that need UTF-8 locale
Karl Williamson [Thu, 20 Feb 2014 00:11:33 +0000 (17:11 -0700)]
lib/locale.t: Remove tests that need UTF-8 locale

These tests should not be here because they will only match under a
UTF-8 locale, which happens to be the case on the machine I developed
them on, but not necessarily always true, and so they are failing.

Given the deadline is already past, I'm just removing them for now, and
will re-add them later in another place in the file where we know we
are using a UTF-8 locale.

10 years agolocale.c: Change 'and' to '&&'
Karl Williamson [Wed, 19 Feb 2014 22:39:18 +0000 (15:39 -0700)]
locale.c: Change 'and' to '&&'

To actually compile on Windows

10 years agorun/locale.t: White-space only
Karl Williamson [Wed, 19 Feb 2014 22:33:00 +0000 (15:33 -0700)]
run/locale.t: White-space only

Align a column

10 years agolocale.c: Another POSIX emulation fix on Windows
Karl Williamson [Wed, 19 Feb 2014 22:31:07 +0000 (15:31 -0700)]
locale.c: Another POSIX emulation fix on Windows

Right after I pushed the previous commit, I realized that the system
default locale on Windows should also have lower priority (besides LANG)
than the LC_foo environment variables.  This should do that.

10 years ago.locale.c: Better emulate POSIX locale setting on Windows
Karl Williamson [Wed, 19 Feb 2014 21:55:29 +0000 (14:55 -0700)]
.locale.c: Better emulate POSIX locale setting on Windows

Commit b385bb4ddcb252e69a1044d702646741e2e489fb introduced
my_setlocale() compiled only under Windows which emulates the POSIX
rules for setting the locale.  It differs from Windows only if the
locale passed in is "".  Unfortunately it was buggy if the category
being set was LC_ALL, and there is a LANG environment variable.  LANG
has lower precedence than the other environment variables, like
LC_NUMERIC, but my_setlocale() was giving it higher priority when set
through LC_ALL.

This should solve the problems being seen since
7cd8b56846670e577e1f62479eab8f38fb11da14

10 years agoMake taint checking regex compile time instead of runtime
Karl Williamson [Tue, 18 Feb 2014 19:59:26 +0000 (12:59 -0700)]
Make taint checking regex compile time instead of runtime

See discussion at https://rt.perl.org/Ticket/Display.html?id=120675
There are several unresolved  items in this discussion, but we did agree
that tainting should be dependent only on the regex pattern, and not the
particular input string being matched against:

"The bottom line is we are moving to the policy that tainting is based
on the operation being in locale, without regard to the particular
operand's contents passed this time to the operation. This means simpler
core code and more consistent tainting results. And it lessens the
likelihood that there are paths in the core that should taint but don't"

This commit does the minimal work to change regex pattern matching to
determine tainting at pattern compilation time.  Simply put, if a
pattern contains a regnode whose match/not match depends on the run-time
locale, any attempt to match against that pattern will taint, regardless
of the actual target string or runtime locale in effect.  Given this
change, there are optimizations that can be made to avoid runtime work,
but these are deferred until later.

Note that just because a regular expression is compiled under locale
doesn't mean that the generated pattern will be tainted.  It depends on
the actual pattern.  For example, the pattern /(.)/ doesn't taint
because it will match exactly one character of the input, regardless of
locale settings.

10 years agolib/locale.t: Add some test names
Karl Williamson [Tue, 18 Feb 2014 18:37:10 +0000 (11:37 -0700)]
lib/locale.t: Add some test names

10 years agolib/locale.t: Untaint before checking if next thing taints
Karl Williamson [Tue, 18 Feb 2014 18:45:48 +0000 (11:45 -0700)]
lib/locale.t: Untaint before checking if next thing taints

The tests weren't testing what they purported to, as we should be sure
to start with untained values to see if the operation taints.

10 years agoperllocale: Add note about ENVIRONMENT variable
Karl Williamson [Wed, 19 Feb 2014 16:37:51 +0000 (09:37 -0700)]
perllocale: Add note about ENVIRONMENT variable

This variable is part of the environment, but wasn't previously
mentioned.

10 years agoperlsec: Nit
Karl Williamson [Wed, 19 Feb 2014 16:36:39 +0000 (09:36 -0700)]
perlsec: Nit

10 years agoUpdate Config::Perl::V to 0.20
H.Merijn Brand [Wed, 19 Feb 2014 16:39:00 +0000 (17:39 +0100)]
Update Config::Perl::V to 0.20

10 years agoperlootut: replace Object::Tiny with Class::Tiny
David Golden [Wed, 19 Feb 2014 16:01:40 +0000 (11:01 -0500)]
perlootut: replace Object::Tiny with Class::Tiny

Class::Tiny is similarly small and simple in API, but with more powerful
features available.  Comparison to Object::Tiny and Class::Accessor is
here: https://metacpan.org/pod/Class::Tiny#RATIONALE

At mst's suggestion, a link to Class::Tiny::Antlers for Moose-syntax
is included.

10 years agoNew bincompat options
H.Merijn Brand [Wed, 19 Feb 2014 16:07:32 +0000 (17:07 +0100)]
New bincompat options

10 years agoregcomp.c: Remove no longer used function
Karl Williamson [Wed, 19 Feb 2014 05:07:56 +0000 (22:07 -0700)]
regcomp.c: Remove no longer used function

I don't think this function will need to be used again.

10 years agoregcomp.c: Move some locale initialization code
Karl Williamson [Tue, 18 Feb 2014 18:01:23 +0000 (11:01 -0700)]
regcomp.c: Move some locale initialization code

This moves some code down a few lines, rewording the comments, and doing
some things only once, instead of each time through the loop.

This eliminates some tests, as the new place already has determined that
some of the preconditions for executing the code have been met.  It
keeps us from generating unnecessary locale nodes for platforms which
don't have isascii().

10 years agoregcomp.c,regexec.c: White-space only
Karl Williamson [Tue, 18 Feb 2014 17:47:15 +0000 (10:47 -0700)]
regcomp.c,regexec.c: White-space only

Properly indent two sections of code newly enclosed in braces by the
previous commit

10 years agoregcomp.c: Fix more alignment problems
Karl Williamson [Tue, 18 Feb 2014 17:24:31 +0000 (10:24 -0700)]
regcomp.c: Fix more alignment problems

I believe this will fix the remaining alignment problems recently being
shown on gcc on HP-UX, It works on the procura machine.

regnodes should not have stricter alignment than required by U32, for
reasons given in the comments this commit adds to the beginning of
regcomp.h.  Commit 31f05a37 added a new ANYOF regnode struct with a
pointer field.  This requires stricter alignment on some 64-bit platforms,
and hence doesn't work on those platforms.

This commit removes that regnode struct type, and instead stores the
pointer it used via a more indirect, but already existing mechanism
that stores other data..

The function that returns that other data is enlarged to return this new
field as well.  It now needs to be called from regcomp.c, so the
previous commit had renamed and made it accessible from there.  The
"public" function that wraps this one is unchanged.  (I put "public" in
quotes here, because I don't think anyone outside core is or should be
using it, but since it has been publicly available for a long time, I'm
treating the API as unchangeable.  regcomp.c called this public function
before this commit, but needs the additional data returned by the inner
one).

10 years agoregexec.c: Rename function, add parameter, make non-static
Karl Williamson [Tue, 18 Feb 2014 16:05:09 +0000 (09:05 -0700)]
regexec.c: Rename function, add parameter, make non-static

This is in preparation for a future commit where the function does more
things so its current name would be misleading.  It will need to be
callable from regcomp.c as well.

10 years agoregcomp.h: Allow compiler to perform calculation
Karl Williamson [Tue, 18 Feb 2014 15:57:48 +0000 (08:57 -0700)]
regcomp.h: Allow compiler to perform calculation

Instead of doing the calculation of how many bytes a 256 bitmap
occupies, let the compiler do it.  I believe we are not too far away
from having the ability to allow applications to recompile Perl to
increase the bitmap size trading speed for memory.  ICU has an 8192
bitmap last time I checked.

10 years agoregexec.c: Add some checks
Karl Williamson [Mon, 17 Feb 2014 23:04:06 +0000 (16:04 -0700)]
regexec.c: Add some checks

These aren't currently needed, but a future commit will change so things
need to be more general

10 years agoChange method of passing some info from regcomp to regexec
Karl Williamson [Mon, 17 Feb 2014 22:39:12 +0000 (15:39 -0700)]
Change method of passing some info from regcomp to regexec

For the last several releases, the fact that an ANYOF node could match
something outside its bitmap has been passed to regexec.c by having its
ARG field not be -1 (appropriately cast).  A bit was set if the match
could occur even if the target string was not UTF-8 encoded.  This
design was used to save a bit, as previously there was a bit also for it
matching UTF-8 strings.

That design is no longer tenable, as a future commit will have a third
(independent) reason for something to match outside the bitmap,  This
commits uses the current spare bit flag to indicate if the match can
only occur if the target string is UTF-8.

10 years agoregcomp.h: Remove extraneous comment
Karl Williamson [Mon, 17 Feb 2014 22:40:50 +0000 (15:40 -0700)]
regcomp.h: Remove extraneous comment

This is obsolete and is a partial copy of the up-to-date comment below
it.

10 years agoregcomp.h: Free up flag bit in ANYOF nodes
Karl Williamson [Mon, 17 Feb 2014 20:57:11 +0000 (13:57 -0700)]
regcomp.h: Free up flag bit in ANYOF nodes

The ANYOF_LOC bit was removed from final use in the previous commit.

10 years agoregexes: Remove uses of ANYOF_LOCALE flag
Karl Williamson [Mon, 17 Feb 2014 20:47:00 +0000 (13:47 -0700)]
regexes: Remove uses of ANYOF_LOCALE flag

This flag no longer adds any useful information and can be removed.  An
ANYOF node that depends on locale either matches a POSIX class like /d,
or matches case insensitively, or both.  There are flags for both these
cases, and to see if something matches locale, one merely needs to see
if either flag is set.

Not having to keep track of this extra flag simplifies things, and will
allow it to be removed.  There was a time when this flag was shared with
one of the remaining locale ones, and there was relict code that allowed
that sharing to be reinstated, and which this commit also removes.

10 years agoregcomp.c: Simplify /l Synthetic Start Class construction
Karl Williamson [Mon, 17 Feb 2014 19:49:10 +0000 (12:49 -0700)]
regcomp.c: Simplify /l Synthetic Start Class construction

The ANYOF_POSIXL flag is needed in general for ANYOF nodes to indicate
if the struct contains an extra U32 element used to hold the list of
POSIX classes (like \w and [:punct:]) whose matches depend on the locale
in effect at the time of runtime pattern matching.

But the SSC always contains this U32, and so doesn't need to use the
flag.  Instead, if there aren't any such classes, the U32 will be zero.

Removing keeping track of this flag during the assembly of the SSC
simplifies things.  At the completion of this process, this flag is
set if the U32 is non-zero to pass that information on to regexec.c so
that it doesn't have to special case things.

10 years agoConvert more EXACTFish nodes to EXACT when possible
Karl Williamson [Sat, 15 Feb 2014 21:45:03 +0000 (14:45 -0700)]
Convert more EXACTFish nodes to EXACT when possible

Under /i matching, many characters match only themselves, such a
punctuation.  If a node contains only such characters it can be an EXACT
node.  The optimizer gets better hints when dealing with EXACT nodes
than ones with folding.

This changes the alloc_maybe_populate() function to look for
possibilities of non-folding input.

10 years agoDo not dereference hv before ensuring it's not NULL
Rafael Garcia-Suarez [Wed, 19 Feb 2014 14:41:51 +0000 (15:41 +0100)]
Do not dereference hv before ensuring it's not NULL

This should fix RT #116441 and possibly other bugs.

10 years agoperldelta updates
Tony Cook [Wed, 19 Feb 2014 09:26:38 +0000 (20:26 +1100)]
perldelta updates

10 years agosave errno/$! across Win32.pm autoloads too
Tony Cook [Wed, 19 Feb 2014 04:12:31 +0000 (15:12 +1100)]
save errno/$! across Win32.pm autoloads too

10 years agocygwin doesn't implement $^E (except as a read of $!)
Tony Cook [Wed, 19 Feb 2014 04:01:06 +0000 (15:01 +1100)]
cygwin doesn't implement $^E (except as a read of $!)

On Cygwin, reading $^E actually reads $!, as it does on other non-
VMS/Win32/OS/2 platforms.  Setting it does nothing.

10 years agoCorrect number of tests in plan.
James E Keenan [Wed, 19 Feb 2014 02:27:30 +0000 (03:27 +0100)]
Correct number of tests in plan.

10 years agoperlvar.pod: suggest string comparisons for $]
David Golden [Wed, 19 Feb 2014 01:29:52 +0000 (20:29 -0500)]
perlvar.pod: suggest string comparisons for $]

10 years agorestore $PERL_OLD_VERSION to English.pm
David Golden [Wed, 19 Feb 2014 01:10:45 +0000 (20:10 -0500)]
restore $PERL_OLD_VERSION to English.pm

In the dark ages, when $^V replaced $] for $PERL_VERSION,
$PERL_OLD_VERSION was added as a comment in the list of deprecated
variable.  Since $] is *not* deprecated, this commit restores it.

10 years ago[perl #121081] workaround different output on VMS
Tony Cook [Tue, 11 Feb 2014 05:42:57 +0000 (16:42 +1100)]
[perl #121081] workaround different output on VMS

VMS is a special snowflake, deal with the slightly different debugger
output it produces.

10 years agoUpdate HTTP-Tiny to CPAN version 0.042
David Golden [Tue, 18 Feb 2014 20:41:28 +0000 (15:41 -0500)]
Update HTTP-Tiny to CPAN version 0.042

[DELTA]

    [ADDED]

    - If IO::Socket::IP 0.25+ is installed, HTTP::Tiny will use it for
      transparent IPv4 or IPv6 support.

10 years agoFix pod errors
Karl Williamson [Tue, 18 Feb 2014 16:19:46 +0000 (09:19 -0700)]
Fix pod errors

10 years agore-import 5.19.8 delta form 5.19.8
Ricardo Signes [Tue, 18 Feb 2014 13:38:44 +0000 (08:38 -0500)]
re-import 5.19.8 delta form 5.19.8

10 years agoupdate perlport with currently unresolved Cygwin test failures
Tony Cook [Tue, 18 Feb 2014 10:03:29 +0000 (21:03 +1100)]
update perlport with currently unresolved Cygwin test failures

10 years agoUpdate Parse-CPAN-Meta to CPAN version 1.4413
Tony Cook [Tue, 18 Feb 2014 09:37:47 +0000 (20:37 +1100)]
Update Parse-CPAN-Meta to CPAN version 1.4413

1.4413    2014-02-17 20:04:23-05:00 America/New_York

    [FIXED]

    - UTF-8 decoding is done differently to avoid requiring
      a newer version of Encode (Graham Knop)

10 years agoperldelta updates
Tony Cook [Tue, 18 Feb 2014 09:14:07 +0000 (20:14 +1100)]
perldelta updates

10 years agoUpgrade Digest-SHA from 5.86 to 5.87
Steve Hay [Tue, 18 Feb 2014 08:51:49 +0000 (08:51 +0000)]
Upgrade Digest-SHA from 5.86 to 5.87

10 years agolocale.c: Fix initialization compile error for HP
Karl Williamson [Tue, 18 Feb 2014 06:10:51 +0000 (23:10 -0700)]
locale.c: Fix initialization compile error for HP

One of the HP compilers would not compile the compile-time array
initialization; so do it at runtime.

10 years ago[perl #120936] op/taint.t handling of no ipcsysv on cygwin
Tony Cook [Tue, 18 Feb 2014 04:13:20 +0000 (15:13 +1100)]
[perl #120936] op/taint.t handling of no ipcsysv on cygwin

shmget() and msgget() produce a SIGSYS on cygwin if cygserver isn't
running, crashing op/taint.t.

Perform similar checks to those done in io/shm.t to make sure these
are handled gracefully.

10 years agotest.pl uses skip_all(...), not plan(skip_all => ...)
Tony Cook [Tue, 18 Feb 2014 00:37:45 +0000 (11:37 +1100)]
test.pl uses skip_all(...), not plan(skip_all => ...)

This was causing noise on cygwin systems that don't have cygserver
running.

10 years agoavoid a "FILE" name conflict with cygwin's wchar.h
Tony Cook [Mon, 17 Feb 2014 23:38:43 +0000 (10:38 +1100)]
avoid a "FILE" name conflict with cygwin's wchar.h

The 1.7.28 release of cygwin (or possible a separate package released
around the same time) header wchar.h includes the following code:

  typedef __FILE FILE;

With PERLIO_NOT_STDIO set to true, the default for core source files, we
#include nostdio.h which does:

  struct _FILE;
  #define FILE struct _FILE

which turns the above code into:

  typedef __FILE struct _FILE;

which isn't C.

Disable this hack for cygwin.c

10 years agoSkip locale test on OpenBSD, MirBSD and Bitrig too
Chris 'BinGOs' Williams [Mon, 17 Feb 2014 21:03:54 +0000 (21:03 +0000)]
Skip locale test on OpenBSD, MirBSD and Bitrig too

From the original ticket #115808 the following should produce
"Use of uninitialized value in print at -e line 1."

$ perl -wle 'use POSIX; print length setlocale POSIX::LC_ALL, "mtfnpy"'
16

So skip this test on OpenBSD, MirBSD and Bitrig

10 years agoUpdate HTTP-Tiny to CPAN version 0.041
Chris 'BinGOs' Williams [Mon, 17 Feb 2014 20:30:07 +0000 (20:30 +0000)]
Update HTTP-Tiny to CPAN version 0.041

  [DELTA]

0.041     2014-02-17 13:07:54-05:00 America/New_York

    [no code change, only an amended Changes file]

    [INCOMPATIBLE CHANGES (from 0.039)]

    - The 'proxy' attribute no longer takes precedence over the
      'http_proxy' environment variable.  With the addition of http_proxy
      and https_proxy attributes (and corresponding environment variable
      defaults), the legacy 'proxy' attribute now maps to the
      all_proxy/ALL_PROXY environment variable and only takes effect when
      other proxy attributes are not defined.

    [ADDED (since 0.039)]

    - Added 'keep_alive' attribute for single-server persistent connections
      (Clinton Gormley)

    - Added support for Basic authorization with proxies

    - Added support for https proxies via CONNECT

    [FIXED (since 0.039)]

    - Requests are made with one less write for lower latency (Martin
      Evans)

0.040     2014-02-17 13:02:47-05:00 America/New_York

    [INCOMPATIBLE CHANGES]

    - The 'proxy' attribute no longer takes precedence over the
      'http_proxy' environment variable.  With the addition of http_proxy
      and https_proxy attributes (and corresponding environment variable
      defaults), the legacy 'proxy' attribute now maps to the
      all_proxy/ALL_PROXY environment variable and only takes effect when
      other proxy attributes are not defined.

    [ADDED]

    - Added support for Basic authorization with proxies

    - Added support for https proxies via CONNECT

10 years agoregcomp.c: Fix some alignment problems
Karl Williamson [Wed, 12 Feb 2014 03:27:30 +0000 (20:27 -0700)]
regcomp.c: Fix some alignment problems

The bracketed character class (e.g. /[abc]/) in regular expression
patterns is implemented as an ANYOF regnode.  There are several
different structs used for these, each a superset of the next smaller
size, with extra fields tacked on to its end.  Bits in the part common
to all of them are set to indicate which size this particular instance
is.

Several functions in regcomp.c take the largest of these as a formal
parameter, even though a smaller one may actually be passed.  This
avoids the need to have casts to access the optional fields, but the
code needs to be careful to check the common part bits before trying to
access a portion that may not actually be present.  This practice dates
to at least Perl v5.6.2.

It turns out that there is further a problem with this if the tacked-on
fields require a stricter alignment than the common fields.  The code in
the functions may assume that the actual parameter has suitable
alignment, which may not be the case.

Some months ago I added some extra optional pointer fields, which have
stricter alignment requirements on 64-bit machines than the common
portion, but no apparent problems ensued.

Then, I changed things slightly, so that the gcc compiler on HP machines
found an optimization possibility whose use required the proper
alignment, which wasn't present, and bus errors started happening there.

Tony Cook diagnosed the problem.  A summary of his work can be found
at http://markmail.org/message/hee5zyah7rb62c72

This commit changes the formal parameter to the smallest ANYOF struct,
and uses casts to acess the optional portions.

I don't know how common the coding style formerly used in regcomp.c is,
but it is dangerous and can lead to unrelated changes causing errors.

This commit should enable gcc builds to complete on the HP gcc smokers
(previously miniperl built, but crashed in building the rest of perl),
but we're not sure because unrelated header issues on the gcc on the
machine that we have access to prevent blead from fully compiling there.

There remain alignment bugs which will cause the tests to fail there, as
the appended pointer field needs to have strict alignment on that
platform, but when the regnodes are allocated alignment isn't done.  I
am working on fixing those.

10 years agolocale.c: Remove vars unused on some platforms
Karl Williamson [Mon, 17 Feb 2014 15:11:04 +0000 (08:11 -0700)]
locale.c: Remove vars unused on some platforms

A Darwin compiler noted these are unused.

10 years agoUpdate Parse-CPAN-Meta to CPAN version 1.4412
Chris 'BinGOs' Williams [Mon, 17 Feb 2014 12:46:15 +0000 (12:46 +0000)]
Update Parse-CPAN-Meta to CPAN version 1.4412

  [DELTA]

1.4412    2014-02-17 07:14:43-05:00 America/New_York

    [FIXED]

    - Added prerequisite on Encode 2.11 (Paul Howarth)

1.4411    2014-02-16 23:06:00-05:00 America/New_York

    [FIXED]

    - Invalid UTF-8 encoding in YAML files are now replaced with "PERLQQ"
      quoting from the Encode module and without warnings.

    - Removed legacy test modifications for $ENV{PERL_CORE}

10 years agoPATCH [perl #121257] blead fails at run/locale.t
Karl Williamson [Mon, 17 Feb 2014 06:03:43 +0000 (23:03 -0700)]
PATCH [perl #121257] blead fails at run/locale.t

Commit 65ebb05984db179833ff252f547043f32184d893changed the locale
initialization code to look at the LANG environment variable as a
fallback if there was a problem with a higher priority variable.

Thus, when trying to have an empty environment for testing, one now
needs to cause LANG to be unset, which wasn't the case before..This
commit adds that unset to the test that needs an empty environment.

10 years agot/run/locale.t: Fix skip count
Karl Williamson [Mon, 17 Feb 2014 05:41:58 +0000 (22:41 -0700)]
t/run/locale.t: Fix skip count

This skipped the wrong number of tests on platforms that don't have a
locale whose decimal radix character isn't a dot.  (e.g. no locales with
a comma).

10 years agolocale.c: Handle case where LC_ALL isn't "all"
Karl Williamson [Mon, 17 Feb 2014 05:06:03 +0000 (22:06 -0700)]
locale.c: Handle case where LC_ALL isn't "all"

Setting the LC_ALL locale category on NetBSD does not necessarily change
all the categories to the requested locale.  Sometimes the LC_COLLATE
category is set to POSIX.  I presume that is because collation has not
been defined for the given locale, so it uses a basic locale instead.
The code in locale.c that does locale initialization for the Perl
program at start-up, depended on LC_ALL setting all categories to the
same locale.

10 years agosv.h: Add comment
Karl Williamson [Sun, 16 Feb 2014 17:29:43 +0000 (10:29 -0700)]
sv.h: Add comment

There was recent confusion about this.

10 years agoAvoid recalculating sub name hash in util.c:get_db_sub
Father Chrysostomos [Mon, 17 Feb 2014 02:07:17 +0000 (18:07 -0800)]
Avoid recalculating sub name hash in util.c:get_db_sub

10 years agoClarify distinction between contents of dist/ and ext/.
James E Keenan [Tue, 11 Feb 2014 00:50:47 +0000 (01:50 +0100)]
Clarify distinction between contents of dist/ and ext/.

Amended with a suggestion from rjbs.

For: RT #120808

10 years ago[perl #121223] encourage use of PERL_NO_GET_CONTEXT
Tony Cook [Sun, 16 Feb 2014 22:57:53 +0000 (09:57 +1100)]
[perl #121223] encourage use of PERL_NO_GET_CONTEXT

10 years ago[perl #121223] explain PERL_NO_GET_CONTEXT a little
Tony Cook [Sun, 16 Feb 2014 22:54:42 +0000 (09:54 +1100)]
[perl #121223] explain PERL_NO_GET_CONTEXT a little

and tell the reader where to find the details.

10 years agoadd #define PERL_NO_GET_CONTEXT to ParseXS's pods
Daniel Dragan [Thu, 13 Feb 2014 00:07:56 +0000 (11:07 +1100)]
add #define PERL_NO_GET_CONTEXT to ParseXS's pods

Not using PERL_NO_GET_CONTEXT is for legacy or unmaintained pre-ithreads
code. New code should define it.

10 years ago[perl #121255] Call set-magic when setting $DB::sub
Father Chrysostomos [Sun, 16 Feb 2014 20:43:42 +0000 (12:43 -0800)]
[perl #121255] Call set-magic when setting $DB::sub

Otherwise UTF8 length caches will not be reset, resulting in panicks
when ${^UTF8CACHE} is -1 or wrongs answers from length($DB::sub) when
${^UTF8CACHE} is 1.

10 years agoExclude Perl_my_setlocale symbol where it's not defined.
Craig A. Berry [Sun, 16 Feb 2014 20:22:25 +0000 (14:22 -0600)]
Exclude Perl_my_setlocale symbol where it's not defined.

Because makedef.pl doesn't take into account the various ifdefs
in embed.fnc, it must repeat their logic by maintaining various
sets of platform-specific inclusions and exclusions.

Perl_my_setlocale was added in b385bb4ddcb for Win32 only, so we
shouldn't be telling the linker to export it except on Win32.

10 years agoUpdate Parse-CPAN-Meta to CPAN version 1.4410
Chris 'BinGOs' Williams [Sun, 16 Feb 2014 13:38:19 +0000 (13:38 +0000)]
Update Parse-CPAN-Meta to CPAN version 1.4410

  [DELTA]

1.4410    2014-02-16 00:47:48-05:00 America/New_York

    [INCOMPATIBLE CHANGES]

    - Dropped support for Perl's before v5.8.1 to ensure proper
      UTF-8 and IO layer support

    [CHANGED]

    - Updated CPAN::Meta::YAML prereq to 0.011 due to deprecation
      of 'errstr' and consistent use of exceptions

10 years agoperllocale: Corrections and nits
Karl Williamson [Sun, 16 Feb 2014 05:21:37 +0000 (22:21 -0700)]
perllocale: Corrections and nits

10 years agoperlfunc: Nit
Karl Williamson [Sun, 16 Feb 2014 05:18:43 +0000 (22:18 -0700)]
perlfunc: Nit

10 years agoRevert "Free up bit for regex ANYOF nodes"
Karl Williamson [Sun, 16 Feb 2014 04:59:51 +0000 (21:59 -0700)]
Revert "Free up bit for regex ANYOF nodes"

This reverts commit 34fdef848b1687b91892ba55e9e0c3430e0770f6, and
adds comments referring to it, in case it is ever needed.

10 years agoFree up bit for regex ANYOF nodes
Karl Williamson [Thu, 30 Jan 2014 03:42:33 +0000 (20:42 -0700)]
Free up bit for regex ANYOF nodes

This commit frees up a bit by using an extra regnode to pass the
information to the regex engine instead of the flag.  I originally
thought that if this was needed, it should be the ANYOF_ABOVE_LATIN1_ALL
bit, as that might speed some things up.  But if we need to do this
again by adding another node to get another bit, we want one that is
mutually exclusive of the first one we did, For otherwise we start
having to make 3 nodes instead of two to get the combinations:
 1 0
 0 1
 1 1

This combinatorial problem is avoided by using bits that are mutually
exclusive, which the ABOVE_LATIN1_ALL isn't, but the one freed by this
commit ANYOF_NON_UTF8_NON_ASCII_ALL is only set under /d matching, and
there are other bits that are set only under /l, so if we need to do
this again, we should use one of those.

I wrote this code when I thought I really needed a bit.  But since, I
have figured out a better way to get the bit needed now.  But I don't
want to lose this code to posterity, so this commit is being made long
enough to get the commit number, then it will be reverted, adding
comments referring to the commit number, so that it can easily be
reconstructed when necessary.

10 years agoalphabetise perldiag
Father Chrysostomos [Sun, 16 Feb 2014 04:40:15 +0000 (20:40 -0800)]
alphabetise perldiag

10 years agoext/POSIX/POSIX.xs: Add comments
Karl Williamson [Thu, 13 Feb 2014 00:04:52 +0000 (17:04 -0700)]
ext/POSIX/POSIX.xs: Add comments

If these few lines are uncommented, the isfoo() functions will no longer
return TRUE for an empty string input.  Since we decided to deprecate
them, it will be unlikely that we do this, but I had written this before
that, and even though it's trivial, I think it better to potentially
save a little work .

10 years agoext/POSIX/t/posix.t: White-space only
Karl Williamson [Thu, 13 Feb 2014 00:03:21 +0000 (17:03 -0700)]
ext/POSIX/t/posix.t: White-space only

Indent into a newly formed block