peek.t non-portable to ithreads
[p5sagit/p5-mst-13.2.git] / pp_sys.c
index 765b0bc..6bc9f8b 100644 (file)
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -4085,14 +4085,14 @@ PP(pp_gmtime)
        SV *tsv;
        if (!tmbuf)
            RETPUSHUNDEF;
-       tsv = Perl_newSVpvf(aTHX_ "%s %s %2"IVdf" %02"IVdf":%02"IVdf":%02"IVdf" %"IVdf,
+       tsv = Perl_newSVpvf(aTHX_ "%s %s %2d %02d:%02d:%02d %d",
                            dayname[tmbuf->tm_wday],
                            monname[tmbuf->tm_mon],
-                           (IV)tmbuf->tm_mday,
-                           (IV)tmbuf->tm_hour,
-                           (IV)tmbuf->tm_min,
-                           (IV)tmbuf->tm_sec,
-                           (IV)tmbuf->tm_year + 1900);
+                           tmbuf->tm_mday,
+                           tmbuf->tm_hour,
+                           tmbuf->tm_min,
+                           tmbuf->tm_sec,
+                           tmbuf->tm_year + 1900);
        PUSHs(sv_2mortal(tsv));
     }
     else if (tmbuf) {
@@ -4793,11 +4793,6 @@ PP(pp_gpwent)
        break;
     }
 
-#   ifdef HAS_GETSPNAM
-    if (GIMME != G_ARRAY && pwent)
-       spwent = getspnam(pwent->pw_name);
-#   endif
-
     EXTEND(SP, 10);
     if (GIMME != G_ARRAY) {
        PUSHs(sv = sv_newmortal());
@@ -4820,12 +4815,13 @@ PP(pp_gpwent)
 
        PUSHs(sv = sv_mortalcopy(&PL_sv_no));
 #   ifdef HAS_GETSPNAM
-      if (spwent)
-         sv_setpv(sv, spwent->sp_pwdp);
-      else
-         sv_setpv(sv, pwent->pw_passwd);
+       spwent = getspnam(pwent->pw_name);
+       if (spwent)
+           sv_setpv(sv, spwent->sp_pwdp);
+       else
+           sv_setpv(sv, pwent->pw_passwd);
 #   else
-      sv_setpv(sv, pwent->pw_passwd);
+       sv_setpv(sv, pwent->pw_passwd);
 #   endif
 #   ifndef INCOMPLETE_TAINTS
        /* passwd is tainted because user himself can diddle with it. */