summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorNorton T. Allen <allen@huarp.harvard.edu>1999-07-28 09:08:42 -0400
committerJarkko Hietaniemi <jhi@iki.fi>1999-07-28 17:46:30 +0000
commit6a5e2de57d60ed48f789873a019a6bf17bbe5354 (patch)
tree249b74bddcb7fec89a965e2cd272946c5a8876b0 /pp_sys.c
parent9f50e519fad23cd50803caa085853e141c97cc3f (diff)
downloadperl-6a5e2de57d60ed48f789873a019a6bf17bbe5354.tar.gz
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
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/pp_sys.c b/pp_sys.c
index a849dbb82e..5b421db636 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