This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Continuing the UAPI split
- From: Szabolcs Nagy <Szabolcs dot Nagy at arm dot com>
- To: Elichai Turkel <elichai dot turkel at gmail dot com>, Florian Weimer <fweimer at redhat dot com>
- Cc: nd <nd at arm dot com>, Christian Brauner <christian dot brauner at ubuntu dot com>, "linux-api at vger dot kernel dot org" <linux-api at vger dot kernel dot org>, libc-alpha <libc-alpha at sourceware dot org>
- Date: Thu, 7 Nov 2019 16:21:05 +0000
- Subject: Re: Continuing the UAPI split
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2hEXGtCOnImziRYCIXufE3Ys3UnlJTh1AcB9xxjxrC4=; b=BHmbY9fCND08ljQmHvex0rx/8w1bFyWDb7cER/0GcqkPBgKUTCG6d+irNYvCqr2PygffUVojg0ML0yVjaghnJdPbLaTsHWwWTXHIFMQkdF2w0lkZwpAGxUZOtANR15itvosOZLX66ovi4UK/PELA7E5h7hEaYb8Tm9i1YjvpzzICHAidBsN/T3yIGiETLhWsbfUyvYD7yrkS4DcENpoxt5JsXG7To2/gEL/JAXq70Z+9f8qjpdEESWcAEb01uTXIJWD/HbVwq9ZcsfJyQ5YUkEDfN7wfYRkVPvqLXU2u6lXg8/2c9uIiFbcB2w0l+OR9jnagt2yHmVi7Rf/DQxFKoQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hJL0GaQyud/SERIfOHwQRO5ql5CH8JVlQjgUV39rcpn4h07Jfd743h+lexEou9swYCkUhhvyGtmFwoeE36t7TrYZCh0nFsVwokwGUPHMcByghjXmxVqvpFaHNvgo35T7TuS4W5BHagsgiaOxRNyS0Dd9Tas1oSXQBnIwOIrQrAiW03ZSGbyYG1UDYvtARquYCCEj78gZXSwfHT0tProXwWBUQHEQt5NCtrj+Bgwz68PM26amn9GR0DxVQggM+bSGseHnIC5Z7S4Qv7yE8+K8XF6GVOUIzHzlW65RIsZlEtOeDHL+0FMOxZ6i2HVi4OIHafq3x6IjFo1Fsr10GaeFDg==
- Original-authentication-results: spf=none (sender IP is ) smtp.mailfrom=Szabolcs dot Nagy at arm dot com;
- References: <CALN7hCK0EXLXjPRPr+tuuF2-uQvkLMCFDNzGhv9HS-jrAz6Hmg@mail.gmail.com> <0B17C6F2-DC2B-4192-B4AD-BD11D6B9F2B6@ubuntu.com> <87zhh7j38y.fsf@oldenburg2.str.redhat.com> <CALN7hCJ_umFqC1L0T19CuiGiGoVwac5807NDw4LiDqSD-VJL=Q@mail.gmail.com>
On 07/11/2019 13:03, Elichai Turkel wrote:
> A rename to the structs/types so they won't collide with libc?
> Prioritizing POSIX conformance in the kernel(I think that ship has long sailed)?
hosted c code can only use linux api headers reliably
if those respect the iso c and posix rules.
linux should maintain a clean set of c headers (or
interface descriptions from which such headers can be
generated).
providing clean headers that work in both hosted and
freestanding environments is not trivial: e.g. the
former requires type definitions to use libc types,
the latter requires type definitions that don't depend
on the libc.
e.g. a possible approach is to use iso c implementation
reserved namespace for all linux api identifiers, so
it's entirely independent of libc and non-conflicting,
then libc headers can replicate declarations that it
wants to expose (with different names and libc types).
(there are other ways, but the current headers are hard
to use which affects a lot of users)
> Or just giving up and telling users they can't just directly include
> both libc headers and kernel headers?
including both libc and linux headers is fragile and
will break differently across the different linux
libc implementations.