This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Convert libiberty to use ISO C prototype style 4/n


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);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]