[lkml]   [2005]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [RFC] Splitting out kernel<=>userspace ABI headers
    On Sep 3, 2005, at 11:36:22, Denis Vlasenko wrote:
    > Is this an exercise in academia? Userspace app which defines
    > uint32_t to anything different than 'typedef <appropriate int type>'
    > deserves the punishment, and one which does have such typedef
    > instead of #include stdint.h will not notice.

    That's not the issue. Say I do this (which is perfectly valid on
    most platforms):

    typedef unsigned int uint32_t;
    #include <linux/loop.h>

    What exactly should happen? If linux/loop.h includes stdint.h to get
    uint32_t, then I'll get duplicate definition errors. If it omits
    stdint.h, then uint16_t won't be defined (because the userspace app
    doesn't think that it needs it) and I'll get undefined type errors.
    Either way, depending on the existence or nonexistence of the POSIX
    types in userspace-accessible kernel headers is not viable.

    > All these u32, uint32_t, __u32 end up typedef-ing to same
    > integer type anyway...

    The point is to provide a type that _isn't_ in some standard so that
    _we_ can define its inclusion rules. If the standards had gone and
    defined "Userspace must include stdint.h or define _all_ types
    appropriately", then we would not have had this issue, but many apps
    in userspace would cease to compile on standards compliant platforms.

    Kyle Moffett

    Somone asked me why I work on this free (
    software stuff and not get a real job. Charles Shultz had the best

    "Why do musicians compose symphonies and poets write poems? They do
    it because
    life wouldn't have any meaning for them if they didn't. That's why I
    cartoons. It's my life."
    -- Charles Shultz

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-09-03 18:42    [W:0.020 / U:5.040 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site