aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/_types.h
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2018-02-12 14:48:20 +0000
committerWarner Losh <imp@FreeBSD.org>2018-02-12 14:48:20 +0000
commit62bca778430f98fcd71ef01b9a7d525255c20a9f (patch)
tree8f6233f7eaef65e66cc8ba2bd1e10c90f52cc62d /sys/sys/_types.h
parent982e7bdafc98611dd45a3551031ff73548390269 (diff)
downloadsrc-62bca778430f98fcd71ef01b9a7d525255c20a9f.tar.gz
src-62bca778430f98fcd71ef01b9a7d525255c20a9f.zip
Move __va_list and related defines to sys/sys/_types.h
__va_list and related defines are identical in all the ARCH/include/_types.h files. Move them to sys/sys/_types.h Sponsored by: Netflix
Notes
Notes: svn path=/head/; revision=329165
Diffstat (limited to 'sys/sys/_types.h')
-rw-r--r--sys/sys/_types.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/sys/_types.h b/sys/sys/_types.h
index 461636dba4f0..8ecf9d059239 100644
--- a/sys/sys/_types.h
+++ b/sys/sys/_types.h
@@ -123,6 +123,21 @@ typedef union {
typedef __uintmax_t __rman_res_t;
/*
+ * Types for varargs. These are all provided by builtin types these
+ * days, so centralize their definition.
+ */
+#ifdef __GNUCLIKE_BUILTIN_VARARGS
+typedef __builtin_va_list __va_list; /* internally known to gcc */
+#else
+#error "No support for your compiler for stdargs"
+#endif
+#if defined(__GNUC_VA_LIST_COMPATIBILITY) && !defined(__GNUC_VA_LIST) \
+ && !defined(__NO_GNUC_VA_LIST)
+#define __GNUC_VA_LIST
+typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/
+#endif
+
+/*
* When the following macro is defined, the system uses 64-bit inode numbers.
* Programs can use this to avoid including <sys/param.h>, with its associated
* namespace pollution.