Skip to content

Commit 4af34ee

Browse files
committed
fix constness of getopt* implementation for Windows
1 parent 831532a commit 4af34ee

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

extra/getopt.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ struct option
5555
#define required_argument 1
5656
#define optional_argument 2
5757

58-
int getopt(int, char**, char*);
59-
int getopt_long(int, char**, char*, struct option*, int*);
58+
int getopt(int, char**, const char*);
59+
int getopt_long(int, char**, const char*, struct option*, int*);
6060

6161
#ifdef __cplusplus
6262
}

extra/getopt_long.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ getopt2(int nargc, char * nargv, const char *ostr)
153153
* Parse argc/argv argument vector.
154154
*/
155155
int
156-
getopt_long(int nargc, char ** nargv, char * options, struct option * long_options, int * index)
156+
getopt_long(int nargc, char ** nargv, const char * options, struct option * long_options, int * index)
157157
{
158158
int retval;
159159

0 commit comments

Comments
 (0)