tech-kern archive

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

Re: ptrdiff_t in the kernel (David Young) writes:

>I would prefer for this to suffice both for the kernel and userland:

>       #include <stdbool.h>    /* for bool */
>       #include <stddef.h>  /* for size_t */

I bet that most places would need something like:
#include <stdbool.h>
#include <stddef.h> 
#if defined(_KERNEL) || defined(_STANDALONE)
#include <sys/types.h>
because the kernel needs a lot more types than provided by the
standard C environment.

If you want to make kernel code use standard C headers, and I think
that's a good idea, then you have to attack a lot more code.
Providing only stdbool.h and stddef.h in the kernel doesn't help,
it just makes things ... different.

Home | Main Index | Thread Index | Old Index