This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Missing size_t declaration in UAPI
- From: Elichai Turkel <elichai dot turkel at gmail dot com>
- To: Christian Brauner <christian at brauner dot io>
- Cc: linux-api at vger dot kernel dot org, libc-alpha <libc-alpha at sourceware dot org>
- Date: Sat, 9 Nov 2019 14:15:30 +0200
- Subject: Re: Missing size_t declaration in UAPI
- References: <CALN7hCJRe1uL6pd+VwgzDt=5giMVjvX+YpF28f5qbLOVCZf4GQ@mail.gmail.com> <04EB5627-FD42-4397-995B-FDF051CFCFB5@brauner.io> <CALN7hC+YmHGpniNKBiD03cBnTyO+cqXhrVvE7SdtgEb7GkG-LQ@mail.gmail.com>
After further reading into `nolibc.h` I think not all of it should be
in UAPI (specifically the syscalls wrappers don't).
I think it should be split and both the ASM declarations and the
types(i.e. size_t) should be in UAPI
On Sat, Nov 9, 2019 at 1:52 PM Elichai Turkel <elichai.turkel@gmail.com> wrote:
>
> Hi,
> I'm proposing to move `linux/tools/include/nolibc/nolibc.h` to the
> UAPI interface.
> It would then be included in `linux/types.h`
> Would love feedback before I work on a patch.
>
> Thanks.
> Elichai.
>
> On Fri, Nov 8, 2019 at 11:43 PM Christian Brauner <christian@brauner.io> wrote:
> >
> > On November 8, 2019 10:25:09 PM GMT+01:00, Elichai Turkel <elichai.turkel@gmail.com> wrote:
> >>
> >> Hi,
> >> Currently compiling the following program fails:
> >> ```
> >> #include "linux/signal.h"
> >> void main(void){}
> >> ```
> >> Because of `./asm/signal.h:127:2: error: unknown type name ‘size_t’`.
> >>
> >> I tried patching with `#include <stddef.h>` but there's a local file
> >> with the same name overriding the include.
> >>
> >> How can this be fixed? the `drm` headers seems to work with `uint_*`.
> >>
> >> Right now the `linux/signal.h` header isn't usable without wrapping it
> >> with another header to include/define size_t.
> >>
> >> Thanks,
> >> Elichai.
> >
> >
> > I think it might make sense to always cc the libc mailing list too for these things.
>
>
>
> --
> PGP: 5607C93B5F86650C
--
PGP: 5607C93B5F86650C