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] Use __unused.0 instead of __unused for user visible struct members

On 11/25/2013 04:21 AM, Justin Cormack wrote:
> On Wed, Nov 13, 2013 at 4:55 PM, 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
>>>>>> <> wrote:
>>>>>>> On Mon, 28 Oct 2013, Justin Cormack wrote:
>>>>>>>> A patch was submitted for this a while back
>>>>>>>> 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
>>    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.
> I have done 1. I don't have permission to edit that wiki page (user
> JustinCormack). I suggest something like:
> == Unused structure members ==
> Structure members that are not used, but inserted for padding,
> alignment and future use reasons, should be named '__glibc_reserved'
> or numbered with 'glibc_reserved1', 'glibc_reserved2' in the case of
> multiple parameters. This form should be used instead of the historic
> '__unused' as this conflicts with the use of '__unused' in BSD code.
> These structure members should not be used in user code, as they are
> subject to change and vary by architecture and are reserved for the
> implementation.


Thanks. I've added you to the EditorGroup so you can change
the wiki, but given that I've checked in the __block fixes for Clang's
-fblock extension I'd already added a paragraph about this. Thus I
don't think there is anything else to do but checkin the patch.


Would you like to check this in? Otherwise I can do it.


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