[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gnulib] feature request: argp()
From: |
Bruno Haible |
Subject: |
Re: [Bug-gnulib] feature request: argp() |
Date: |
Tue, 10 Jun 2003 22:56:22 +0200 |
User-agent: |
KMail/1.5 |
Simon Josefsson wrote:
> > getopt has the same problem and uses the ELIDE_CODE macro which even
> > supports major, incompatible changes to the API. Given the API change
> > policy of glibc I'd suggest to use the same technique here.
>
> OK, then we are back at the following, which will compile the files
> unconditionally. If you think this is the right thing, I'll send a
> ELIDE_CODE patch for lib/argp*.c later.
I think it's the right thing if and only if the libc maintainers
(libc-alpha at sources dot redhat dot com) want to provide a
_GNU_ARGP_INTERFACE_VERSION macro in <gnu-versions.h>. If they say
it's not needed, then let's assume for the moment that the argp
API will not change, and then we compile the argp*.c file conditionally.
> AC_LIBOBJ does not seem to support adding *.h.
Yes, the .h files can be added to lib_SOURCES or to EXTRA_DIST; it
doesn't matter which one. I think it should work like this:
AC_LIBOBJ(argp-ba)
AC_LIBOBJ(argp-eexst)
AC_LIBOBJ(argp-fmtstream)
AC_LIBOBJ(argp-fs-xinl)
AC_LIBOBJ(argp-help)
AC_LIBOBJ(argp-parse)
AC_LIBOBJ(argp-pv)
AC_LIBOBJ(argp-pvh)
AC_LIBOBJ(argp-xinl)
lib_SOURCES += argp.h argp-fmtstream.h argp-namefrob.h
> Few lib/Makefile add -I- though
I don't think -I- is portable. That's why we copy
alloca_.h to alloca.h
sysexit_.h to sysexits.h
if the system doesn't have this include file.
> > I guess what is needed here is another instance of the fnmatch_.h ->
> > fnmatch.h idiom.
>
> That seems more complicated, and I don't understand what the gain is,
> would you mind explain?
It simplifies the use of the header file: Instead of having to write
#if HAVE_SYSEXITS_H
# include <sysexits.h>
#else
# include "gnulib-sysexits.h"
#endif
the user of the module 'sysexits' just writes
#inclyde <sysexits.h>
and the Makefile.am magic does the rest.
For <stdbool.h> and <fnmatch.h> this has been a worthy simplification.
Bruno
- Re: [Bug-gnulib] sysexits.h, (continued)
- Re: [Bug-gnulib] sysexits.h, Bruno Haible, 2003/06/11
- Re: [Bug-gnulib] sysexits.h, Simon Josefsson, 2003/06/11
- Re: [Bug-gnulib] sysexits.h, Paul Eggert, 2003/06/11
- Re: [Bug-gnulib] sysexits.h, Bruno Haible, 2003/06/11
- Re: [Bug-gnulib] sysexits.h, Simon Josefsson, 2003/06/11
- Re: [Bug-gnulib] sysexits.h, Paul Eggert, 2003/06/11
- Re: [Bug-gnulib] sysexits.h, Bruno Haible, 2003/06/12
- Re: [Bug-gnulib] feature request: argp(), Jim Meyering, 2003/06/10
- Re: [Bug-gnulib] feature request: argp(), Bruno Haible, 2003/06/10
- Re: [Bug-gnulib] feature request: argp(), Simon Josefsson, 2003/06/10
- Re: [Bug-gnulib] feature request: argp(),
Bruno Haible <=
- Re: [Bug-gnulib] feature request: argp(), Simon Josefsson, 2003/06/11
- Re: [Bug-gnulib] feature request: argp(), Bruno Haible, 2003/06/11
- Re: [Bug-gnulib] feature request: argp(), Simon Josefsson, 2003/06/11
Re: [Bug-gnulib] feature request: argp(), Karl Berry, 2003/06/08