[PATCH:xf86-input-mouse] Add ABI checks around XI86_CONFIGURED uses in OS-specific PreInits

Peter Hutterer peter.hutterer at who-t.net
Tue Nov 30 14:01:45 PST 2010


On Mon, Nov 29, 2010 at 10:39:19PM -0800, Alan Coopersmith wrote:
> Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
> ---
>  src/bsd_mouse.c  |    4 ++++
>  src/hurd_mouse.c |    2 ++
>  src/sun_mouse.c  |    2 ++
>  3 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/src/bsd_mouse.c b/src/bsd_mouse.c
> index 8a57226..e9e2649 100644
> --- a/src/bsd_mouse.c
> +++ b/src/bsd_mouse.c
> @@ -483,7 +483,9 @@ wsconsPreInit(InputInfoPtr pInfo, const char *protocol, int flags)
>      pInfo->read_input = wsconsReadInput;
>      pMse->xisbscale = sizeof(struct wscons_event);
>  
> +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
>      pInfo->flags |= XI86_CONFIGURED;
> +#endif
>      return TRUE;
>  }
>  #endif
> @@ -746,7 +748,9 @@ usbPreInit(InputInfoPtr pInfo, const char *protocol, int flags)
>      pInfo->device_control = usbMouseProc;
>      pInfo->read_input = usbReadInput;
>  
> +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
>      pInfo->flags |= XI86_CONFIGURED;
> +#endif
>      return TRUE;
>  }
>  #endif /* USBMOUSE */
> diff --git a/src/hurd_mouse.c b/src/hurd_mouse.c
> index e5c7186..a285a87 100644
> --- a/src/hurd_mouse.c
> +++ b/src/hurd_mouse.c
> @@ -167,7 +167,9 @@ OsMousePreInit(InputInfoPtr pInfo, const char *protocol, int flags)
>      /* Setup the local procs. */
>      pInfo->read_input = OsMouseReadInput;
>      
> +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
>      pInfo->flags |= XI86_CONFIGURED;
> +#endif
>      return TRUE;
>  }
>  
> diff --git a/src/sun_mouse.c b/src/sun_mouse.c
> index 2799947..dd545c7 100644
> --- a/src/sun_mouse.c
> +++ b/src/sun_mouse.c
> @@ -297,7 +297,9 @@ vuidPreInit(InputInfoPtr pInfo, const char *protocol, int flags)
>      pVuidMse->next = vuidMouseList; 
>      vuidMouseList = pVuidMse;
>  
> +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
>      pInfo->flags |= XI86_CONFIGURED;
> +#endif
>      return TRUE;
>  }
>  
> -- 
> 1.7.3.2

Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>

 
Cheers,
  Peter


More information about the xorg-devel mailing list