summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-03-26 22:01:01 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-03-26 22:01:01 +0000
commit3d7e8424cfac272bdb0b574fd551427fdfd63d10 (patch)
tree3fef721bf6f23993658cd0a21a5b3550cad5a966 /pp_sys.c
parent787c6ccf83b5ca15afe1c9a950fced03aa607d0b (diff)
downloadperl-3d7e8424cfac272bdb0b574fd551427fdfd63d10.tar.gz
Avoid and document a weird bug in UNICOS/mk.
p4raw-id: //depot/perl@15527
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 827d8f6de7..2361b3c16e 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -5430,12 +5430,22 @@ PP(pp_ggrent)
PUSHs(sv = sv_mortalcopy(&PL_sv_no));
sv_setiv(sv, (IV)grent->gr_gid);
+#if !(defined(_CRAYMPP) && defined(USE_REENTRANT_API)
PUSHs(sv = sv_mortalcopy(&PL_sv_no));
+ /* In UNICOS/mk (_CRAYMPP) the multithreading
+ * versions (getgrnam_r, getgrgid_r)
+ * seem to return an illegal pointer
+ * as the group members list, gr_mem.
+ * getgrent() doesn't even have a _r version
+ * but the gr_mem is poisonous anyway.
+ * So yes, you cannot get the list of group
+ * members if building multithreaded in UNICOS/mk. */
for (elem = grent->gr_mem; elem && *elem; elem++) {
sv_catpv(sv, *elem);
if (elem[1])
sv_catpvn(sv, " ", 1);
}
+#endif
}
RETURN;