This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
7 years agoGet t/uni/labels.t working under minitest
Father Chrysostomos [Mon, 1 Sep 2014 05:41:09 +0000 (22:41 -0700)]
Get t/uni/labels.t working under minitest

minitest can run before everything is built.  Hence, we need to make sure
the directories that buildcustomize.pl puts in @INC are not clobbered by
the test script.

7 years agoGet t/uni/gv.t working under minitest
Father Chrysostomos [Mon, 1 Sep 2014 05:40:39 +0000 (22:40 -0700)]
Get t/uni/gv.t working under minitest

minitest can run before everything is built.  Hence, we need to make sure
the directories that buildcustomize.pl puts in @INC are not clobbered by
the test script.

7 years agoGet t/uni/fold.t working under minitest
Father Chrysostomos [Mon, 1 Sep 2014 05:40:12 +0000 (22:40 -0700)]
Get t/uni/fold.t working under minitest

minitest can run before everything is built.  Hence, we need to make sure
the directories that buildcustomize.pl puts in @INC are not clobbered by
the test script.

7 years agoGet t/uni/class.t working under minitest
Father Chrysostomos [Mon, 1 Sep 2014 05:39:15 +0000 (22:39 -0700)]
Get t/uni/class.t working under minitest

minitest can run before everything is built.  Hence, we need to make sure
the directories that buildcustomize.pl puts in @INC are not clobbered by
the test script.

7 years agoGet t/uni/cache.t working under minitest
Father Chrysostomos [Mon, 1 Sep 2014 05:38:26 +0000 (22:38 -0700)]
Get t/uni/cache.t working under minitest

minitest can run before everything is built.  Hence, we need to make sure
the directories that buildcustomize.pl puts in @INC are not clobbered by
the test script.

7 years agoGet rxcode.t working under minitest
Father Chrysostomos [Mon, 1 Sep 2014 05:36:48 +0000 (22:36 -0700)]
Get rxcode.t working under minitest

minitest can run before everything is built.  Hence, we need to make sure
the directories that buildcustomize.pl puts in @INC are not clobbered by
the test script.

7 years agoGet reg_eval_scope.t working under minitest
Father Chrysostomos [Mon, 1 Sep 2014 05:36:00 +0000 (22:36 -0700)]
Get reg_eval_scope.t working under minitest

minitest can run before everything is built.  Hence, we need to make sure
the directories that buildcustomize.pl puts in @INC are not clobbered by
the test script.

7 years agoGet pat_re_eval.t working under minitest
Father Chrysostomos [Mon, 1 Sep 2014 05:34:41 +0000 (22:34 -0700)]
Get pat_re_eval.t working under minitest

minitest can run before everything is built.  Hence, we need to make sure
the directories that buildcustomize.pl puts in @INC are not clobbered by
the test script.

7 years agoGet tr.t working under minitest
Father Chrysostomos [Mon, 1 Sep 2014 05:33:22 +0000 (22:33 -0700)]
Get tr.t working under minitest

minitest can run before everything is built.  Hence, we need to make sure
the directories that buildcustomize.pl puts in @INC are not clobbered by
the test script.

7 years agoGet taint.t working under minitest
Father Chrysostomos [Mon, 1 Sep 2014 05:32:58 +0000 (22:32 -0700)]
Get taint.t working under minitest

minitest can run before everything is built.  Hence, we need to make sure
the directories that buildcustomize.pl puts in @INC are not clobbered by
the test script.

7 years agoGet sub.t working under minitest
Father Chrysostomos [Mon, 1 Sep 2014 05:32:25 +0000 (22:32 -0700)]
Get sub.t working under minitest

minitest can run before everything is built.  Hence, we need to make sure
the directories that buildcustomize.pl puts in @INC are not clobbered by
the test script.

7 years agoGet lc.t working under minitest
Father Chrysostomos [Mon, 1 Sep 2014 05:32:04 +0000 (22:32 -0700)]
Get lc.t working under minitest

minitest can run before everything is built.  Hence, we need to make sure
the directories that buildcustomize.pl puts in @INC are not clobbered by
the test script.

