tech-kern archive

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

Re: [patch] put ptrdiff_t in the kernel and create sys/stddef.h

On Wed, 04 Dec 2013, David Holland wrote:
(*) A complete scheme for doing it right removes all the _BSD_FOO_T_
drivel and ifdefs scattered in userland headers in favor of:
  - a single header file that defines all the needed types prefixed
    with __, which can be included anywhere;
  - in userland, include-guarded header files akin to sys/null.h
    that define single or common groups of the names without the
    __ prefixes, e.g. <types/size_t.h>;
  - including these header files in the proper places, such as in
    standard userland header files like stddef.h;
  - in the kernel, a single header file that defines all the types
    without the __, that is or is exposed to sys/types.h but does
    not affect userland.

Yes, that's one way of doing it right.

Until such time as somebody does it right, please follow the pattern of what's done already.

--apb (Alan Barrett)

Home | Main Index | Thread Index | Old Index