From: Jarkko Hietaniemi Date: Tue, 26 Mar 2002 22:01:01 +0000 (+0000) Subject: Avoid and document a weird bug in UNICOS/mk. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3d7e8424cfac272bdb0b574fd551427fdfd63d10;p=p5sagit%2Fp5-mst-13.2.git Avoid and document a weird bug in UNICOS/mk. p4raw-id: //depot/perl@15527 --- diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 7589276..bb938cf 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -2688,13 +2688,17 @@ threads are considered fundamentally broken. =head2 UNICOS and UNICOS/mk -The io/fs test #31 is failing because in UNICOS and UNICOS/mk -truncate() cannot be used to grow the size of filehandles, only -to reduce the size. The workaround is to truncate files instead -of filehandles. +The io/fs test #31 is failing because in UNICOS and UNICOS/mk the Perl +truncate() cannot be used to grow the size of filehandles, only to +reduce the size. The workaround is to truncate files instead of +filehandles. =head2 UNICOS/mk +=over 4 + +=item * + During Configure the test Guessing which symbols your C compiler and preprocessor define... @@ -2718,6 +2722,16 @@ from Perl the constants defined using C preprocessor, cpp. Because of the above error parts of the converted headers will be invisible. Luckily, these days the need for h2ph is rare. +=item * + +If building Perl with the interpreter threads (ithreads), the +getgrent(), getgrnam(), and getgrgid() functions cannot return the +list of the group members due to a bug in the multithreaded support of +UNICOS/mk. What this means that in list context the functions will +return only three values, not four. + +=back + =head2 UTS There are a few known test failures, see L. diff --git a/pp_sys.c b/pp_sys.c index 827d8f6..2361b3c 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;