Re: patch for linux-2.6.13-rc1

Marc Aurele La France <[email protected]>
Newsgroups gmane.comp.xfree86.devel
Message-ID <[email protected]>
On Fri, 1 Jul 2005, Jeff Chua wrote:

> The latest linux kernel 2.6.13-rc1 modified joystick.h

> The patch below is needed to compile using the new kernel.

> --- xfree86/xc/programs/Xserver/hw/xfree86/input/ur98/xf86Ur-98.c.org 
> 2005-07-01 13:50:04 +0800
> +++ xfree86/xc/programs/Xserver/hw/xfree86/input/ur98/xf86Ur-98.c 
> 2005-07-01 13:50:47 +0800
> @@ -5,6 +5,8 @@
> #include <string.h>
> #include <errno.h>
> #define inline __inline__
> +#define BITS_PER_LONG 32
> +#define __s64 long
> #include <linux/joystick.h>
>
> #undef BUS_ISA

The #define's this adds are not portable.

__s64 is typedef'ed by <asm/types.h>, but only when using gcc without -ansi.

<asm/types.h> also define's BITS_PER_LONG, but only under 
defined(__KERNEL__).

The relevant chain here is xf86Ur-98.c #include's <sys/types.h> #include's 
<linux/types.h> #include's <asm/types.h>.

Therefore, I suggest you contact the author of this change to 
<linux/joystick.h> and make him/her understand that (s)he has introduced yet 
more userland-visible kernel header breakage.

As to dealing with this in our sources, I'd rather wait and see what, if 
anything, 2.6.13 final does about this.

Marc.

+----------------------------------+-----------------------------------+
|  Marc Aurele La France           |  work:   1-780-492-9310           |
|  Academic Information and        |  fax:    1-780-492-1729           |
|    Communications Technologies   |  email:  [email protected]          |
|  352 General Services Building   +-----------------------------------+
|  University of Alberta           |                                   |
|  Edmonton, Alberta               |     Standard disclaimers apply    |
|  T6G 2H1                         |                                   |
|  CANADA                          |                                   |
+----------------------------------+-----------------------------------+
XFree86 developer and VP.  ATI driver and X server internals.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.