remove __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS checks in stdint.h
[oweals/musl.git] / include / grp.h
index 518518512c99149526f1c831cf3b95620ace4f1d..b331d3264c0f1eb4a9844d8a54e4143e514d9609 100644 (file)
@@ -5,9 +5,15 @@
 extern "C" {
 #endif
 
+#include <features.h>
+
 #define __NEED_size_t
 #define __NEED_gid_t
 
+#ifdef _GNU_SOURCE
+#define __NEED_FILE
+#endif
+
 #include <bits/alltypes.h>
 
 struct group
@@ -29,6 +35,11 @@ void           endgrent(void);
 void           setgrent(void);
 
 #ifdef _GNU_SOURCE
+struct group  *fgetgrent(FILE *stream);
+int putgrent(const struct group *, FILE *);
+#endif
+
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 int getgrouplist(const char *, gid_t, gid_t *, int *);
 int setgroups(size_t, const gid_t *);
 int initgroups(const char *, gid_t);