kioslave/media compile error

Ismail Donmez ismail at kde.org.tr
Sat Dec 18 18:41:02 GMT 2004


On Saturday 18 December 2004 20:27, Martin Koller wrote:
> On Saturday 18 December 2004 18:11, Kévin Ottens wrote:
> > I found this in asm/types.h :
> >
> > #if defined(__GNUC__)
> > __extension__ typedef __signed__ long long __s64;
> > __extension__ typedef unsigned long long __u64;
> > #endif
> >
> >
> > Using gcc (GCC) 3.3.4 and kernel 2.6.7 it compiles fine...
>
> What I find strange is that in the plain vanilla 2.6.7 Linux sources I find
> in asm/types.h (i386 Platform) still the lines:
>
> #if defined(__GNUC__) && !defined(__STRICT_ANSI__)
>
> Did you remove the !defined(__STRICT_ANSI__) part on your own ?
>
> From the g++ manual:
> The macro `__STRICT_ANSI__' is predefined when the `-ansi' option is used.
>

__u64 is a long long variable and ANSI doesn't support long long types. Thats 
why kernel headers have !defined(__STRICT_ANSI__) checks. Either #undef 
__STRICT_ANSI__ before including linux/cdrom.h and buggy friends or stop 
using kernel headers in userspace as Thiago as already pointed out.

One can argue that this is a linux kernel header bug. But linux kernel headers 
are never designed to be used in userspace applications.

Cheers,
ismail





More information about the kde-core-devel mailing list