This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: Portability fix for argp/argp.h.
- From: Roland McGrath <roland at redhat dot com>
- To: Simon Josefsson <jas at extundo dot com>
- Cc: Ulrich Drepper <drepper at redhat dot com>,libc-alpha at sources dot redhat dot com
- Date: Fri, 1 Aug 2003 01:30:36 -0700
- Subject: 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.