This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] libc-compat.h for <bits/fcntl-linux.h>
- From: Eric Neblock <ceneblock at member dot fsf dot org>
- To: Zack Weinberg <zackw at panix dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Mon, 9 May 2016 07:52:11 -0500
- Subject: Re: [PATCH] libc-compat.h for <bits/fcntl-linux.h>
- Authentication-results: sourceware.org; auth=none
- References: <589a6293-be0f-4b55-3a0b-2c180773ad94 at member dot fsf dot org> <CAKCAbMiRMSuMwRcMKLpY9Zu8OB-4zZmQZRUVD7h=z5jca1SQyg at mail dot gmail dot com>
On 05/09/2016 07:47 AM, Zack Weinberg wrote:
> On Sun, May 8, 2016 at 3:17 PM, Eric Neblock <ceneblock@member.fsf.org> wrote:
>> Hello everyone,
>> I've been doing some kernel hacking and added some new flags to the
>> Linux kernel. I want to use these flags in userland without having to in
>> an additional header (<asm-generic/fcntl.h>) and even then, there are
>> conflicts, because almost everything is already defined.
>>
>> As such, I filed a feature request (20050) and was informed about
>> about the process to have compatibility.
>>
>> I've attached a patch that shouldn't break anything. Incidentally,
>> everything in the Linux Kernel matches what is done by glibc.
>
> Rather than this approach, why not have the glibc header include the
> uapi header and rely on its definitions? This might need to be
> conditional on a sufficiently new version of the uapi header being
> available, but it is more future-proof.
>
> zw
>
My only concern with that would be if someone is compiling for BSD,
Solaris, Cygwin, or some other *nix.
In the case of Cygwin, wouldn't everything *appear* to be Linux, but it
wouldn't have the headers?
Eric