This is the mail archive of the libc-alpha@sources.redhat.com 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: Portability fix for argp/argp.h.


> Looking into this, I couldn't find the __attribute keyword described
> anywhere, 

Look at the GCC manual.  All the trailing __ are optional on the special
keywords, in fact.  But __attribute__ is the canonical form for that one
and there's no reason not to just fix any __attribute occurrences to
__attribute__ rather than requiring two macros for portability.

> >> +/* Used for extracting the program name from argv[0] */
> >> +extern char *_argp_basename(char *name) __THROW;
> >> +extern char *__argp_basename(char *name) __THROW;
> >> +
> >> +/* Getting the program name given an argp state */
> >> +extern char *_argp_short_program_name(const struct argp_state *state) __THROW;
> >> +extern char *__argp_short_program_name(const struct argp_state *state) __THROW;
> >>  
> >
> > The declarations for these functions definitely need not be in an
> > installed header.  I.e., they don't belong in <argp.h>.
> 
> Definitely, removed.

That doesn't mean repeat the decls so there is no proper checking.
You can put these in a private header file like argp-namefrob.h.


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