public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org>
To: newlib-cvs@sourceware.org
Subject: [newlib-cygwin] Avoid <sys/cdefs.h> dependency in <sys/_types.h>
Date: Mon, 03 Jun 2019 08:40:00 -0000	[thread overview]
Message-ID: <20190603084022.106087.qmail@sourceware.org> (raw)

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

commit 86809750bb4e6b0cda331ae9919f3d0e9bd53586
Author: Sebastian Huber <sebastian.huber@embedded-brains.de>
Date:   Thu May 16 14:40:33 2019 +0200

    Avoid <sys/cdefs.h> dependency in <sys/_types.h>
    
    Including <sys/cdefs.h> could result in cyclic header dependencies.
    
    Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>

Diff:
---
 newlib/libc/include/sys/_types.h | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/newlib/libc/include/sys/_types.h b/newlib/libc/include/sys/_types.h
index 90383b0..0ed56ed 100644
--- a/newlib/libc/include/sys/_types.h
+++ b/newlib/libc/include/sys/_types.h
@@ -210,10 +210,15 @@ typedef	unsigned short	__nlink_t;
 typedef	long		__suseconds_t;	/* microseconds (signed) */
 typedef	unsigned long	__useconds_t;	/* microseconds (unsigned) */
 
-#ifdef __GNUCLIKE_BUILTIN_VARARGS
+/*
+ * Must be identical to the __GNUCLIKE_BUILTIN_VAALIST definition in
+ * <sys/cdefs.h>.  The <sys/cdefs.h> must not be included here to avoid cyclic
+ * header dependencies.
+ */
+#if __GNUC_MINOR__ > 95 || __GNUC__ >= 3
 typedef	__builtin_va_list	__va_list;
 #else
 typedef	char *			__va_list;
-#endif /* __GNUCLIKE_BUILTIN_VARARGS */
+#endif
 
 #endif	/* _SYS__TYPES_H */


                 reply	other threads:[~2019-06-03  8:40 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=20190603084022.106087.qmail@sourceware.org \
    --to=corinna@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).