7 years agoGet eval.t working under minitest
Father Chrysostomos [Mon, 1 Sep 2014 05:30:55 +0000 (22:30 -0700)]
Get eval.t working under minitest

minitest can run before everything is built.  Hence, we need to make sure
the directories that buildcustomize.pl puts in @INC are not clobbered by
the test script.

7 years agoGet closure.t working under minitest
Father Chrysostomos [Mon, 1 Sep 2014 05:29:27 +0000 (22:29 -0700)]
Get closure.t working under minitest

minitest can run before everything is built.  Hence, we need to make sure
the directories that buildcustomize.pl puts in @INC are not clobbered by
the test script.  Also, we need to make sure that, when run from TEST, we
do actually include buildcustomize.pl.

7 years agoGet chdir.t working under minitest
Father Chrysostomos [Mon, 1 Sep 2014 05:10:00 +0000 (22:10 -0700)]
Get chdir.t working under minitest

minitest can run before everything is built.

chdir.t used to take that into account, but was not updated when dist/Cwd/
was renamed.

7 years agoPOSIX math: Use 1.0 - erf(x) for erfc().
Jarkko Hietaniemi [Wed, 3 Sep 2014 02:17:50 +0000 (22:17 -0400)]
POSIX math: Use 1.0 - erf(x) for erfc().

The newer method was only for x > 0.

7 years agoThe 'nv' here is not always a NV, so have our own format.
Jarkko Hietaniemi [Wed, 3 Sep 2014 02:13:05 +0000 (22:13 -0400)]
The 'nv' here is not always a NV, so have our own format.

(The added printing of the NV in case of frexp() mess-up caused
 -Wformat warnings.)

(One could argue for renaming the variable to be less confusing.)

7 years agoPOSIX math: nan(NULL) leads to...
Jarkko Hietaniemi [Wed, 3 Sep 2014 01:37:45 +0000 (21:37 -0400)]
POSIX math: nan(NULL) leads to...

Thou shalt not follow the NULL pointer,
for chaos and madness await thee at its end.

7 years agoPOSIX math: define the isless et al if necessary and feasible.
Jarkko Hietaniemi [Tue, 2 Sep 2014 22:53:18 +0000 (18:53 -0400)]
POSIX math: define the isless et al if necessary and feasible.

7 years agoPOSIX math: add tests.
Jarkko Hietaniemi [Wed, 3 Sep 2014 00:44:21 +0000 (20:44 -0400)]
POSIX math: add tests.

7 years agoPOSIX math: add isinf/isnan/isfinite tests.
Jarkko Hietaniemi [Wed, 3 Sep 2014 00:33:53 +0000 (20:33 -0400)]
POSIX math: add isinf/isnan/isfinite tests.

7 years agoPOSIX math: erfc implementation.
Jarkko Hietaniemi [Tue, 2 Sep 2014 23:47:11 +0000 (19:47 -0400)]
POSIX math: erfc implementation.

(Chiani, Dardari & Simon (2003), via Wikipedia)

7 years agoPOSIX math: looser error bound for erf test.
Jarkko Hietaniemi [Tue, 2 Sep 2014 23:36:35 +0000 (19:36 -0400)]
POSIX math: looser error bound for erf test.

7 years agoPOSIX math: more hypot tests.
Jarkko Hietaniemi [Tue, 2 Sep 2014 23:26:36 +0000 (19:26 -0400)]
POSIX math: more hypot tests.

7 years agoPOSIX math: isless etc tests.
Jarkko Hietaniemi [Tue, 2 Sep 2014 23:21:24 +0000 (19:21 -0400)]
POSIX math: isless etc tests.

7 years agoPOSIX math: better hypot.
Jarkko Hietaniemi [Tue, 2 Sep 2014 23:17:41 +0000 (19:17 -0400)]
POSIX math: better hypot.

7 years agoPOSIX math: erf implementation from http://www.johndcook.com/
Jarkko Hietaniemi [Tue, 2 Sep 2014 23:10:36 +0000 (19:10 -0400)]
POSIX math: erf implementation from johndcook.com/

