svn commit: r286293 - head/sys/x86/include

Bruce Evans brde at optusnet.com.au
Wed Aug 5 06:25:41 UTC 2015


On Tue, 4 Aug 2015, Jung-uk Kim wrote:

> Log:
>  Fix style(9) bugs.

Thanks.

> Modified:
>  head/sys/x86/include/_types.h
>
> Modified: head/sys/x86/include/_types.h
> ==============================================================================
> --- head/sys/x86/include/_types.h	Tue Aug  4 17:47:11 2015	(r286292)
> +++ head/sys/x86/include/_types.h	Tue Aug  4 18:59:54 2015	(r286293)
> @@ -154,12 +154,11 @@ typedef	int		___wchar_t;
> typedef	__builtin_va_list	__va_list;	/* internally known to gcc */
> #else
> #ifdef __LP64__
> -typedef	struct {
> -	unsigned int	__gpo;
> -	unsigned int	__fpo;
> -	void		*__oaa;
> -	void		*__rsa;
> -} __va_list;
> +struct __s_va_list {
> +	__uint32_t	pad1[2];	/* gp_offset, fp_offset */
> +	__uint64_t	pad2[2];	/* overflow_arg_area, reg_save_area */
> +};

Er, the struct members need at least 1 underscore, since pad* is in the
application namespace and this is a very public file.

> +typedef struct __s_va_list	__va_list;

I said to use #define, but now prefer this since it is better for debuggers
and all the nearby __va_list's are typedefs.

This typedef should be followed by a tab like all the nearby ones.

> #else
> typedef	char *			__va_list;
> #endif

Bruce


More information about the svn-src-head mailing list