SH_PATH should be $targetsh, not $sh

Due to a small oversight, this was reverted in the last metaconfig
update, and was preventing backticks/system/exec/two-arg-pipe-open
from working in some Android devices.

(cherry picked from commit 0b0a0724169ff8771b00d92da1f2d8745c9eceb8)
make regen for uconfig.h

(cherry picked from commit 2473ac0469b66d799ee3e5bb3ca2cc722cb4a7a3)
Fix for [perl #121963] 5.20.0-RC1 can't compile on Android

On some native android builds, this was causing warnings and
possibly build errors before Config.pm was generated.

(cherry picked from commit e7d73da9c2d808c39145a762f6b4146a6d17b6b5)
Get rid of "grep empty(sub)expression" noise.

In OS X (and assumedly *BSD) Configure output starts with:

grep empty(sub)expression

apparently because plain 'grep' understands the 'os\(/\|\)2'
somewhat differently (BRE vs ERE, RTFM re_format(7))

Cure: redirect the stderr of grep to stdout (which is then promptly
redirected to /dev/null).  The grep will still fail, and not take
the OS/2 (or DJGPP) branch.

(cherry picked from commit 48a72c671eb9f7f8ec040f42bacfe62436e37ee1)
Give caretx.c an explicit rule in vms/descrip_mms.template.

Without an explicit rule it gets build with CFLAGS rather than
CORECFLAGS, which could make it miss important things, such as
PERL_CORE being defined.

(cherry picked from commit 878cc5f0586e69cae0c78f759b8790bfd7c07291)
evat => eval as found by Tom Hukins

(cherry picked from commit b488de02fc2144db024373ef65e4e25af3f350eb)
Correct architectures and versions for hints

Over time, OpenBSD has kept this up-to-date locally without enough
patches going upstream.

This should bring perl in sync with reality.

(cherry picked from commit 2b5735951688747a8a87926ebed2ae97609b0142)
Andrew Fresh is now a perl author

(cherry picked from commit e61ccd964839921b5f9ec9d1e9d648c4b24926a9)
[perl #121585] Configure shouldn't write source tree

(cherry picked from commit d611994aadec72a5ecb074ea6ec1fb111f5af31e)
temporary fix for [perl #121975] COW speedup lost after e8c6a474

Disable use of Perl_safesysmalloc_size by default. Only use it when PERL_USE_MALLOC_SIZE is defined.

Using Perl_safesysmalloc_size() perl cannot tell a deliberately preallocated buffer
which we probably dont want to COW from a malloc() preallocated buffer where we probably
dont care. Hopefully this fixes the slowdown observed on some platforms.

(cherry picked from commit ce861ea7963084a7fe72fbb5485e77bb85037b55)
when unCOWing a string, set SvCUR to 0

When a COW string is unCOWed, as well as setting SvPVX to NULL and SvLEN
to 0, set SvCUR to 0 too.

This is to avoid a later SvGROW on the same using the old SvCUR() value
to calculate a roundup to the buffer size.

Consider the following code:

    use Devel::Peek;
    for (1..3) {
        my $t;
        my $s = 'x' x 100;
        $t = $s;
        Dump $s;
    }

Looking at the LEN line of the Dump output, we got on 5.20.0:

  LEN = 102
  LEN = 135
  LEN = 135

and after this commit,

  LEN = 102
  LEN = 102
  LEN = 102

As well as wasting space, this extra LEN was then triggering the 'skip COW
if LEN >> CUR' mechanism, causing extra copies. See:

    [perl #121977] COWification seems expensive in PADMY variables

(cherry picked from commit a7ab896004fe7cc32eeddadf760d0829e9fed13d)
s///e on tainted utf8 strings got pos() messed up

RT #122148: In 5.20, commit 25fdce4a165 changed the way pos() was stored
in magic attached to SVs from being a byte offset to a char offset,
*except* that, for efficiency, strings being used for pattern matching
were kept as byte offsets (with a flag indicating thus), *except* where
the SV already had magic attached (such as taint, as in the bug report and
in this commit's test), in which case it kept it as chars.

The code that updated pos() after an iteration of s///e was faulty: the
string buffer it used for converting byte legnths to char lengths (via
utf8_length()) was the wrong buffer: rather than using the src string
being matched against, it was using the destination string being built up
via iterations of s///. Once double-byte utf8 chars were involved, all the
pos() calculations went wrong, and utf8 warnings started mysteriously
appearing.

(cherry picked from commit cda67c9995c6d90b71a0939aaae084e1869b8248)