(Also add sources to other formulas where they weren't obvious.)

7 years agoPOSIX math: Define my_fpclassify only if no c99_classify already.
Jarkko Hietaniemi [Tue, 2 Sep 2014 21:48:25 +0000 (17:48 -0400)]
POSIX math: Define my_fpclassify only if no c99_classify already.

("c99_classify already" = we saw HAS_FPCLASSIFY and fpclassify macro,
 which together smell like C99)

7 years agoThe VMS CRTL has lrint, but not llrint.
Craig A. Berry [Tue, 2 Sep 2014 23:51:04 +0000 (18:51 -0500)]
The VMS CRTL has lrint, but not llrint.

7 years agoBasic string-to-nv should equal floating point literals.
Jarkko Hietaniemi [Tue, 2 Sep 2014 11:42:24 +0000 (07:42 -0400)]
Basic string-to-nv should equal floating point literals.

(In my floating point adventures I managed to break this basic assumption,
 guard against it happening again.)

7 years agoavoid local *f = \&foo resetting the method cache
syber [Wed, 27 Aug 2014 21:05:41 +0000 (01:05 +0400)]
avoid local *f = \&foo resetting the method cache

{
    local *MyClass::func = sub {...}; # LINE A
    ...
} # LINE B

This example caused global method cache reset at both lines A and B
because glob_assign_ref and leave_scope thought that GV's GP refcnt was 2
(because of saving to Save Stack).

Issue has been fixed.
SAVEt_GVSLOT (on leave_scope) now requires refcnt > 2 to reset cache
globally).  Additionally, glob_assign_ref when GvINTRO is set temporarily
decrements gp's refcnt by 1.  This handles all common cases, however there
are still uncommon use cases when perl still resets cache globally, for
example:

{
    local *MyClass::func = sub {...}; # OK
    *MyClass::func = sub {...}; # OOPS :(
} # OK
or
{
    local *MyClass::func = sub {...}; # OK
    {
        local *MyClass::func = sub {...}; # OOPS :(
    } # OOPS :(
} # OK

* OOPS is a line where global cache reset occurs
* OK - one package cache reset

7 years agoAdd test for \p{} failing silently
Father Chrysostomos [Tue, 2 Sep 2014 05:51:10 +0000 (22:51 -0700)]
Add test for \p{} failing silently

This tests the fix added in commit 2db3e09128.

Only after writing what I said in
<20140901194542.21940.qmail@lists-nntp.develooper.com> did I realise
that this is actually trivial to test.

7 years agoFix thinko in toke.c in 211a434
Father Chrysostomos [Tue, 2 Sep 2014 05:36:17 +0000 (22:36 -0700)]
Fix thinko in toke.c in 211a434

Oops.  We can’t fiddle with the rv2cv op’s GV kid if it actually a
padcv op.  Don’t even look at it when handling a lexical sub call,
because we don’t need it anyway.

This should hopefully mitigate valgrind complaints.

7 years agoisnormal macro in fp.h broken on VMS.
Craig A. Berry [Tue, 2 Sep 2014 02:45:10 +0000 (21:45 -0500)]
isnormal macro in fp.h broken on VMS.

It appears to have an extra closing parenthesis, which means any
use of it fails to compile.  Ouch:

  $ type abby_normal.c
  #include <fp.h>
  int main() {
      double pi = 3.414;
      int normality = isnormal(pi);
  }
  $ cc/float=ieee abby_normal

      int normality = isnormal(pi);
  ....................^
  %CC-E-NOSEMI, Missing ";".
  at line number 4 in file DSA23:[TEST]abby_normal.c;1

So don't use it but rather fall back to a solution based on
fp_classify.

Of course it's supposed to be in math.h, not fp.h, but I digress.

7 years agoPOSIX math: Comment tweaks.
Jarkko Hietaniemi [Tue, 2 Sep 2014 00:12:47 +0000 (20:12 -0400)]
POSIX math: Comment tweaks.

7 years agoPOSIX math: lgammal, not gammal.
Jarkko Hietaniemi [Tue, 2 Sep 2014 00:08:45 +0000 (20:08 -0400)]
POSIX math: lgammal, not gammal.

