From: Norton T. Allen Date: Wed, 28 Jul 1999 13:08:42 +0000 (-0400) Subject: Need to add some more conditions to deal with the case X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6a5e2de57d60ed48f789873a019a6bf17bbe5354;p=p5sagit%2Fp5-mst-13.2.git Need to add some more conditions to deal with the case defined(HAS_GETSPNAM) && ! defined(HAS_GETSPENT) which is true for QNX4. To: perl5-porters@perl.org Subject: [ID 19990728.009] Patch:pp_sys.c _58 QNX Message-Id: <199907281708.NAA07947@bottesini.harvard.edu> p4raw-id: //depot/cfgperl@3817 --- diff --git a/pp_sys.c b/pp_sys.c index a849dbb..5b421db 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -4617,7 +4617,7 @@ PP(pp_gpwent) register SV *sv; struct passwd *pwent; STRLEN n_a; -#ifdef HAS_GETSPENT +#if defined(HAS_GETSPENT) || defined(HAS_GETSPNAM) struct spwd *spwent = NULL; #endif @@ -4639,8 +4639,10 @@ PP(pp_gpwent) spwent = getspnam(pwent->pw_name); } # endif +# ifdef HAS_GETSPENT else spwent = (struct spwd *)getspent(); +# endif #endif EXTEND(SP, 10); @@ -4661,7 +4663,7 @@ PP(pp_gpwent) PUSHs(sv = sv_mortalcopy(&PL_sv_no)); #ifdef PWPASSWD -# ifdef HAS_GETSPENT +# if defined(HAS_GETSPENT) || defined(HAS_GETSPNAM) if (spwent) sv_setpv(sv, spwent->sp_pwdp); else