[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 15:30:23 -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:24 PM:
> The reason is that the declarations of getopt_long and getopt_long_r
> both use __getopt_argv_const, which is normally defined in getopt.h.
> However, if the system already has getopt.h, it gets included and
> further contents of the gnulib's getopt.h is ignored.
>
> Attempts to define __getopt_argv_const in getopt1.c won't fix the bug,
> since it is not known whether to define it to empty string or to const
> (see comment at getopt.in.h:39). Actually, it is impossible to include
> system's getopt.h and to ensure its declarations of getopt_long (et al.)
> match those in gnulib's getopt1.c.
>
> Any ideas how to fix it?
Sounds like we need to follow the pattern of other replacement headers,
and use #if @REPLACE_GETOPT@ rather than #ifdef __GETOPT_PREFIX
everywhere. I'll see what I can do.
- --
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+h+8ACgkQ84KuGfSFAYB+JgCfTAwdDuIu0cFCwXc2Y43KfY6p
YSkAn0/aXl8RteqjCPIVR/7x6gtNW2aw
=YJ5v
-----END PGP SIGNATURE-----