bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gnulib] Re: getopt trouble on uClibc systems


From: Simon Josefsson
Subject: [Bug-gnulib] Re: getopt trouble on uClibc systems
Date: Tue, 13 Jul 2004 12:32:37 +0200
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux)

Paul Eggert <address@hidden> writes:

> I'm following up on your suggested patch in
> <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00010.html>.
> I tried using it with GNU tar (CVS version), and ran into a problem:
> the argp module uses _getopt_long_only_r, but the patch
> conditionalizes the compilation of our getopt on getopt_long_only, so
> hosts that have the latter but not the former can't use the argp
> module.  GNU tar has a hacked-up version of getopt to fix this, but
> I'd rather solve the problem in gnulib once and for all.
>
> One possible solution is to define a macro gl_GETOPT_SUBSTITUTE that
> does all the AC_LIBOBJ and AC_DEFINE stuff, to have gl_GETOPT invoke
> gl_GETOPT_SUBSTITUTE if getopt_long_only doesn't exist, and to have
> gl_ARGP invoke gl_GETOPT_SUBSTITUTE if _getopt_long_only_r doesn't
> exist.  I'm not entirely happy with this approach, as it can mean
> running two different tests for getopt in some cases (when only the
> strictest test is needed, really).  Suggestions welcome....

How about making gl_GETOPT test for _getopt_long_only_r too, instead?
The getopt module is for GNU getopt, after all, so if
_getopt_long_only_r doesn't exist, gnulib should build its own getopt.

Also, doesn't it seem like _getopt_long_only_r should be renamed to
getopt_long_only_r, if applications are supposed to be using it at
all?

Thanks,
Simon





reply via email to

[Prev in Thread] Current Thread [Next in Thread]