This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Separate out error_t definition
On Sat, Mar 3, 2018 at 9:41 PM, Samuel Thibault
<samuel.thibault@ens-lyon.org> wrote:
> Samuel Thibault, on dim. 04 mars 2018 03:28:06 +0100, wrote:
>> + * stdlib/errno.h (error_t): Move definition to...
>> + * stdlib/bits/types/error_t.h: ... new header.
>
> While looking at other stuff, I saw that perhaps I need to add a
> ./include/bits/types/error_t.h too? (although I don't know why it is
> needed, things went fine without it).
You don't need that, but you _do_ need to put the generic (non-Hurd)
version of bits/types/error_t.h in the top-level bits directory
instead of in stdlib/bits. The top-level bits directory is for the
generic version of bits headers that might get overridden by sysdeps
versions; bits headers in subject-matter directories are used
unconditionally on all platforms.
Yes, this is confusing. I don't remember why the top-level directory
is not sysdeps/generic/bits, which would at least be consistent with
the way the rest of sysdeps works.
Also, I think the Hurd bits/types/error_t.h needs to include
bits/errno.h so that the definition of enum __error_t_codes is
visible.
Rest of the patch looks good to me.
zw