tech-kern archive

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

Re: ptrdiff_t in the kernel

Hi Matt,

>> Is there a reason to do not have ptrdiff_t defined in the kernel?
>> Shouldn't be OK to define it in sys/cdefs.h? Or even for having
>> stddef.h itself in the kernel?
> It is defined in the kernel and comes from <machine/ansi.h> via
> <sys/types.h>.

Actually, it isn't. Only _BSD_PTRDIFF_T_ is defined by machine/ansi.h.
The ptrdiff_t type is defined only in stddef.h.

> No, <stddef.h> is not allowed in the kernel.  Symbols from it are
> provided via other means.

I know. In fact, I'm asking if it would be alright to allow that.
AFAIK, it would be inoffensive if available in the kernel.

Lourival Vieira Neto

Home | Main Index | Thread Index | Old Index