From owner-svn-src-head@freebsd.org Mon Feb 12 14:48:22 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15412F208D6; Mon, 12 Feb 2018 14:48:22 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 97D6777C06; Mon, 12 Feb 2018 14:48:21 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 90898134C1; Mon, 12 Feb 2018 14:48:21 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w1CEmLPD082765; Mon, 12 Feb 2018 14:48:21 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w1CEmKuj082757; Mon, 12 Feb 2018 14:48:20 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201802121448.w1CEmKuj082757@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 12 Feb 2018 14:48:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r329165 - in head/sys: arm/include arm64/include mips/include powerpc/include riscv/include sparc64/include sys x86/include X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys: arm/include arm64/include mips/include powerpc/include riscv/include sparc64/include sys x86/include X-SVN-Commit-Revision: 329165 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Feb 2018 14:48:22 -0000 Author: imp Date: Mon Feb 12 14:48:20 2018 New Revision: 329165 URL: https://svnweb.freebsd.org/changeset/base/329165 Log: 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 Modified: head/sys/arm/include/_types.h head/sys/arm64/include/_types.h head/sys/mips/include/_types.h head/sys/powerpc/include/_types.h head/sys/riscv/include/_types.h head/sys/sparc64/include/_types.h head/sys/sys/_types.h head/sys/x86/include/_types.h Modified: head/sys/arm/include/_types.h ============================================================================== --- head/sys/arm/include/_types.h Mon Feb 12 14:48:14 2018 (r329164) +++ head/sys/arm/include/_types.h Mon Feb 12 14:48:20 2018 (r329165) @@ -109,18 +109,4 @@ typedef unsigned int ___wchar_t; #define __WCHAR_MIN 0 /* min value for a wchar_t */ #define __WCHAR_MAX __UINT_MAX /* max value for a wchar_t */ -/* - * Unusual type definitions. - */ -#ifdef __GNUCLIKE_BUILTIN_VARARGS -typedef __builtin_va_list __va_list; /* internally known to gcc */ -#else -typedef char * __va_list; -#endif /* __GNUCLIKE_BUILTIN_VARARGS */ -#if defined(__GNUCLIKE_BUILTIN_VAALIST) && !defined(__GNUC_VA_LIST) \ - && !defined(__NO_GNUC_VA_LIST) -#define __GNUC_VA_LIST -typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/ -#endif - #endif /* !_MACHINE__TYPES_H_ */ Modified: head/sys/arm64/include/_types.h ============================================================================== --- head/sys/arm64/include/_types.h Mon Feb 12 14:48:14 2018 (r329164) +++ head/sys/arm64/include/_types.h Mon Feb 12 14:48:20 2018 (r329165) @@ -95,18 +95,4 @@ typedef unsigned int ___wchar_t; #define __WCHAR_MIN 0 /* min value for a wchar_t */ #define __WCHAR_MAX __UINT_MAX /* max value for a wchar_t */ -/* - * Unusual type definitions. - */ -#ifdef __GNUCLIKE_BUILTIN_VARARGS -typedef __builtin_va_list __va_list; /* internally known to gcc */ -#else -typedef char * __va_list; -#endif /* __GNUCLIKE_BUILTIN_VARARGS */ -#if defined(__GNUCLIKE_BUILTIN_VAALIST) && !defined(__GNUC_VA_LIST) \ - && !defined(__NO_GNUC_VA_LIST) -#define __GNUC_VA_LIST -typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/ -#endif - #endif /* !_MACHINE__TYPES_H_ */ Modified: head/sys/mips/include/_types.h ============================================================================== --- head/sys/mips/include/_types.h Mon Feb 12 14:48:14 2018 (r329164) +++ head/sys/mips/include/_types.h Mon Feb 12 14:48:20 2018 (r329165) @@ -150,18 +150,4 @@ typedef int ___wchar_t; #define __WCHAR_MIN __INT_MIN /* min value for a wchar_t */ #define __WCHAR_MAX __INT_MAX /* max value for a wchar_t */ -/* - * Unusual type definitions. - */ -#ifdef __GNUCLIKE_BUILTIN_VARARGS -typedef __builtin_va_list __va_list; /* internally known to gcc */ -#else -typedef char * __va_list; -#endif /* __GNUCLIKE_BUILTIN_VARARGS */ -#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 - #endif /* !_MACHINE__TYPES_H_ */ Modified: head/sys/powerpc/include/_types.h ============================================================================== --- head/sys/powerpc/include/_types.h Mon Feb 12 14:48:14 2018 (r329164) +++ head/sys/powerpc/include/_types.h Mon Feb 12 14:48:20 2018 (r329165) @@ -144,24 +144,4 @@ typedef int ___wchar_t; #define __WCHAR_MIN __INT_MIN /* min value for a wchar_t */ #define __WCHAR_MAX __INT_MAX /* max value for a wchar_t */ -/* - * Unusual type definitions. - */ -#if defined(__GNUCLIKE_BUILTIN_VARARGS) -typedef __builtin_va_list __va_list; /* internally known to gcc */ -#else -typedef struct { - char __gpr; - char __fpr; - char __pad[2]; - char *__stack; - char *__base; -} __va_list; -#endif /* post GCC 2.95 */ -#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 - #endif /* !_MACHINE__TYPES_H_ */ Modified: head/sys/riscv/include/_types.h ============================================================================== --- head/sys/riscv/include/_types.h Mon Feb 12 14:48:14 2018 (r329164) +++ head/sys/riscv/include/_types.h Mon Feb 12 14:48:20 2018 (r329165) @@ -95,18 +95,4 @@ typedef int ___wchar_t; #define __WCHAR_MIN __INT_MIN /* min value for a wchar_t */ #define __WCHAR_MAX __INT_MAX /* max value for a wchar_t */ -/* - * Unusual type definitions. - */ -#ifdef __GNUCLIKE_BUILTIN_VARARGS -typedef __builtin_va_list __va_list; /* internally known to gcc */ -#else -typedef char * __va_list; -#endif /* __GNUCLIKE_BUILTIN_VARARGS */ -#if defined(__GNUCLIKE_BUILTIN_VAALIST) && !defined(__GNUC_VA_LIST) \ - && !defined(__NO_GNUC_VA_LIST) -#define __GNUC_VA_LIST -typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/ -#endif - #endif /* !_MACHINE__TYPES_H_ */ Modified: head/sys/sparc64/include/_types.h ============================================================================== --- head/sys/sparc64/include/_types.h Mon Feb 12 14:48:14 2018 (r329164) +++ head/sys/sparc64/include/_types.h Mon Feb 12 14:48:20 2018 (r329165) @@ -97,18 +97,4 @@ typedef int ___wchar_t; #define __WCHAR_MIN __INT_MIN /* min value for a wchar_t */ #define __WCHAR_MAX __INT_MAX /* max value for a wchar_t */ -/* - * Unusual type definitions. - */ -#ifdef __GNUCLIKE_BUILTIN_VARARGS -typedef __builtin_va_list __va_list; /* internally known to gcc */ -#else -typedef char * __va_list; -#endif /* __GNUCLIKE_BUILTIN_VARARGS */ -#if defined(__GNUCLIKE_BUILTIN_VAALIST) && !defined(__GNUC_VA_LIST) \ - && !defined(__NO_GNUC_VA_LIST) -#define __GNUC_VA_LIST -typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/ -#endif - #endif /* !_MACHINE__TYPES_H_ */ Modified: head/sys/sys/_types.h ============================================================================== --- head/sys/sys/_types.h Mon Feb 12 14:48:14 2018 (r329164) +++ head/sys/sys/_types.h Mon Feb 12 14:48:20 2018 (r329165) @@ -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 , with its associated * namespace pollution. Modified: head/sys/x86/include/_types.h ============================================================================== --- head/sys/x86/include/_types.h Mon Feb 12 14:48:14 2018 (r329164) +++ head/sys/x86/include/_types.h Mon Feb 12 14:48:20 2018 (r329165) @@ -143,26 +143,4 @@ typedef int ___wchar_t; #define __WCHAR_MIN __INT_MIN /* min value for a wchar_t */ #define __WCHAR_MAX __INT_MAX /* max value for a wchar_t */ -/* - * Unusual type definitions. - */ -#ifdef __GNUCLIKE_BUILTIN_VARARGS -typedef __builtin_va_list __va_list; /* internally known to gcc */ -#else -#ifdef __LP64__ -struct __s_va_list { - __uint32_t _pad1[2]; /* gp_offset, fp_offset */ - __uint64_t _pad2[2]; /* overflow_arg_area, reg_save_area */ -}; -typedef struct __s_va_list __va_list; -#else -typedef char * __va_list; -#endif -#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 - #endif /* !_MACHINE__TYPES_H_ */