Benchmark.pm: bail out earlier on zero delta

countit(), which runs code for $n seconds, performs an initial
set of calibration loops to find out roughly how many iterations
are required to burn 0.1 CPU secs more in the code loop than in the empty
loop (which is then used to guesstimate how many iterations to do for the
main loop).

This calibration is designed to bail out if we consistently get <= 0
difference between the empty loop and the code loop; however, this
bailout can take too long: it looks for a run of 17 *consecutive* zero
deltas during 2048, 4096,8192,... iterations, which means it won't fail
until approx 131 million empty + code iterations are run, even if
the zeroes are consecutive. Of course if just by random noise one delta
is infinitesimally > 0, then the count is reset and the exponential count
continues.

The net effect of this is that the calibration loop can loop forever on
'small' code.

This commit makes it additionally bail out of the calibration loop if
running the iterations for a particular value of N takes more than 8
CPU seconds, while still giving zero delta.
Benchmark.t: avoid ultra-lightweight code

Some tests benchmarked the code '$i++', which is so lightweight that it
could trigger the die "Timing is consistently zero in estimation loop"
in Benchmark.pm.

So make the code slightly more heavyweight.
make sv_2bool_flags() non-recursive on overload

When Perl_sv_2bool_flags() has an overloaded arg, it calls SvTRUE()
on the SV returned from the overload method. This indirectly calls
sv_2bool_flags() again.

Change it so that sv_2bool_flags() just iterates the new overload value
each time.

2 callsites were converted to gotos. A SvTRUE_common was expanded so goto
can be used.  This function's machine code size on VC2003 32 bits dropped
by 0x24 bytes after this patch.
WinCE Makefile and make_ext.pl general and XS fixes

On a WinCE build. On the 2nd nmake run, using Makefile.ce, eventually calls
the Extensions target which calls make_ext.pl. What happens is nmake for CE
for each module is called on the Desktop per module makefile from the
earlier Desktop build. Since the Desktop Perl already was built
sucessfully, all rules/deps are met in the Desktop per module makefile, and
nothing happens during the module building phase for a CE build. Previously
I used external file management tools to delete the per module Makefiles
before running Makefile.ce.

*make_ext.pl
- implement deleting and rebuilding the per module makefile on a Cross
  build
- use constants for constant folding, there are opportunities for other
  variables to be converted to constants in the future
- fix a bug from commit baff067e71 where unlink() on a file with an open
  handle ($mfh) didn't delete the file from disk and a new per module
  makefile would be not be built by make_ext.pl later since the per module
  makefile was still on disk. This was observed on Win32. Also harden the
  unlink code with a new _unlink sub that is fatal if the file is still on
  disk after unlink supposedly deleted it.
- var $header and the quotemeta is because of an issue in Perl #119793

*Makefile.ce
- bring the debugging symbol generation flags and optimization flags
  to be closer to a Dekstop VC Perl build
- ICWD is obsolete as of commit f6b3c354c9 , remove it
- MINIMOD is obsolete as of commit 7b4d95f74b , remove it
- make a poisoned config.h so if there is a XS building mixup between
  a desktop and CE perl, the poisoned config.h for CE will stop the build
  gracefully
- $(MINIPERL) has never been defined in Makefile.ce from day 1 (10 years)
  replace with $(HPERL) everywhere, this was causing things to not run
  silently since $(MINIPERL) was empty string. Use HPERL instead of
  MINIPERL to allow flexibility to use the full perl binary if necessery
  one day
- better cleaning on root makefile clean target

*win32/win32.h
*win32/win32iop.h
- silence alot of redefinition warnings which gave pages of warnings on
  each WinCE compliand

*mg.c
- win32_get_errno is only on WIN32 build not WINCE

a "nmake -f Makefile.ce all" will now build the CE interp and all modules
in 1 shot with no user intervention
.gitignore Win32's miniperl object files

