tech-kern archive

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

Re: ptrdiff_t in the kernel



>>>> 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.
>
> That surprises me.  Easy enough to add.
>
> http://www.netbsd.org/~matt/ptrdiff-diff.txt

I replied this in
http://mail-index.netbsd.org/tech-kern/2013/12/04/msg016211.html.

>>> 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.
>
> Actually, it would be offensive.

Why?

Regards,
-- 
Lourival Vieira Neto


Home | Main Index | Thread Index | Old Index