This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 5/6] Make error_t an enumeration on all supported OSes.
- From: Florian Weimer <fweimer at redhat dot com>
- To: Zack Weinberg <zackw at panix dot com>, libc-alpha at sourceware dot org
- Cc: joseph at codesourcery dot com
- Date: Wed, 14 Jun 2017 13:08:47 +0200
- Subject: Re: [PATCH 5/6] Make error_t an enumeration on all supported OSes.
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=fweimer at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com D960CC04B311
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D960CC04B311
- References: <20170610171738.22362-1-zackw@panix.com> <20170610171738.22362-6-zackw@panix.com>
On 06/10/2017 07:17 PM, Zack Weinberg wrote:
> +printf '#include <features.h>\n#include <bits/errno.h>\n' |
> + $CC -E -dM -xc -D_GNU_SOURCE -D_ERRNO_H "$@" - > "$tmp1"
I'm worried this fails to produce a header which is multi-arch-clean
(i.e., on x86-64, produce something which is compatible with x86-64,
i386, and x32). Maybe the situation is better than with the system call
list; at least a cursory glimpse at the kernel sources suggests that
these headers don't have multi-arch preprocessor conditionals there.
It would be safer to have a built-in list of possible errno constant
names and generate a header from that, similar to what I did for the
system call names (but for which we failed to reach consensus).
Thanks,
Florian