summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl/lib/POSIX.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/tlperl/lib/POSIX.pm')
-rw-r--r--Master/tlpkg/tlperl/lib/POSIX.pm41
1 files changed, 32 insertions, 9 deletions
diff --git a/Master/tlpkg/tlperl/lib/POSIX.pm b/Master/tlpkg/tlperl/lib/POSIX.pm
index 78ffe2f3183..6fc0e7518e0 100644
--- a/Master/tlpkg/tlperl/lib/POSIX.pm
+++ b/Master/tlpkg/tlperl/lib/POSIX.pm
@@ -4,7 +4,7 @@ use warnings;
our ($AUTOLOAD, %SIGRT);
-our $VERSION = '1.38_03';
+our $VERSION = '1.53_01';
require XSLoader;
@@ -151,7 +151,7 @@ my %reimpl = (
exit => 'status => CORE::exit($_[0])',
getenv => 'name => $ENV{$_[0]}',
system => 'command => CORE::system($_[0])',
- strerror => 'errno => local $! = $_[0]; "$!"',
+ strerror => 'errno => BEGIN { local $!; require locale; locale->import} my $e = $_[0] + 0; local $!; $! = $e; "$!"',
strstr => 'big, little => CORE::index($_[0], $_[1])',
chmod => 'mode, filename => CORE::chmod($_[0], $_[1])',
fstat => 'fd => CORE::open my $dup, "<&", $_[0]; CORE::stat($dup)', # Gross.
@@ -234,7 +234,7 @@ sub sprintf {
}
sub load_imports {
-our %EXPORT_TAGS = (
+my %default_export_tags = (
assert_h => [qw(assert NDEBUG)],
@@ -296,8 +296,13 @@ our %EXPORT_TAGS = (
LC_MONETARY LC_NUMERIC LC_TIME NULL
localeconv setlocale)],
- math_h => [qw(HUGE_VAL acos asin atan ceil cosh fabs floor fmod
- frexp ldexp log10 modf pow sinh tan tanh)],
+ math_h => [qw(FP_ILOGB0 FP_ILOGBNAN FP_INFINITE FP_NAN FP_NORMAL
+ FP_SUBNORMAL FP_ZERO
+ M_1_PI M_2_PI M_2_SQRTPI M_E M_LN10 M_LN2 M_LOG10E M_LOG2E
+ M_PI M_PI_2 M_PI_4 M_SQRT1_2 M_SQRT2
+ HUGE_VAL INFINITY NAN
+ acos asin atan ceil cosh fabs floor fmod
+ frexp ldexp log10 modf pow sinh tan tanh)],
pwd_h => [],
@@ -384,18 +389,36 @@ our %EXPORT_TAGS = (
utime_h => [],
);
-# Exporter::export_tags();
+my %other_export_tags = (
+ fenv_h => [qw(
+ FE_DOWNWARD FE_TONEAREST FE_TOWARDZERO FE_UPWARD fegetround fesetround
+ )],
+
+ math_h_c99 => [ @{$default_export_tags{math_h}}, qw(
+ Inf NaN acosh asinh atanh cbrt copysign erf erfc exp2 expm1 fdim fma
+ fmax fmin fpclassify hypot ilogb isfinite isgreater isgreaterequal
+ isinf isless islessequal islessgreater isnan isnormal isunordered j0 j1
+ jn lgamma log1p log2 logb lrint nan nearbyint nextafter nexttoward
+ remainder remquo rint round scalbn signbit tgamma trunc y0 y1 yn
+ )],
+
+ stdlib_h_c99 => [ @{$default_export_tags{stdlib_h}}, 'strtold' ],
+);
+
{
# De-duplicate the export list:
- my %export;
- @export{map {@$_} values %EXPORT_TAGS} = ();
+ my ( %export, %export_ok );
+ @export {map {@$_} values %default_export_tags} = ();
+ @export_ok{map {@$_} values %other_export_tags} = ();
# Doing the de-dup with a temporary hash has the advantage that the SVs in
# @EXPORT are actually shared hash key scalars, which will save some memory.
our @EXPORT = keys %export;
our @EXPORT_OK = (qw(close lchown nice open pipe read sleep times write
printf sprintf),
- grep {!exists $export{$_}} keys %reimpl, keys %replacement);
+ grep {!exists $export{$_}} keys %reimpl, keys %replacement, keys %export_ok);
+
+ our %EXPORT_TAGS = ( %default_export_tags, %other_export_tags );
}
require Exporter;