This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] libc-compat.h for <bits/fcntl-linux.h>

On 05/11/2016 09:15 AM, Carlos O'Donell wrote:
> On 05/08/2016 03:17 PM, Eric Neblock 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.
>>   If I need to provide any more information, then please let me know.
> You are on the right track.
> As Florian pointed out our patch had issues (non-unified and reversed).
> As Florian and Andreas point out, Zack's idea of just using the Linux
> header won't work because of namespace cleanliness.
> I assume the linux side of the patch is here:
> The next problem you have is that the glibc fcntl-linux.h header is
> conditional on various standard defines. Therefore if the glibc headers
> are included first, and some of these standard define are defined, then
> you will still get conflicts. So you need to look at those details, for
> example O_DIRECTORY is unconditionally defined if you include linux's
> header, but it's only defined in some cases for glibc's headers. So if
> you include glibc's headers first, then you need to conditionally define
> O_DIRECTORY in the linux headers.
> So you still have quite a ways to go. As a first submission to Linux
> or glibc, you may wish to choose something easier to fix, or find
> champions in each community that can help your patch get accepted.
> Lastly, please review the contribution checklist:
Hi Carlos,
  I want to thank you for you kind and encouraging words.

  That is the patch that I purposed to the Linux Kernel. In the instance
of O_DIRECTORY, it is conditionally #ifndef in the Linux kernel and the
purposed patch would add a conditional to glibc, so I'm confused on what
conflicts that brings.

  I would be more than happy to work with anyone who wants to help me
get this patch going. I have it to a satisfactory condition for my
needs; however, if I'm going to share it, then it does need to be up to

  When it comes to the checklist, I did notice that the patch Florian
corrected, did omit the ChangeLog entry. I didn't review the patch much
more than a quick glance, but I'm sure everything else is in there.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]