Comments from the committer:
win32/mini/*.obj (and hence win32/mini/ since it contains nothing other than
*.obj) should be .gitignored by the top-level .gitignore file anyway, but
git clean -dfX doesn't remove them without this patch. (git clean -dfx does,
but some developers want to keep untracked files other than build products
explicitly listed by .gitignore files.)
Porting/Maintainers.pl - Remove redundant EXCLUDED files

Also add extra verbose output to Porting/core-cpan-diff to identify such
cases.
WinCE Perl EVC4 support

- CCTYPE has always been empty string in Makefile.ce, makedef.pl does not
  complain about this, but it is a bug, so fix it

- create a profile for a EVC4 arm build

- put -GS- and -GL flags into compiler version specific defs so VC6 era
  EVC4 will work

- don't delete ..\lib\Config.pm, it was made by win32/Makefile, for a
  Desktop Perl, deleting this breaks miniperl when it loads its pure perl
  modules for cross MakeMaker module building, and requires rebuilding the
  Desktop Perl so miniperl works again. CE Perl has its Config.pm in the
  xlib\$(MACHINE) dir
perldelta for 27329181e3 and 2c8bbb43f3
Unbreak -bareword under strict+integer

Commit 077da62ff9 was not supposed to change behaviour, but only
remove logic rendered unnecessary two commits earlier in 1c2b3fd6f10.

But the special stricture exception for negation was in the same func-
tion (S_op_integerize) which applied it to OP_NEGATE, but now needed
to apply it to OP_I_NEGATE, too.
spurious "Use of "-x" without parentheses" mesg

RT #120288.

Something like '-X' at the start of a line (where X is one char, but not a
filetest operator) was giving a spurious

    Warning: Use of "-a" without parentheses is ambiguous

error. This was because the toker was provisionally marking the -a as the
last encountered unary operator (PL_last_uni), then not unmarking it when
it found that that it wasn't in fact a filetest operator.
Add support for building with Visual C++ 2013

Two tests (t/io/fs.t and cpan/HTTP-Tiny/t/110_mirror.t) fail on my system,
currently in Daylight Saving Time, both due to times written/read by
utime()/stat() being off by one hour...

Not sure what the issue is yet, but I've reproduced it in this C program:

#include <stdio.h>
#include <sys/stat.h>
#include <sys/utime.h>
void main(void) {
  struct _utimbuf ut;
  struct _stat st;
  time_t t;
  t = 760060800;
  printf("Setting: %ld\n", t);
  ut.actime = t;
  ut.modtime = t;
  if (_utime("test.c", &ut) == -1) {
    perror("_utime failed\n");
    return;
  }
  if (_stat("test.c", &st) != 0) {
    perror("_stat failed\n");
    return;
  }
  printf("  atime: %ld\n", st.st_atime);
  printf("  mtime: %ld\n", st.st_mtime);
}

which outputs

Setting: 760060800
  atime: 760057200
  mtime: 760057200

with VC++ 2013, instead of

Setting: 760060800
  atime: 760060800
  mtime: 760060800

like Visual C++ 6.0 through 2012 all do.
refactor sv_add_backref

-don't assign NULL twice to var mg, seen in machine code
-use sv_magicext to get MAGIC * instead of a 2nd call to mg_find, less
 passes through the linked list is faster
-move the mg_flags MGf_REFCOUNTED statement to before av, to reduce scope
 of liveness for var mg, it is never used again in the function
-av can not be null since it was just created, use
 SvREFCNT_inc_simple_void_NN
-on a tsv, that is being upgraded to be an AV backref holder, call
 av_extend only once with the correct slice count based on whether tsv was
 a SV backref holder or not previously
-since on a newly AV backref tsv, the number of backrefs will only be 1 or
 2, and if we made an AV type backref holder, doing the SV type
 optimization is now impossible, so don't check av for NULL when we know
 it wont be if we just made the AV, and don't do the bounds check and 2nd
 av_extend either since the AV is new and under our control
-if tsv is already an AV type backref, the AV can have 1 to infinity
 elements so do the bounds check and av_extend as before

It is intentional that on the new AV type holder branch, that after
"av_extend(av, *svp ? 2 : 1);" there are no further function calls in the
execution path until the return.
correct POD for SvIsCOW, it returns a U32
Make B/Deparse handle unicode regexes

[perl #120182]
the precomp B::OP method was returning a non-UTF8 string even if the
regex was utf8
stdhandle.t: convert to use Test::More

print "ok 13\n" is *so* 1990's.
stdhandle.t: unlink the right file.

It writes to "afile", but initially deleted "afile.new" if it already
existed.
Tie::StdHandle appends extra copies of $\ to output

[perl #120202]

The following code demonstrates the problem:

    use Tie::Handle;

    my $out = do { no warnings 'once'; \ local *HANDLE };
    tie *$out, 'Tie::StdHandle', '>&', \ *STDOUT or die;

    $\ = "haha\n";
    print $out "hihi\n";

which prints

    hihi
    haha
    haha

The string in $\ has been added twice, once explicitly by
Tie::Handle::PRINT and another time implicitly by the use of
(CORE::) print in Tie::StdHandle::WRITE.

The bug also affects the use of say() with tied handles where a spurious
newline is added by the same effect.

[ test added by davem ]
Tie::StdHandle::WRITE: handle offset

the WRITE method was ignoring its offset argument.
bump Tie::StdHandle version

after recent fixes
Minor bignum POD fix (capitalisation).