mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-19 06:23:34 +08:00
b400fdefc7
grp.h declares endgrent and getgrent if __USE_XOPEN2K8 (i.e. 2008 edition of POSIX, non-XSI). However, the 2013 Technical Corrigendum corrected the grp.h specification to XSI-shade these functions as in previous editions (see <http://austingroupbugs.net/view.php?id=24>), so they should not be declared for non-XSI POSIX. This patch corrects the conditions - using __USE_MISC || __USE_XOPEN_EXTENDED to match setgrent - and the conform/ test expectations for this header, thereby fixing the conform tests for this header for XPG3 (where the expectations were wrong) and the linknamespace tests for it for POSIX2008 (where the header bug meant it was wrongly considered a problem for endgrent to bring in a reference to setgrent). Tested for x86_64 and x86 (testsuite, and that installed stripped shared libraries are unchanged by the patch). [BZ #18528] * grp/grp.h (endgrent): Condition on [__USE_MISC || __USE_XOPEN_EXTENDED], not [__USE_XOPEN_EXTENDED || __USE_XOPEN2K8]. (getgrent): Likewise. * conform/data/grp.h-data [XPG3 || POSIX2008] (getgrent): Do not expect. [XPG3 || POSIX2008] (endgrent): Likewise. [XPG3] (setgrent): Likewise. * conform/Makefile (test-xfail-XPG3/grp.h/conform): Remove variable. (test-xfail-POSIX2008/grp.h/linknamespace): Likewise.
31 lines
783 B
Plaintext
31 lines
783 B
Plaintext
#if !defined ISO && !defined ISO99 && !defined ISO11
|
|
#ifdef POSIX
|
|
# define gid_t __gid_t
|
|
#endif
|
|
|
|
type {struct group}
|
|
element {struct group} {char*} gr_name
|
|
element {struct group} gid_t gr_gid
|
|
element {struct group} {char**} gr_mem
|
|
|
|
# ifndef POSIX
|
|
type gid_t
|
|
# endif
|
|
# if defined XOPEN2K8 || defined POSIX2008
|
|
type size_t
|
|
# endif
|
|
|
|
function {struct group*} getgrgid (gid_t)
|
|
function {struct group*} getgrnam (const char*)
|
|
function int getgrgid_r (gid_t, struct group*, char *, size_t, struct group**)
|
|
function int getgrnam_r (const char *, struct group *, char *, size_t, struct group**)
|
|
# if !defined XPG3 && !defined POSIX && !defined POSIX2008
|
|
function {struct group*} getgrent (void)
|
|
function void endgrent (void)
|
|
function void setgrent (void)
|
|
# endif
|
|
|
|
allow gr_*
|
|
allow *_t
|
|
#endif
|