This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/4] Minimize sysdeps code involved in defining major/minor/makedev.


On Fri, May 13, 2016 at 9:26 AM, Zack Weinberg <zackw@panix.com> wrote:
> Presently sys/sysmacros.h is entirely defined in sysdeps.  This would
> mean that the deprecation logic coming up in patch #4 would have to be
> written twice (in generic/ and unix/sysv/linux/).  To avoid that, hoist
> all but the unavoidably system-dependent logic to misc/, leaving a bits/
> header behind.  This also promotes the Linux-specific encoding of dev_t,
> which accommodated 32-bit major and minor numbers in a 64-bit dev_t,
> to generic, as glibc's dev_t is always 64 bits wide.
>
> The former Linux implementation used inline functions to avoid evaluating
> arguments more than once.  After this change, all platforms use inline
> functions, which means that three new symbols are added to the generic ABI.
>
> New ports henceforth need only provide bits/sysmacros.h defining macros
> __makedev_body, __major_body, and __minor_body.
>
> While I was at it, I added a basic round-trip test for these functions.

Ping?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]