This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 2/4] Minimize sysdeps code involved in defining major/minor/makedev.
- From: Zack Weinberg <zackw at panix dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Wed, 22 Jun 2016 07:42:09 -0400
- Subject: Re: [PATCH 2/4] Minimize sysdeps code involved in defining major/minor/makedev.
- Authentication-results: sourceware.org; auth=none
- References: <cover dot 1463145139 dot git dot zackw at panix dot com> <1e3999cce2297684a2828e0ef3a15ff8555dd264 dot 1463145139 dot git dot zackw at panix dot com>
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?