From: Robin Barker Date: Thu, 5 Jun 2003 17:16:58 +0000 (+0100) Subject: RE: maint @ 19683 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=84c133a0c99ec2d2efc517f14b45051d3bfe4074;p=p5sagit%2Fp5-mst-13.2.git RE: maint @ 19683 Message-ID: <533D273D4014D411AB1D00062938C4D904046564@hotel.npl.co.uk> (skipped the MIME::Base64 part, leaving that to Gisle) p4raw-id: //depot/perl@19694 --- diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs index 4425f6d..d6318aa 100644 --- a/ext/POSIX/POSIX.xs +++ b/ext/POSIX/POSIX.xs @@ -1563,10 +1563,12 @@ strtoul(str, base = 0) char *unparsed; PPCODE: num = strtoul(str, &unparsed, base); - if (num <= IV_MAX) - PUSHs(sv_2mortal(newSViv((IV)num))); - else +#if IVSIZE <= LONGSIZE + if (num > IV_MAX) PUSHs(sv_2mortal(newSVnv((double)num))); + else +#endif + PUSHs(sv_2mortal(newSViv((IV)num))); if (GIMME == G_ARRAY) { EXTEND(SP, 1); if (unparsed) diff --git a/gv.c b/gv.c index 41feaa2..a003e8e 100644 --- a/gv.c +++ b/gv.c @@ -1350,7 +1350,8 @@ Perl_Gv_AMupdate(pTHX_ HV *stash) /* GvSV contains the name of the method. */ GV *ngv = Nullgv; - DEBUG_o( Perl_deb(aTHX_ "Resolving method `%.256"SVf"' for overloaded `%s' in package `%.256s'\n", + DEBUG_o( Perl_deb(aTHX_ "Resolving method `%"SVf256\ + "' for overloaded `%s' in package `%.256s'\n", GvSV(gv), cp, HvNAME(stash)) ); if (!SvPOK(GvSV(gv)) || !(ngv = gv_fetchmethod_autoload(stash, SvPVX(GvSV(gv)), @@ -1359,7 +1360,8 @@ Perl_Gv_AMupdate(pTHX_ HV *stash) /* Can be an import stub (created by `can'). */ SV *gvsv = GvSV(gv); const char *name = SvPOK(gvsv) ? SvPVX(gvsv) : "???"; - Perl_croak(aTHX_ "%s method `%.256s' overloading `%s' in package `%.256s'", + Perl_croak(aTHX_ "%s method `%.256s' overloading `%s' "\ + "in package `%.256s'", (GvCVGEN(gv) ? "Stub found while resolving" : "Can't resolve"), name, cp, HvNAME(stash)); diff --git a/op.c b/op.c index efb94b6..ad0ed55 100644 --- a/op.c +++ b/op.c @@ -2292,13 +2292,13 @@ Perl_pmtrans(pTHX_ OP *o, OP *expr, OP *repl) U8* tend = t + tlen; U8* rend = r + rlen; STRLEN ulen; - U32 tfirst = 1; - U32 tlast = 0; - I32 tdiff; - U32 rfirst = 1; - U32 rlast = 0; - I32 rdiff; - I32 diff; + UV tfirst = 1; + UV tlast = 0; + IV tdiff; + UV rfirst = 1; + UV rlast = 0; + IV rdiff; + IV diff; I32 none = 0; U32 max = 0; I32 bits; diff --git a/perl.c b/perl.c index 77cd0c9..0c6b4d3 100644 --- a/perl.c +++ b/perl.c @@ -2167,7 +2167,7 @@ char * Perl_moreswitches(pTHX_ char *s) { STRLEN numlen; - U32 rschar; + UV rschar; switch (*s) { case '0': diff --git a/perl.h b/perl.h index f469d9e..a7360f8 100644 --- a/perl.h +++ b/perl.h @@ -2111,11 +2111,18 @@ typedef pthread_key_t perl_key; #ifndef SVf # ifdef CHECK_FORMAT # define SVf "p" +# ifndef SVf256 +# define SVf256 SVf +# endif # else # define SVf "_" # endif #endif +#ifndef SVf256 +# define SVf256 ".256"SVf +#endif + #ifndef UVf # ifdef CHECK_FORMAT # define UVf UVuf