getgroups, getugroups: provide stubs for mingw
authorEric Blake <ebb9@byu.net>
Thu, 12 Nov 2009 16:53:14 +0000 (09:53 -0700)
committerIan Beckwith <ianb@erislabs.net>
Sun, 15 Nov 2009 03:12:41 +0000 (03:12 +0000)
commita12148fa5481e60f598307f2892da503fefefda6
tree69cf0d8484b193fae9c8ccb48498944daa894ff3
parentd9cc1a469fab2ac78a99ba6b9357051ed0deeafc
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>
(cherry picked from commit 61b3a42219dc8f575923346b59162f81186b7425)
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