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

Re: libc6 and the Linux kernel



> Since the kernel is using libc5 include files, the size of its
> variables will be different from the size of variables of the same
> type in the userland programs compiled for libc6.

You're mixing up things a bit here: The kernel has its own type
definitions that it uses internally. It doesn't use libc5 include
files. The kernel has its own include hierarchy (include/{linux,asm})
that isn't related to any libc.

Ok, incidentally libc5 uses the same types as the kernel most of the
time (or always?), but that doesn't mean that the kernel uses libc5
headers.

> I think I know how to fix userland programs to make them able to
> work with both libc6 _and_ the kernel but my question is:
> 
> is this likely to change in the future? I mean, will the Linux
> kernel use at some time in the future libc6 include files so the
> both the kernel and the userland utilities share the same data types
> (and its sizes)?

These types *can* change (though it's IMHO not very likely...) But for
a clean solution, you should include <asm/posix_types.h> that defines
you the kernel-internal types, e.g. __kernel_uid_t. Then cast your
uid_t values to __kernel_uid_t, and things hopefully should work.

Roman


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: