public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Avoid <sys/cdefs.h> dependency in <sys/_types.h>
@ 2019-06-03 8:40 Corinna Vinschen
0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2019-06-03 8:40 UTC (permalink / raw)
To: newlib-cvs
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 */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-06-03 8:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-03 8:40 [newlib-cygwin] Avoid <sys/cdefs.h> dependency in <sys/_types.h> Corinna Vinschen
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).