X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pp_sys.c;h=2f674839e51b7c032fb22f93688e0fba68c64ac8;hb=765e9edb2de192ef033766d867f9bd290e9935e9;hp=62b4b1062eeaf21bb591113d843bf65d685a6804;hpb=1883634fcb5674cbb12962bde26d7557a783da9b;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pp_sys.c b/pp_sys.c index 62b4b10..2f67483 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -4788,16 +4788,11 @@ PP(pp_gpwent) # ifdef HAS_GETPWENT pwent = getpwent(); # else - DIE(aTHX_ PL_no_fun, "getpwent"); + DIE(aTHX_ PL_no_func, "getpwent"); # endif 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,10 +4815,11 @@ 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); # endif @@ -4853,8 +4849,9 @@ PP(pp_gpwent) # ifdef PWQUOTA sv_setiv(sv, (IV)pwent->pw_quota); # else -# ifdef PWAGE +# ifdef PWAGE sv_setpv(sv, pwent->pw_age); +# endif # endif # endif