This is the mail archive of the
newlib-cvs@sourceware.org
mailing list for the newlib project.
[newlib-cygwin] Feature test macros overhaul: grp.h
- From: Yaakov Selkowitz <yselkowitz at sourceware dot org>
- To: newlib-cvs at sourceware dot org
- Date: 18 Mar 2016 02:11:20 -0000
- Subject: [newlib-cygwin] Feature test macros overhaul: grp.h
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=ec4fe40b23bbce361319c1d13dc89e594ffcba03
commit ec4fe40b23bbce361319c1d13dc89e594ffcba03
Author: Yaakov Selkowitz <yselkowi@redhat.com>
Date: Mon Mar 14 16:21:34 2016 -0500
Feature test macros overhaul: grp.h
_PATH_GROUP is a BSDism. getgr*_r are BSD|SVID|POSIX, and the *grent
functions are BSD|SVID|XPG4v2.
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
Diff:
---
newlib/libc/include/grp.h | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/newlib/libc/include/grp.h b/newlib/libc/include/grp.h
index ee75d3f..6a26564 100644
--- a/newlib/libc/include/grp.h
+++ b/newlib/libc/include/grp.h
@@ -49,7 +49,7 @@
#include <cygwin/grp.h>
#endif
-#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
+#if __BSD_VISIBLE
#define _PATH_GROUP "/etc/group"
#endif
@@ -67,15 +67,17 @@ extern "C" {
#ifndef __INSIDE_CYGWIN__
struct group *getgrgid (gid_t);
struct group *getgrnam (const char *);
+#if __MISC_VISIBLE || __POSIX_VISIBLE
int getgrnam_r (const char *, struct group *,
char *, size_t, struct group **);
int getgrgid_r (gid_t, struct group *,
char *, size_t, struct group **);
-#if __BSD_VISIBLE || __XSI_VISIBLE >= 500
+#endif /* __MISC_VISIBLE || __POSIX_VISIBLE */
+#if __MISC_VISIBLE || __XSI_VISIBLE >= 4
struct group *getgrent (void);
void setgrent (void);
void endgrent (void);
-#endif /* __BSD_VISIBLE || __XSI_VISIBLE >= 500 */
+#endif /* __MISC_VISIBLE || __XSI_VISIBLE >= 4 */
#if __BSD_VISIBLE
int initgroups (const char *, gid_t);
#endif /* __BSD_VISIBLE */