Re: gok-1.0.5 break on joystick.h



On Fri, 2005-11-25 at 09:43 -0500, Joseph E. Sacco, PhD wrote:
> Some distributions install the set of linux include files that were used
> to build glibc. Others install the set of linux include files that were
> used to build the current kernel. The include files used to build glibc
> are typically older than those used to build the kernel. That being
> said, there is considerable variation in what is included where.
> 
> Take a look at <linux/joystick.h> and you will most likely see that it
> contains <asm/types.h>. On my 32-bit system <asm/types.h> contains
> 
> 
>         #ifdef __KERNEL__
>         /*
>          * These aren't exported outside the kernel to avoid name space
>         clashes
>          */
>         #define BITS_PER_LONG 32
> 
> which means BIT_PER_LONG is defined only when the macro __KERNEL__ is
> set.
> 
> What to do??? 
> 
> Setting __KERNEL__ when building gok is a huge mistake that will cause
> you much grief. 
> 
> What I would do is add the following to joystick.h
> 
> #ifndef BITS_PER_LONG
> #define BITS_PER_LONG 32
> #endif
> 
> somewhere near the top of the file.
> 
> If you are working on a 64 bit system, adjust according to what you
> found in <asm/types.h>
> 
> -Joseph
Many thanks Joseph, this solved me the problem.

Rgds
Saxa




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]