summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-02-24 17:46:45 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-02-24 17:46:45 +0000
commit0994c4d08152f97e3d70c5ce59ee93b0aa88684c (patch)
tree5fcc3ca38de1159018ec3f9ff41d5db1edce58d1 /pp_sys.c
parentcb64dba4c7358c2e02c1ac7a571173423f71980f (diff)
downloadperl-0994c4d08152f97e3d70c5ce59ee93b0aa88684c.tar.gz
MPE/ix patches from Mark Bixby.
p4raw-id: //depot/cfgperl@5239
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/pp_sys.c b/pp_sys.c
index d5c5426945..572da79028 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -4728,7 +4728,7 @@ PP(pp_gpwuid)
PP(pp_gpwent)
{
djSP;
-#if defined(HAS_PASSWD) && defined(HAS_GETPWENT)
+#ifdef HAS_PASSWD
I32 which = PL_op->op_type;
register SV *sv;
struct passwd *pwent;
@@ -4742,7 +4742,11 @@ PP(pp_gpwent)
else if (which == OP_GPWUID)
pwent = getpwuid(POPi);
else
+#ifdef HAS_GETPWENT
pwent = (struct passwd *)getpwent();
+#else
+ DIE(aTHX_ PL_no_func, "getpwent");
+#endif
#ifdef HAS_GETSPNAM
if (which == OP_GPWNAM) {
@@ -4894,7 +4898,7 @@ PP(pp_ggrgid)
PP(pp_ggrent)
{
djSP;
-#if defined(HAS_GROUP) && defined(HAS_GETGRENT)
+#ifdef HAS_GROUP
I32 which = PL_op->op_type;
register char **elem;
register SV *sv;
@@ -4906,7 +4910,11 @@ PP(pp_ggrent)
else if (which == OP_GGRGID)
grent = (struct group *)getgrgid(POPi);
else
+#ifdef HAS_GETGRENT
grent = (struct group *)getgrent();
+#else
+ DIE(aTHX_ PL_no_func, "getgrent");
+#endif
EXTEND(SP, 4);
if (GIMME != G_ARRAY) {