Re: status of u32 type in 2.6.29.4 ?

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

 



Do u notice the macro " #ifdef  __KERNEL__ " in these headers?
u compile the kernel it will declare this macro.
give a web link i think maybe it can give u some help.
http://www.linuxforums.org/forum/linux-programming-scripting/54130-inclusion-kernel-header-files.html

BRs
Lin

2009/8/1 Microbit_Ubuntu <microbit@xxxxxxxxxxxxxxxxxxxxxx>:
> On Fri, 2009-07-31 at 08:53 +1000, Microbit_Ubuntu wrote:
>> Hi all,
>>
>> I'm a bit confused as to the status of the type 'u32' in the kernel I
>> use (2.6.29.4).
>> u32 is used in thread_info.h, but types.h uses __u32.
>>
>> Now, while googling I came across a recent patch -
>> {Mon Feb 09 2009 Chuck Ebbert <cebbert@xxxxxxxxxx> +- Fix type in header
>> so iptables will build. (#484679) }
>> Although not related, it's the same issue - the patch applies a change
>> from u32 to __u32.
>>
>> Should I change the type u32 -> __u32 in thread_info.h  ???
>> I'm not comfortable with that because that's "stable" kernel source.
>>
>> Or am I simply overlooking some runtime constant/defintion I should have
>> present...
>> I can't see why that would be, I've built various modules before, never
>> had an issue like this.. ?
>>
>>
>> For reference, this is the chain (module.h -> downwards) - that causes
>> the error :
>>
>> In file included
>> from /home/kris/buildroot-2009.05/toolchain_build_arm_nofpu/linux-2.6.29.4/include/linux/preempt.h:9,              from /home/kris/buildroot-2009.05/toolchain_build_arm_nofpu/linux-2.6.29.4/include/linux/spinlock.h:50,                 from /home/kris/buildroot-2009.05/toolchain_build_arm_nofpu/linux-2.6.29.4/include/linux/mmzone.h:7,                 from /home/kris/buildroot-2009.05/toolchain_build_arm_nofpu/linux-2.6.29.4/include/linux/gfp.h:4,                 from /home/kris/buildroot-2009.05/toolchain_build_arm_nofpu/linux-2.6.29.4/include/linux/kmod.h:22,                 from /home/kris/buildroot-2009.05/toolchain_build_arm_nofpu/linux-2.6.29.4/include/linux/module.h:13,                   from ../my_foo.c:11:
>> /home/kris/buildroot-2009.05/toolchain_build_arm_nofpu/linux-2.6.29.4/include/linux/thread_info.h:26: error: expected specifier-qualifier-list before 'u32'
>> /home/kris/buildroot-2009.05/toolchain_build_arm_nofpu/linux-2.6.29.4/include/linux/thread_info.h:39: error: expected specifier-qualifier-list before 'u64'
>>
>
>
> Hm, perhaps I should have clarified that this module compiles fine using
> the standard Make approach.  (eg. make M=path_to_workspace).
> I'm a bit at a loss why the u32 datatype isn't a problem when using the
> module make... :
> It's when I use Eclipse CDT (Galileo), that the indexer screws up and
> content lost fails, together with compilation error.
> While Googling I've come across threads about bug in Eclipse CDT.
> I'm still trying to resolve this.
>
> I realise this isn't an Eclipse group, but at first I thought the
> problem was in my kernel setup, it isn't.
> Anyone here who found an elegant solution to this CDT problem ? (You
> never know). I don't really know yet if/how the procedure is to debug
> with remote GDB (from within Eclipse) for modules.
>
> I presume Galileo can be tamed to handle Kernel modules.... (?)
> Compiling and debugging from the IDE for "normal" userspace code works
> fine with dynamic or static linked libraries.
>
> I'm trying to get this going because it's possible to learn the kernel
> that much faster again, Galileo's content index brings up all relevant
> structs, macros etc etc. in 1-2-3...
>
> I'm using GCC 4.3.2 on ARM9 cross-target btw.
>
> Thanks in advance for any possible insight or tips !
>
> --
> Best regards,
> Kris
>
>
>
> --
> To unsubscribe from this list: send an email with
> "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
> Please read the FAQ at http://kernelnewbies.org/FAQ
>
>

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux