This is the mail archive of the libc-alpha@sourceware.org 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][BZ #16907] Sync argp.h __attribute__ with gnulib.


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


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