getgroups, getugroups: provide stubs for mingw
authorEric Blake <ebb9@byu.net>
Thu, 12 Nov 2009 16:53:14 +0000 (09:53 -0700)
committerEric Blake <ebb9@byu.net>
Fri, 13 Nov 2009 14:39:24 +0000 (07:39 -0700)
commit61b3a42219dc8f575923346b59162f81186b7425
tree6d3ec84212b897f71fa0df89498ca1281fabada6
parent80074d103cc72ea8f289b82c56bd3734aac82cd7
getgroups, getugroups: provide stubs for mingw

Avoid link failure on mingw, which lacks getgroups and anything
else related to gid_t management (stat.st_gid is always 0).

* lib/getgroups.c (getgroups): Provide ENOSYS stub for mingw.
* lib/getugroups.c (getugroups): Likewise.
* m4/getgroups.m4 (gl_FUNC_GETGROUPS): Check for missing
function.  Modernize replacement scheme.
(gl_PREREQ_GETGROUPS): Delete.
* m4/getugroups.m4 (gl_GETUGROUPS): Check for <grp.h>.
* modules/getgroups (configure.ac): Declare witness.
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add default.
* modules/unistd (Depends-on): Substitute witness.
* lib/unistd.in.h (getgroups): Declare replacement.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
lib/getgroups.c
lib/getugroups.c
lib/unistd.in.h
m4/getgroups.m4
m4/getugroups.m4
m4/unistd_h.m4
modules/getgroups
modules/unistd