-/* Like `getgroups', but for user USERNAME instead of for
- the current process. */
+#else /* HAVE_GRP_H */
+# include <grp.h>
+
+# define STREQ(a, b) (strcmp (a, b) == 0)
+
+/* Like `getgroups', but for user USERNAME instead of for the current
+ process. Store at most MAXCOUNT group IDs in the GROUPLIST array.
+ If GID is not -1, store it first (if possible). GID should be the
+ group ID (pw_gid) obtained from getpwuid, in case USERNAME is not
+ listed in /etc/groups. Upon failure, set errno and return -1.
+ Otherwise, return the number of IDs we've written into GROUPLIST. */