This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Kernel header workarounds in linux/bits/sigcontext.h still necessary?
- From: Florian Weimer <fweimer at redhat dot com>
- To: Zack Weinberg <zackw at panix dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Wed, 29 May 2019 10:02:04 +0200
- Subject: Re: Kernel header workarounds in linux/bits/sigcontext.h still necessary?
- References: <CAKCAbMhG7jrs9UCg7sn9xGubpBHJp4L8-H0V6c7x1C5ttXzGKg@mail.gmail.com>
* Zack Weinberg:
> sysdeps/.../linux/bits/sigcontext.h contains two workarounds for buggy
> kernel headers:
>
> #ifndef sigcontext_struct
> /* Kernel headers before 2.1.1 define a struct sigcontext_struct, but
> we need sigcontext. */
> # define sigcontext_struct sigcontext
>
> # include <asm/sigcontext.h>
>
> /* The Linux kernel headers redefine NULL wrongly, so cleanup afterwards. */
> # define __need_NULL
> # include <stddef.h>
> #endif
>
> The `sigcontext_struct` define has been there since the file was
> created (in 1996) [1], and the attempt to recreate NULL (which,
> incidentallly, will not work if stddef.h has already been included)
> has been there since 2011 [2]. Neither appears to be necessary anymore
> with Linux 4.19's uapi asm/sigcontext.h. Do we know how long ago the
> kernel header bugs were fixed? Could we possibly remove the
> workarounds?
I think we can remove both of these workarounds. Our policy regarding
kernel versions is not entirely clear, but I suspect the intent is to
require Linux 3.2 headers not just for building glibc itself, but also
for building applications against an installed glibc.
Only when it comes to compilers, we aim to support historic tools.
Thanks,
Florian