7 years agoMake certain pp_sin result is always initialized.
Jarkko Hietaniemi [Tue, 2 Sep 2014 00:06:39 +0000 (20:06 -0400)]
Make certain pp_sin result is always initialized.

7 years agointroduce gv_stashsvpvn_cached()
syber [Mon, 1 Sep 2014 21:47:54 +0000 (23:47 +0200)]
introduce gv_stashsvpvn_cached()

Wrap gv_stashpvn_internal() with a routine which caches
what it does, and rework gv_stashsv() and gv_stashpvn()
to use the cached codepath.

Also rework the documentation of gv_stashsv() and gv_stashpvn()
that the gv_stashsv() is prefered as there is a mechanism to cache
the hash value associated with the name which requires an SV
to passed in as an argument for caching purposes.

Note this is a reworked version of sybers original patch.

7 years agoRename S_stashpvn to S_gv_stashpvn_internal and add to embed.fnc
Yves Orton [Mon, 1 Sep 2014 22:09:01 +0000 (00:09 +0200)]
Rename S_stashpvn to S_gv_stashpvn_internal and add to embed.fnc

S_stashpvn was not added to embed.fnc properly, and is named contrary
to general expectations of the Perl internals.

This fixes that, there should be no other functional differences.

7 years agoPOSIX math: problems found in Win32.
Jarkko Hietaniemi [Mon, 1 Sep 2014 21:45:49 +0000 (17:45 -0400)]
POSIX math: problems found in Win32.

7 years agoIgnore warning about unused result since it is desperation time.
Jarkko Hietaniemi [Mon, 1 Sep 2014 21:22:03 +0000 (17:22 -0400)]
Ignore warning about unused result since it is desperation time.

7 years agoHP-UX: more robust (10.X) and verbose test skippage.
Jarkko Hietaniemi [Mon, 1 Sep 2014 20:26:31 +0000 (16:26 -0400)]
HP-UX: more robust (10.X) and verbose test skippage.

7 years agoStatic initialization using 1/0 or 0/0 not C89.
Jarkko Hietaniemi [Mon, 1 Sep 2014 19:55:15 +0000 (15:55 -0400)]
Static initialization using 1/0 or 0/0 not C89.

7 years agoUpdate ExtUtils::CBuilder to version 0.280219. Correct one test.
Alberto Simões [Mon, 1 Sep 2014 18:23:26 +0000 (14:23 -0400)]
Update ExtUtils::CBuilder to version 0.280219. Correct one test.

Switch to using VERSION_FROM in Makefile.PL.

For: RT #122675

Add update to ExtUtils::CBuilder to perldelta.

7 years agolib/utf8_heavy.pl: Don't return empty under miniperl
Karl Williamson [Mon, 1 Sep 2014 18:11:48 +0000 (12:11 -0600)]
lib/utf8_heavy.pl: Don't return empty under miniperl

When run under miniperl before mktables has generated its tables , this
program would return empty for Unicode properties instead of an error
condition.  The problem was that when it detected this, it just
continued on to the rest of the code which assumed it had found an empty
table, instead of no table at all.  The solution is to return an e error
when one is detected.

7 years agoPOSIX math: First cut at C99 math docs.
Jarkko Hietaniemi [Mon, 1 Sep 2014 03:07:58 +0000 (23:07 -0400)]
POSIX math: First cut at C99 math docs.

Undoubtedly stuff missing and incorrect.  And typod.

7 years agoPOSIX math: Perl_ldexp, not Perl_ldexpl.
Jarkko Hietaniemi [Mon, 1 Sep 2014 17:25:42 +0000 (13:25 -0400)]
POSIX math: Perl_ldexp, not Perl_ldexpl.

7 years agoPOSIX math: define the fpclassify returns always if needed.
Jarkko Hietaniemi [Mon, 1 Sep 2014 17:03:53 +0000 (13:03 -0400)]
POSIX math: define the fpclassify returns always if needed.

(Even without HAS_FPCLASSIFY.)

