On Sunday 21 April 2013, Philip Guenther wrote:
> On Sun, Apr 21, 2013 at 12:15 PM, Stefan Fritsch <s...@sfritsch.de> 
wrote:
> > On Sunday 21 April 2013, Mark Kettenis wrote:
> ...
> 
> >> You can't put ptrdiff_t in <sys/types.h> either.
> > 
> > Why not? POSIX only speaks about "at least the following types"
> > in sys/types.h, so there is no reason why it may not define more
> > types.
> 
> Well, it can define others as long as it stays within the namespace
> restrictions.  It turns out that ptrdiff_t *is* within the
> permitted namespace (because it ends with "_t").  However, we have
> generally tried to avoid defining more than is required to be
> present so that devs don't accidentally rely on a non-portable
> assumption like that.
> 
> Maybe this should be handled the bool bits in <sys/types.h>,
> wrapping them in #ifdef _KERNEL ?

#ifdef _KERNEL is fine with me.

> Alternatively, if subr_prf.c is the only kernel file which will
> actually need the ptrdiff_t type then perhaps it should just use
> __ptrdiff_t directly.

Actually it's not needed, yet. We could postpone adding it until 
someone actually needs it. But my guess is that this would lead to 
that someone simply choosing some other type.

Reply via email to