int getgrgid_r(gid_t, struct group *, char *, size_t, struct group **);
int getgrnam_r(const char *, struct group *, char *, size_t, struct group **);
+#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
struct group *getgrent(void);
void endgrent(void);
void setgrent(void);
+#endif
#ifdef _GNU_SOURCE
-struct group *fgetgrent(FILE *stream);
+struct group *fgetgrent(FILE *);
int putgrent(const struct group *, FILE *);
#endif