[PATCH xf86-input-keyboard 2/2] Finish XINPUT ABI cleanup.

Alan Coopersmith alan.coopersmith at oracle.com
Tue Oct 19 10:10:12 PDT 2010


I don't think this is necessary, since the ANSI C89
standard specifies 0-filling any additional struct
members that you don't provide values for in your
initialization.

Trevor Woerner wrote:
> From: Trevor Woerner <twoerner at gmail.com>
> 
> Provide an #ifdef so the driver can be built against
> and older XINPUT ABI.
> 
> Signed-off-by: Trevor Woerner <twoerner at gmail.com>
> ---
>  src/kbd.c |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/src/kbd.c b/src/kbd.c
> index 3aeffeb..e695c64 100644
> --- a/src/kbd.c
> +++ b/src/kbd.c
> @@ -71,6 +71,10 @@ _X_EXPORT InputDriverRec KBD = {
>  	KbdPreInit,
>  	NULL,
>  	NULL
> +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 11
> +	    ,
> +	0
> +#endif
>  };
>  
>  _X_EXPORT InputDriverRec KEYBOARD = {
> @@ -80,6 +84,10 @@ _X_EXPORT InputDriverRec KEYBOARD = {
>  	KbdPreInit,
>  	NULL,
>  	NULL
> +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 11
> +	    ,
> +	0
> +#endif
>  };
>  
>  static const char *kbdDefaults[] = {


-- 
	-Alan Coopersmith-        alan.coopersmith at oracle.com
	 Oracle Solaris Platform Engineering: X Window System



More information about the xorg-devel mailing list