This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Use __unused.0 instead of __unused for user visible struct members
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: OndÅej BÃlka <neleai at seznam dot cz>
- Cc: Justin Cormack <justin at specialbusservice dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>, libc-alpha at sourceware dot org
- Date: Thu, 21 Nov 2013 13:41:09 -0500
- Subject: Re: [PATCH] Use __unused.0 instead of __unused for user visible struct members
- Authentication-results: sourceware.org; auth=none
- References: <CAK4o1WzkMk8nV2jzM38peutbMWuKBPTeh5dbfwSiDhankAT=Yw at mail dot gmail dot com> <Pine dot LNX dot 4 dot 64 dot 1310281328500 dot 25699 at digraph dot polyomino dot org dot uk> <CAK4o1WxO9=qbKUiJtZtS+Q9Wyo8EfNrO_H8=J_w=zcQP822Dvw at mail dot gmail dot com> <20131105135404 dot GA20687 at domone dot podge> <528303CA dot 3050901 at redhat dot com> <20131113110951 dot GA2926 at domone dot podge> <5283AF16 dot 9010407 at redhat dot com>
On 11/13/2013 11:55 AM, Carlos O'Donell wrote:
> On 11/13/2013 06:09 AM, OndÅej BÃlka wrote:
>> On Tue, Nov 12, 2013 at 11:44:58PM -0500, Carlos O'Donell wrote:
>>> On 11/05/2013 08:54 AM, OndÅej BÃlka wrote:
>>>> On Mon, Oct 28, 2013 at 03:41:18PM +0000, Justin Cormack wrote:
>>>>> On Mon, Oct 28, 2013 at 1:30 PM, Joseph S. Myers
>>>>> <joseph@codesourcery.com> wrote:
>>>>>> On Mon, 28 Oct 2013, Justin Cormack wrote:
>>>>>>
>>>>>>> A patch was submitted for this a while back
>>>>>>> https://sourceware.org/ml/libc-alpha/2012-01/msg00001.html and did not
>>>>>>> get a good reception from the maintainer at the time. Attached is an
>>>>>>> updated version for current glibc head.
>>>>>>
>>>>>> I believe we had consensus on use of __glibc_reserved as a prefix in such
>>>>>> cases (allowing for __glibc_reserved0, __glibc_reserved1 or
>>>>>> __glibc_reserved_foo, __glibc_reserved_bar in cases where more than one
>>>>>> identifier, or a more meaningful name, is needed).
>>>>>
>>>>> OK, that makes sense, found part of that conversation in the archives.
>>>>> Here is a patch (inline and attached) to convert all uses to
>>>>> __glibc_reserved.
>>>>>
>>>>> Justin
>>>>>
>>>> A mechanical change that looks ok,
>>>>
>>>> It needs changelog so I generated following.
>>>
>>> Could you please repost with the patch and final ChangeLog,
>>> TO me, CC libc-alpha, and I'll review.
>>>
>>> Cheers,
>>> Carlos.
>>>
>> Here
>
> OK to checkin as long as you do 2 more things please:
>
> 1. Email libc-ports and explain that you've made cross-machine
> changes and renamed __unused to __glibc_reserved and to look
> for any unintended breakage.
>
> 2. Update https://sourceware.org/glibc/wiki/Style_and_Conventions
> and add an entry on this to explain that we use __glibc_reserved
> for unused structure entries and that this is done to avoid
> __unused which causes problems with BSD sources.
>
> Thank you for following through with these changes. I've gone
> through them all and looked for anything out of place and didn't
> see anything. I spot checked some headers and uses matched and
> they did.
>
> I have some apprehension at changing the kernel headers because
> it might complicate synching with the kernel headers, but these
> headers represent a real problem in their use of `__unused` and
> coordinating that not to break when building unmodified BSD
> sources would be the next step. That is to say we should approach
> the Linux kernel guys and explain the UAPI should not use __unused
> and isntead should use __linux_unused or __uapi_unused etc. etc.
> Therefore I'm fine with the changes.
Ondrej,
Ping?
I'd like to see this go into 2.19 so we can claim our headers will
work with BSD code that uses __unused :-)
Cheers,
Carlos.