7 years agoPOSIX math: Initialize RETVAL to NV_NAN/-1.
Jarkko Hietaniemi [Mon, 1 Sep 2014 13:29:30 +0000 (09:29 -0400)]
POSIX math: Initialize RETVAL to NV_NAN/-1.

7 years agoPOSIX math: M_LN10 was missing.
Jarkko Hietaniemi [Mon, 1 Sep 2014 12:51:39 +0000 (08:51 -0400)]
POSIX math: M_LN10 was missing.

7 years agoHP-UX: missing C99 math.
Jarkko Hietaniemi [Mon, 1 Sep 2014 17:15:31 +0000 (13:15 -0400)]
HP-UX: missing C99 math.

7 years agoHP-UX: 10.X doesn't really have isfinite().
Jarkko Hietaniemi [Mon, 1 Sep 2014 16:13:03 +0000 (12:13 -0400)]
HP-UX: 10.X doesn't really have isfinite().

7 years agoHP-UX: 10.20 math functions don't generate infinities.
Jarkko Hietaniemi [Mon, 1 Sep 2014 15:30:57 +0000 (11:30 -0400)]
HP-UX: 10.20 math functions don't generate infinities.

So skip the tests that attempt creating such.

7 years agoUse Perl_isfinite() to guard the frexpl.
Jarkko Hietaniemi [Mon, 1 Sep 2014 16:17:02 +0000 (12:17 -0400)]
Use Perl_isfinite() to guard the frexpl.

Also, print out the deadly nv.

7 years agoPerl_isinf and Perl_isfinite fallbacks.
Jarkko Hietaniemi [Mon, 1 Sep 2014 14:06:10 +0000 (10:06 -0400)]
Perl_isinf and Perl_isfinite fallbacks.

(We have so many fallbacks that some of them probably never deploy.)

7 years agoDo not use HUGE_VAL/VALL for NV_INF.
Jarkko Hietaniemi [Mon, 1 Sep 2014 13:55:23 +0000 (09:55 -0400)]
Do not use HUGE_VAL/VALL for NV_INF.

Because some platforms (like HP-UX 10.*) have HUGE_VAL as DBL_MAX,
which, while large, is not quite the infinity.  So have infinity
own our very own.

Similarly for NV_NAN.

7 years agoSome missing c99_xxx functions for POSIX.xs on VMS.
Craig A. Berry [Mon, 1 Sep 2014 16:11:56 +0000 (11:11 -0500)]
Some missing c99_xxx functions for POSIX.xs on VMS.

7 years agofix fp_classify in perl.h for VMS.
Craig A. Berry [Mon, 1 Sep 2014 16:07:47 +0000 (11:07 -0500)]
fix fp_classify in perl.h for VMS.

We have to include <fp.h> as well for the macros we're testing
for to be defined.

7 years agoRevert "sv_grow: performance improvement for short strings"
Father Chrysostomos [Mon, 1 Sep 2014 15:23:00 +0000 (08:23 -0700)]
Revert "sv_grow: performance improvement for short strings"

This reverts commit 880c169bb2bd5e6e9ae996842d6860bf88d28585.

7 years agoperldelta: Fix typo
Karl Williamson [Mon, 1 Sep 2014 14:46:22 +0000 (08:46 -0600)]
perldelta: Fix typo

