[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: getopt broken
From: |
Eric Blake |
Subject: |
Re: getopt broken |
Date: |
Sat, 26 Sep 2009 16:00:34 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Sergey Poznyakoff on 9/26/2009 3:52 PM:
> Eric Blake <address@hidden> ha escrit:
>
>> Oh, I see. getopt in isolation passes, but getopt in combination with
>> argp causes the failure you are seeing. I guess it's because the argp
>> module wants to use lower-level hooks from getopt1.c than what getopt.h
>> normally exposes.
>
> Yes, that's it. Argp uses _getopt_long_only_r, which may well be absent,
> even if the system's libc provides a compatible implementation of
> getopt_long.
Maybe the trick is to check whether _getopt_long_only_r is present to the
linker, in which case we can provide our own declaration of it and avoid
the AC_LIBOBJ([getopt1]). That will make applications using argp
lighter-weight when compiled on GNU/Linux, since they aren't replacing
what is already there.
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkq+jwIACgkQ84KuGfSFAYBLVQCgsu2mgJbB5nNav+JqHL1+4ORV
Y6oAni6YZcLRnld7yB6IRpb55ITZ+NN3
=hfIU
-----END PGP SIGNATURE-----