public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
From: Yaakov Selkowitz <yselkowitz@sourceware.org>
To: newlib-cvs@sourceware.org
Subject: [newlib-cygwin] grp.h: use __BSD_VISIBLE and __XSI_VISIBLE guards
Date: Thu, 28 Jan 2016 21:43:00 -0000	[thread overview]
Message-ID: <20160128214316.101636.qmail@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=a710c89dcb160eef714a272cc7610ed697c17369

commit a710c89dcb160eef714a272cc7610ed697c17369
Author: Yaakov Selkowitz <yselkowi@redhat.com>
Date:   Thu Jan 28 15:39:02 2016 -0600

    grp.h: use __BSD_VISIBLE and __XSI_VISIBLE guards
    
    This fixes the build of krb5 and other packages on Cygwin.
    
    	* libc/include/grp.h: Use __BSD_VISIBLE and __XSI_VISIBLE guards.
    
    Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>

Diff:
---
 newlib/libc/include/grp.h | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/newlib/libc/include/grp.h b/newlib/libc/include/grp.h
index c3a5a67..145e4ee 100644
--- a/newlib/libc/include/grp.h
+++ b/newlib/libc/include/grp.h
@@ -71,21 +71,19 @@ int		 getgrnam_r (const char *, struct group *,
 			char *, size_t, struct group **);
 int		 getgrgid_r (gid_t, struct group *,
 			char *, size_t, struct group **);
-#ifndef _POSIX_SOURCE
+#if __BSD_VISIBLE || __XSI_VISIBLE >= 500
 struct group	*getgrent (void);
 void		 setgrent (void);
 void		 endgrent (void);
-#ifndef __CYGWIN__
-void		 setgrfile (const char *);
-#endif /* !__CYGWIN__ */
-#ifndef _XOPEN_SOURCE
+#endif /* __BSD_VISIBLE || __XSI_VISIBLE >= 500 */
+#if __BSD_VISIBLE
 #ifndef __CYGWIN__
 char		*group_from_gid (gid_t, int);
+void		 setgrfile (const char *);
 int		 setgroupent (int);
 #endif /* !__CYGWIN__ */
 int		 initgroups (const char *, gid_t);
-#endif /* !_XOPEN_SOURCE */
-#endif /* !_POSIX_SOURCE */
+#endif /* __BSD_VISIBLE */
 #endif /* !__INSIDE_CYGWIN__ */
 
 #ifdef __cplusplus


                 reply	other threads:[~2016-01-28 21:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160128214316.101636.qmail@sourceware.org \
    --to=yselkowitz@sourceware.org \
    --cc=newlib-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).