Message ID | alpine.DEB.2.10.1506122056240.17561@digraph.polyomino.org.uk |
---|---|
State | New |
Headers | show |
That looks fine, but I think it would be nice if grp.h got a comment explaining how the visibility of these declarations has changed in the standards and in glibc.
On Fri, 12 Jun 2015, Roland McGrath wrote: > That looks fine, but I think it would be nice if grp.h got a comment > explaining how the visibility of these declarations has changed in the > standards and in glibc. Apart from a limited period where there was a bug in POSIX and that bug was reflected in glibc, the visibility *hasn't* changed; the group of three declarations was always meant to go together under the same conditions. The details of past bugs seem like a distraction for normal readers of the header.
> Apart from a limited period where there was a bug in POSIX and that bug > was reflected in glibc, the visibility *hasn't* changed; the group of > three declarations was always meant to go together under the same > conditions. The details of past bugs seem like a distraction for normal > readers of the header. The name space controls altogether are a distraction for readers of the header who are just going to use _GNU_SOURCE. It's not "details of past bugs". It's details of past API versions that people may have written to.
diff --git a/conform/Makefile b/conform/Makefile index 57dbc92..ea7a6b4 100644 --- a/conform/Makefile +++ b/conform/Makefile @@ -170,7 +170,6 @@ test-xfail-XOPEN2K8/ndbm.h/conform = yes # Unsorted expected failures. test-xfail-XPG3/fcntl.h/conform = yes test-xfail-XPG3/ftw.h/conform = yes -test-xfail-XPG3/grp.h/conform = yes test-xfail-XPG3/langinfo.h/conform = yes test-xfail-XPG3/limits.h/conform = yes test-xfail-XPG3/pwd.h/conform = yes @@ -361,7 +360,6 @@ test-xfail-UNIX98/wchar.h/linknamespace = yes test-xfail-XOPEN2K/fmtmsg.h/linknamespace = yes test-xfail-XOPEN2K/netdb.h/linknamespace = yes test-xfail-XOPEN2K/syslog.h/linknamespace = yes -test-xfail-POSIX2008/grp.h/linknamespace = yes test-xfail-POSIX2008/netdb.h/linknamespace = yes test-xfail-POSIX2008/semaphore.h/linknamespace = yes test-xfail-XOPEN2K8/fmtmsg.h/linknamespace = yes diff --git a/conform/data/grp.h-data b/conform/data/grp.h-data index 1edba73..53e880d 100644 --- a/conform/data/grp.h-data +++ b/conform/data/grp.h-data @@ -19,12 +19,10 @@ 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**) -# ifndef POSIX +# if !defined XPG3 && !defined POSIX && !defined POSIX2008 function {struct group*} getgrent (void) function void endgrent (void) -# ifndef POSIX2008 function void setgrent (void) -# endif # endif allow gr_* diff --git a/grp/grp.h b/grp/grp.h index c593eb5..ff0ad02 100644 --- a/grp/grp.h +++ b/grp/grp.h @@ -60,9 +60,7 @@ struct group This function is a possible cancellation point and therefore not marked with __THROW. */ extern void setgrent (void); -#endif -#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 /* Close the group-file stream. This function is a possible cancellation point and therefore not