This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH][BZ #16907] Sync argp.h __attribute__ with gnulib.
- From: Aurelien Jarno <aurelien at aurel32 dot net>
- To: OndÅej BÃlka <neleai at seznam dot cz>
- Cc: Paul Eggert <eggert at cs dot ucla dot edu>, Will Newton <will dot newton at linaro dot org>, libc-alpha <libc-alpha at sourceware dot org>, bug-gnulib at gnu dot org
- Date: Tue, 3 Jun 2014 21:37:01 +0200
- Subject: Re: [PATCH][BZ #16907] Sync argp.h __attribute__ with gnulib.
- Authentication-results: sourceware.org; auth=none
- References: <20140518125743 dot GA11620 at domone dot podge> <CANu=Dmjb+Zwup9m7r4EXWx+VFO4HYDC1ifW08AQKjtJ0P4UUhA at mail dot gmail dot com> <20140523100038 dot GA15258 at domone dot podge> <537F60D7 dot 3060106 at cs dot ucla dot edu> <20140523173457 dot GA26513 at domone dot podge> <20140603105911 dot GA13498 at hall dot aurel32 dot net> <20140603112800 dot GA23233 at domone dot podge>
On Tue, Jun 03, 2014 at 01:28:00PM +0200, OndÅej BÃlka wrote:
> On Tue, Jun 03, 2014 at 12:59:11PM +0200, Aurelien Jarno wrote:
> > On Fri, May 23, 2014 at 07:34:57PM +0200, OndÅej BÃlka wrote:
> > > On Fri, May 23, 2014 at 07:53:11AM -0700, Paul Eggert wrote:
> > > > OndÅej BÃlka wrote:
> > > > >CCing gnulib. Could this be backported also there or do you have
> > > > >different solution?
> > > >
> > > > We solved this problem in a different way years ago, using something
> > > > like this:
> > > >
> > > > #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR >= 7)
> > > > # define _GL_ATTRIBUTE_FORMAT(s) __attribute__ ((__format__ s))
> > > > #else
> > > > # define _GL_ATTRIBUTE_FORMAT(s)
> > > > #endif
> > > >
> > > > and then using _GL_ATTRIBUTE_FORMAT ((__printf__, 2, 3)) later,
> > > > instead of __attribute__ ((__format__ (__printf__, 2, 3))).
> > > > Presumably glibc could do something similar. Glibc could use a
> > > > different name; that's all right, gnulib will just switch to the
> > > > name that glibc uses.
> > >
> > > Ok, here is patch that does that with unchanged name (Does somebody have
> > > better one?).
> > >
> > > As I looked at header differences they are mostly minor, like using
> > > `foo' instead "foo" in comments so it migth be worthwhile to sync them
> > > up.
> > >
> > >
> > > * argp/argp-fmtstream.h (_GL_ATTRIBUTE_FORMAT): Define.
> > > (argp_error, argp_failure): Use _GL_ATTRIBUTE_FORMAT.
> > > * argp/argp.h (__argp_fmtstream_printf): Likewise.
> >
> > Thanks for working on this issue. The patch looks fine to me, and I have
> > just tested it, it fixes the original issue. Please also note that your
> > patch doesn't apply cleanly, it seems there are some issue with the
> > context.
> >
> Yes, I created that by taking a diff and removing extra parts so that
> change man typo. A fixed version is here.
Yes, I confirm it now applies cleanly. I think everything is ok now.
Thanks,
Aurelien
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurelien@aurel32.net http://www.aurel32.net