7 years agoPATCH: [perl #122655] 5.20 regression: '"X" !~ /[x]/i'
Karl Williamson [Sat, 30 Aug 2014 16:44:01 +0000 (10:44 -0600)]
PATCH: [perl #122655] 5.20 regression: '"X" !~ /[x]/i'

This problem occurs only when the pattern is UTF-8, contains a single ASCII
lowercase letter.  It does not match its uppercase counterpart.

7 years agorelease schedule: put Abigail on for October
Ricardo Signes [Mon, 1 Sep 2014 13:55:45 +0000 (09:55 -0400)]
release schedule: put Abigail on for October

7 years agoFix assertion failure with our subs and constants
Father Chrysostomos [Mon, 1 Sep 2014 06:14:20 +0000 (23:14 -0700)]
Fix assertion failure with our subs and constants

The code path that looks up ‘our’ subs was not vivifying GVs in
the symbol table, and it was assuming that anything it found
would be a GV.

Constants created by ‘use constant’ are stored as simple scalar refs,
when possible, instead of GVs with CVs.

So GvCV() was called on an RV, and blew up.

$ ./miniperl -Ilib -Mfeature=lexical_subs -e 'our sub foo; BEGIN { delete $::{foo}; } use constant foo=>3; warn foo()'
The lexical_subs feature is experimental at -e line 1.
Assertion failed: (SvTYPE(_gvgp) == SVt_PVGV || SvTYPE(_gvgp) == SVt_PVLV), function Perl_yylex, file toke.c, line 6566.
Abort trap: 6

7 years agoembed.fnc: fix comment
David Mitchell [Mon, 1 Sep 2014 13:21:18 +0000 (14:21 +0100)]
embed.fnc: fix comment

spotted by bulk88

7 years agoPOSIX math: M_SQRT2 and M_2_SQRTPI were misspelled.
Jarkko Hietaniemi [Mon, 1 Sep 2014 01:53:39 +0000 (21:53 -0400)]
POSIX math: M_SQRT2 and M_2_SQRTPI were misspelled.

And therefore not constant-exported.

7 years agoperl.c: Improve buildcustomize error message
Father Chrysostomos [Mon, 1 Sep 2014 01:20:28 +0000 (18:20 -0700)]
perl.c: Improve buildcustomize error message

buildcustomize.pl was being loaded with generated code that died if
‘lib/buildcustomize.pl’ existed but do-file failed.  $@ was used as
the error message.

If the file does not exist (do-file searching @INC), then $@ is empty
and the error is in $!.  Before 9054c817, this is what we would get:

$ ./miniperl -T -Ilib -e0
Died.
BEGIN failed--compilation aborted.

I fixed that in 9054c817 so there would be no error (by adding an ini-
tial ‘./’ to the path.)

That message was rather baffling.  It would have been easier to track
down the cause if I had seen something like this:

$ ./miniperl -T -Ilib -e0
lib/buildcustomize.pl: No such file or directory.
BEGIN failed--compilation aborted.

This commit changes the generated code to output $! like that if $@ is
empty, in case a similar bug occurs again.

7 years agoAIX: allow one to keep long doubles, even if broken.
Jarkko Hietaniemi [Mon, 1 Sep 2014 00:08:10 +0000 (20:08 -0400)]
AIX: allow one to keep long doubles, even if broken.

7 years agoPOSIX math: Solaris needs -lsunmath.
Jarkko Hietaniemi [Sun, 31 Aug 2014 21:37:28 +0000 (17:37 -0400)]
POSIX math: Solaris needs -lsunmath.

7 years agoPOSIX math: use POSIX now imports Inf and NaN.
Jarkko Hietaniemi [Sun, 31 Aug 2014 20:02:42 +0000 (16:02 -0400)]
POSIX math: use POSIX now imports Inf and NaN.

The import illusion is not flawless: print -Inf
Ambiguous use of -Inf resolved as -&Inf() at -e line 1.
-Inf
Would need toke.c trip, I guess.

Also, try definining the C99 INFINITY and NAN even if <math.h> didn't.

7 years agoPOSIX math: fpclassify continues.
Jarkko Hietaniemi [Sun, 31 Aug 2014 19:40:51 +0000 (15:40 -0400)]
POSIX math: fpclassify continues.

7 years agoPOSIX math: Bessel fixes.
Jarkko Hietaniemi [Sun, 31 Aug 2014 19:07:13 +0000 (15:07 -0400)]
POSIX math: Bessel fixes.

7 years agoPOSIX math: todo for emulating fegetround() with fpgetround().
Jarkko Hietaniemi [Sun, 31 Aug 2014 15:03:48 +0000 (11:03 -0400)]
POSIX math: todo for emulating fegetround() with fpgetround().

7 years agoPOSIX math: Configure scan fpgetround
Jarkko Hietaniemi [Sun, 31 Aug 2014 14:51:40 +0000 (10:51 -0400)]
POSIX math: Configure scan fpgetround

Legacy BSD way of fegetround.

7 years agoPOSIX math: lrint and rint emulations.
Jarkko Hietaniemi [Sat, 30 Aug 2014 14:34:41 +0000 (10:34 -0400)]
POSIX math: lrint and rint emulations.

7 years agoPOSIX math: Add fegetround() and fesetround().
Jarkko Hietaniemi [Sat, 30 Aug 2014 13:56:51 +0000 (09:56 -0400)]
POSIX math: Add fegetround() and fesetround().

7 years agoPOSIX math: More handling of legacy implementations.
Jarkko Hietaniemi [Sat, 30 Aug 2014 13:28:43 +0000 (09:28 -0400)]
POSIX math: More handling of legacy implementations.

7 years agoPOSIX math: Configure scan d_fegetround and i_fenv.
Jarkko Hietaniemi [Sat, 30 Aug 2014 13:17:11 +0000 (09:17 -0400)]
POSIX math: Configure scan d_fegetround and i_fenv.

7 years agoPOSIX math: fpclassify emulation.
Jarkko Hietaniemi [Sat, 30 Aug 2014 12:54:19 +0000 (08:54 -0400)]
POSIX math: fpclassify emulation.

7 years agoPOSIX math: Portability emulations and constants.
Jarkko Hietaniemi [Sat, 30 Aug 2014 02:11:58 +0000 (22:11 -0400)]
POSIX math: Portability emulations and constants.

Plus fix the cmp_ok tests which had epsilon 18 magnitudes off.
(Didn't cause any false positives, luckily.)

7 years agoPOSIX math: HP-UX exceptions.
Jarkko Hietaniemi [Sat, 30 Aug 2014 00:31:56 +0000 (20:31 -0400)]
POSIX math: HP-UX exceptions.

7 years agoPOSIX math: Have only one not_here for each API.
Jarkko Hietaniemi [Fri, 29 Aug 2014 18:56:43 +0000 (14:56 -0400)]
POSIX math: Have only one not_here for each API.

7 years agoPOSIX math: Win32 shuffling.
Jarkko Hietaniemi [Fri, 29 Aug 2014 14:38:56 +0000 (10:38 -0400)]
POSIX math: Win32 shuffling.

7 years agoPOSIX math: Use HAS_ACOSH to enable/disable the C99 math.
Jarkko Hietaniemi [Fri, 29 Aug 2014 13:52:58 +0000 (09:52 -0400)]
POSIX math: Use HAS_ACOSH to enable/disable the C99 math.

7 years agoPOSIX math: Skip the POSIX C99 math tests if no acosh().
Jarkko Hietaniemi [Fri, 29 Aug 2014 13:46:06 +0000 (09:46 -0400)]
POSIX math: Skip the POSIX C99 math tests if no acosh().

7 years agoPOSIX math: Configure scan for acosh.
Jarkko Hietaniemi [Fri, 29 Aug 2014 13:42:58 +0000 (09:42 -0400)]
POSIX math: Configure scan for acosh.

7 years agoPOSIX math: Add more C99 math tests.
Jarkko Hietaniemi [Fri, 29 Aug 2014 13:37:20 +0000 (09:37 -0400)]
POSIX math: Add more C99 math tests.

(Note: these all will fail if we don't have C99 math.  Duh.)

7 years agoPOSIX math: Hopefully better use of Configure symbols.
Jarkko Hietaniemi [Fri, 29 Aug 2014 13:20:43 +0000 (09:20 -0400)]
POSIX math: Hopefully better use of Configure symbols.

7 years agoPOSIX math: Configure scan for j0 and j0l.
Jarkko Hietaniemi [Fri, 29 Aug 2014 13:01:36 +0000 (09:01 -0400)]
POSIX math: Configure scan for j0 and j0l.

(j0 is canary forthe  Bessel functions, common math.h extensions,
 not dependent on C99, j0l is its long double version.)

7 years agoPOSIX math: Add FP_ILOGB0 and FP_ILOGBNAN.
Jarkko Hietaniemi [Fri, 29 Aug 2014 12:21:46 +0000 (08:21 -0400)]
POSIX math: Add FP_ILOGB0 and FP_ILOGBNAN.

7 years agoPOSIX math: Implement glue for the C99 math functions.
Jarkko Hietaniemi [Thu, 28 Aug 2014 00:52:39 +0000 (20:52 -0400)]
POSIX math: Implement glue for the C99 math functions.

Plus the Bessel functions j0, j1, jn, y0, y1, yn: common extensions
from BSD/SVID/XPG4.

Plus the constants INFINITY/NAN.

7 years agoPOSIX math: Add M_ constants like M_PI.
Jarkko Hietaniemi [Thu, 28 Aug 2014 00:33:55 +0000 (20:33 -0400)]
POSIX math: Add M_ constants like M_PI.

7 years ago[perl #122669] Don’t taint at compile time
Father Chrysostomos [Sun, 31 Aug 2014 21:10:45 +0000 (14:10 -0700)]
[perl #122669] Don’t taint at compile time

 #!perl -T

 # tainted constant
 use constant K=>$^X;

 # Just reading the constant for the sake of folding can enabled
 # taintedness at compile time.
 0 if K;

 # Taintedness is still on when the ‘strict.pm’ SV is created, so
 # require croaks on it (‘Insecure dependency’).
 use strict;

The fix is simply not to propagate taintedness at compile time.
Hence, the value of K will still be tainted at run time (require(K)
croaks), but just reading the value of K at compile time won’t taint
subsequent string literals (or barewords treated as strings).

‘Compile time’ here is relative:  Taintedness still wafts about as
usual when BEGIN blocks are executed, because code is actually run-
ning.  It’s when code is being parsed that propagation is disabled.

The reason taint propagation could span across statements at compile
time was that *execution* of a new statement resets taintedness,
whereas parsing is oblivious to it.

7 years agoLet taint.t run under miniperl
Father Chrysostomos [Sun, 31 Aug 2014 20:40:30 +0000 (13:40 -0700)]
Let taint.t run under miniperl

‘use re taint;’ doesn’t load re.xs, and hasn’t for a long time.

7 years agotaint.t: Fix skip count
Father Chrysostomos [Sun, 31 Aug 2014 20:39:57 +0000 (13:39 -0700)]
taint.t: Fix skip count

7 years agoGet ‘./miniperl -Ilib -T’ working
Father Chrysostomos [Sun, 31 Aug 2014 20:11:03 +0000 (13:11 -0700)]
Get ‘./miniperl -Ilib -T’ working

If the first directory included via -I contains buildcustomize.pl,
then miniperl will try to load it at startup.  This allows the build
process to access all the necessary directories, because
buildcustomize.pl fills in @INC.

This was not working under taint mode, making it a pain for me to
diagnose tainting bugs with miniperl (which builds faster than perl
proper, obviously).

It failed because buildcustomize.pl is loaded with generated code that
does ‘do "lib/buildcustomize.pl"’ (where ‘lib’ is taken from -Ilib),
but do-file searches @INC, which does not include the current direc-
tory under taint mode.

The easiest solution here is to add ‘./’ to the beginning of the path.
It is unlikely that anyone is using miniperl -I/... (with an absolute
path), and miniperl is only supposed to be used for building or devel-
oping perl, anyway.

7 years agoperlsec: Another typo
Father Chrysostomos [Sun, 31 Aug 2014 19:58:37 +0000 (12:58 -0700)]
perlsec: Another typo

7 years agoperlsec: Typo
Father Chrysostomos [Sun, 31 Aug 2014 19:55:22 +0000 (12:55 -0700)]
perlsec: Typo

7 years agoperlsec: Consistent spaces after dots
Father Chrysostomos [Sun, 31 Aug 2014 19:55:12 +0000 (12:55 -0700)]
perlsec: Consistent spaces after dots

7 years agoperldelta for 59e6df9f1cf
Father Chrysostomos [Sun, 31 Aug 2014 18:15:37 +0000 (11:15 -0700)]
perldelta for 59e6df9f1cf

7 years agoperldelta for 172a6a76e8c
Father Chrysostomos [Sun, 31 Aug 2014 18:11:33 +0000 (11:11 -0700)]
perldelta for 172a6a76e8c