pp_gmtime() assumed that newSVpvf %d would take C ints,
Jarkko Hietaniemi [Fri, 31 Mar 2000 23:42:56 +0000 (23:42 +0000)]
an assumption which #5905 demolished.

p4raw-id: //depot/cfgperl@5907

pp_sys.c

index 0ec539d..dc0f2f6 100644 (file)
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -4086,14 +4086,14 @@ PP(pp_gmtime)
        SV *tsv;
        if (!tmbuf)
            RETPUSHUNDEF;
-       tsv = Perl_newSVpvf(aTHX_ "%s %s %2d %02d:%02d:%02d %d",
+       tsv = Perl_newSVpvf(aTHX_ "%s %s %2"IVdf" %02"IVdf":%02"IVdf":%02"IVdf" %"IVdf,
                            dayname[tmbuf->tm_wday],
                            monname[tmbuf->tm_mon],
-                           tmbuf->tm_mday,
-                           tmbuf->tm_hour,
-                           tmbuf->tm_min,
-                           tmbuf->tm_sec,
-                           tmbuf->tm_year + 1900);
+                           (IV)tmbuf->tm_mday,
+                           (IV)tmbuf->tm_hour,
+                           (IV)tmbuf->tm_min,
+                           (IV)tmbuf->tm_sec,
+                           (IV)tmbuf->tm_year + 1900);
        PUSHs(sv_2mortal(tsv));
     }
     else if (tmbuf) {