diff options
-rwxr-xr-x | installperl | 9 | ||||
-rw-r--r-- | toke.c | 19 |
2 files changed, 15 insertions, 13 deletions
diff --git a/installperl b/installperl index f56af9e1dc..f6e45f59dc 100755 --- a/installperl +++ b/installperl @@ -25,6 +25,7 @@ use File::Compare; use File::Copy (); use File::Path (); use ExtUtils::Packlist; +use Config; use subs qw(unlink link chmod); use vars qw($packlist); @@ -74,7 +75,7 @@ my %archpms = ( Config => 1, ); -if ($osname eq 'dos') { +if ($^O eq 'dos') { push(@scripts,'djgpp/fixpmain'); $archpms{config} = $archpms{filehand} = 1; } @@ -199,7 +200,7 @@ if ($Is_VMS) { copy("perlshr$exe_ext", "$installbin/${perl}shr$exe_ext"); chmod(0755, "$installbin/${perl}shr$exe_ext"); } -elsif ($osname eq 'mpeix') { +elsif ($^O eq 'mpeix') { # MPE lacks hard links and requires that executables with special # capabilities reside in the MPE namespace. safe_unlink("$installbin/perl$ver$exe_ext", $Config{perlpath}); @@ -262,8 +263,8 @@ else { @corefiles = <*.h libperl*.*>; # AIX needs perl.exp installed as well. - push(@corefiles,'perl.exp') if $osname eq 'aix'; - if ($osname eq 'mpeix') { + push(@corefiles,'perl.exp') if $^O eq 'aix'; + if ($^O eq 'mpeix') { # MPE needs mpeixish.h installed as well. mkpath("$installarchlib/CORE/mpeix", 1, 0777); push(@corefiles,'mpeix/mpeixish.h'); @@ -6681,7 +6681,6 @@ Perl_scan_num(pTHX_ char *start) register char *s = start; /* current position in buffer */ register char *d; /* destination in temp buffer */ register char *e; /* end of temp buffer */ - UV tryuv; /* used to see if it can be an UV */ NV value; /* number read, as a double */ SV *sv = Nullsv; /* place to put the converted number */ bool floatit; /* boolean: int or float? */ @@ -6960,15 +6959,17 @@ Perl_scan_num(pTHX_ char *start) Note: if floatit is true, then we don't need to do the conversion at all. */ - tryuv = U_V(value); - if (!floatit && (NV)tryuv == value) { - if (tryuv <= IV_MAX) - sv_setiv(sv, (IV)tryuv); + { + UV tryuv = U_V(value); + if (!floatit && (NV)tryuv == value) { + if (tryuv <= IV_MAX) + sv_setiv(sv, (IV)tryuv); + else + sv_setuv(sv, tryuv); + } else - sv_setuv(sv, tryuv); + sv_setnv(sv, value); } - else - sv_setnv(sv, value); #else /* strtol/strtoll sets errno to ERANGE if the number is too big @@ -7021,7 +7022,7 @@ Perl_scan_num(pTHX_ char *start) sv, Nullsv, NULL); break; - /* if it starts with a v, it could be a version number */ + /* if it starts with a v, it could be a v-string */ case 'v': vstring: { |