This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Convert libiberty to use ISO C prototype style 4/n
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Andreas Tobler <toa at pop dot agri dot ch>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 27 Mar 2005 19:09:50 +0200
- Subject: Re: Convert libiberty to use ISO C prototype style 4/n
- Organization: Integrable Solutions
- References: <m3psxl85y5.fsf@uniton.integrable-solutions.net><4246DECC.4030503@pop.agri.ch>
Andreas Tobler <toa@pop.agri.ch> writes:
| Gabriel Dos Reis wrote:
|
| > Index: libiberty/getopt1.c
| > ===================================================================
| > RCS file: /cvs/gcc/gcc/libiberty/getopt1.c,v
| > retrieving revision 1.5
| > diff -p -r1.5 getopt1.c
| > *** libiberty/getopt1.c 29 Dec 2000 19:37:03 -0000 1.5
| > --- libiberty/getopt1.c 27 Mar 2005 14:36:20 -0000
|
| > int
| > ! getopt_long_only (argc, argv, options, long_options, opt_index)
| > ! int argc;
| > ! char *const *argv;
| > ! const char *options;
| > ! const struct option *long_options;
| > ! int *opt_index;
| > {
| > return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
| > }
| > --- 78,85 ----
| > instead. */
| > int
| > ! getopt_long_only (int argc, char *const *argv, const struct option *options,
| > ! const struct option *long_options, int *opt_index)
|
| Shouldn't it be const char *options as third argument?
Oops. Absolutely.
-- Gaby
2005-03-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
* getopt1.c (getopt_long_only): Fix thinko.
Index: getopt1.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/getopt1.c,v
retrieving revision 1.6
diff -p -r1.6 getopt1.c
*** getopt1.c 27 Mar 2005 15:31:12 -0000 1.6
--- getopt1.c 27 Mar 2005 17:12:45 -0000
*************** getopt_long (int argc, char *const *arg
*** 78,84 ****
instead. */
int
! getopt_long_only (int argc, char *const *argv, const struct option *options,
const struct option *long_options, int *opt_index)
{
return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
--- 78,84 ----
instead. */
int
! getopt_long_only (int argc, char *const *argv, const char *options,
const struct option *long_options, int *opt_index)
{
return _getopt_internal (argc, argv, options, long_options, opt_index, 1);