Changeset ba29018 in mainline


Ignore:
Timestamp:
2018-01-15T21:40:49Z (6 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c718bda
Parents:
39330200
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-15 21:20:07)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-15 21:40:49)
Message:

Remove non-standard const qualifier from optarg.

Location:
uspace/lib/c
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/getopt.c

    r39330200 rba29018  
    4949int     optopt = '?';           /* character checked for validity */
    5050int     optreset;               /* reset getopt */
    51 const char *optarg;             /* argument associated with option */
     51char    *optarg;                /* argument associated with option */
    5252
    5353
     
    6767#define INORDER (int)1
    6868
    69 #define EMSG    ""
     69static char EMSG[] = "";
    7070
    7171static int getopt_internal(int, char **, const char *);
     
    7373static void permute_args(int, int, int, char **);
    7474
    75 static const char *place = EMSG; /* option letter processing */
     75static char *place = EMSG; /* option letter processing */
    7676
    7777/* XXX: set optreset to 1 rather than these two */
     
    336336        if (retval == -2) {
    337337                char *current_argv;
    338                 const char *has_equal;
     338                char *has_equal;
    339339                size_t current_argv_len;
    340340                int i, ambiguous, match;
  • uspace/lib/c/include/getopt.h

    r39330200 rba29018  
    5757
    5858/* HelenOS Port - These need to be exposed for legacy getopt() */
    59 extern const char *optarg;
     59extern char *optarg;
    6060extern int optind, opterr, optopt;
    6161extern int optreset;
Note: See TracChangeset for help on using the changeset viewer.