]> sourceware.org Git - newlib-cygwin.git/commitdiff
Avoid <sys/cdefs.h> dependency in <sys/_types.h>
authorSebastian Huber <sebastian.huber@embedded-brains.de>
Thu, 16 May 2019 12:40:33 +0000 (14:40 +0200)
committerCorinna Vinschen <corinna@vinschen.de>
Mon, 3 Jun 2019 08:20:15 +0000 (10:20 +0200)
Including <sys/cdefs.h> could result in cyclic header dependencies.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
newlib/libc/include/sys/_types.h

index 90383b083ce1ede0bc172efd62e46c857bd80328..0ed56ed443766eb50acaa53bf3ef4bc95fc37d0d 100644 (file)
@@ -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 */
This page took 0.034553 seconds and 5 git commands to generate.