This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Use __unused0 instead of __unused for user visiblestruct members
- From: Guillem Jover <guillem at hadrons dot org>
- To: Carlos O'Donell <carlos at systemhalted dot org>
- Cc: "Joseph S. Myers" <joseph at codesourcery dot com>,Ulrich Drepper <drepper at gmail dot com>, libc-alpha at sourceware dot org
- Date: Wed, 8 Feb 2012 16:38:41 +0100
- Subject: Re: [PATCH] Use __unused0 instead of __unused for user visiblestruct members
- References: <20120102030627.GA10869@gaara.hadrons.org><CAOPLpQf_kr1EOguKau_co9Q96tgRNBDwfO6CBNF7jnnSrzEPvA@mail.gmail.com><CADZpyixstsdjeQaJ6WAU4rnY8dGMUi_wgzYCuPxU0uRXxCcSVA@mail.gmail.com><CAOPLpQdnHQ5ezbohKQgRAnofSureJQtcjKiEsNBWVsA5nr9zsA@mail.gmail.com><CADZpyiw7q1bTKb6wNNDbZhbwFKg36oE8+m8M+VtevGzt3JtRfA@mail.gmail.com><CAOPLpQeYL6LAqUu3GQzzK7fcVc7gApKJB6Y5AmKK=mu3m4nbFQ@mail.gmail.com><20120207222700.GA4131@gaara.hadrons.org><Pine.LNX.4.64.1202072239170.4538@digraph.polyomino.org.uk><CADZpyiyGmWVzARfMTpJFtamuJJL1ODxK0OgLe0G+aA4QPR90WQ@mail.gmail.com>
On Wed, 2012-02-08 at 09:39:19 -0500, Carlos O'Donell wrote:
> On Tue, Feb 7, 2012 at 5:41 PM, Joseph S. Myers <joseph@codesourcery.com> wrote:
> >> This is probably my last mail on this issue, as it does not seem to be
> >> going anywhere. Thanks Carlos for your perseverance, though!
> >
> > Actually, I think a rough consensus was reached: establish a convention
> > __glibc_reservedN for padding fields and rename them all. ?See
> > <http://sourceware.org/ml/libc-alpha/2012-02/msg00051.html> and followups.
Ah, thanks!
> Do you have time to publish another patch using the __glibc_ prefix?
Yes, I have now an almost finished, but untested draft patch which does
the following:
* Renames all __pad, __padN, __padded, __private_tm (this one might
be controversial?), __unused, __unusedN symbols to __glibc_reservedN,
where N starts at 1, because that was the prevalent starting index
on the code base.
* Renames the _HAVE_STAT___UNUSED<N> and _HAVE_STAT___PAD<N> type
macros to _HAVE_STAT___GLIBC_RESERVED<N>.
* Renames st_reserved and st_padto_ll to __glibc_reservedN (but those
are only for the AIX struct stat, so see the next paragraph, and
otherwise might be better left alone).
* Renames the malloc_trim function argument from __pad to __glibc_pad,
to avoid similar overlaps too.
While going through the code I found the following things:
* _HAVE___UNUSED<N> and _HAVE___PAD<N> macros do not seem to be used
anywhere (not even on ports), do you want them removed?
* Is the stuff under sysdeps/unix/sysv/linux/powerpc/aix/ actually used
anywhere? If not, do you want it removed too?
If these look sane, I'll polish, test and send for review.
thanks,
guillem