int opterr = 1;\r
int optopt = '?';\r
\r
-int getopt(int argc, char **argv, char *opts)\r
+int getopt(int argc, char **argv, char const *opts)\r
{\r
char *loc;\r
\r
return optopt;\r
}\r
\r
-int getopt_long(int argc, char **argv, char *opts,\r
- struct option *longopts, int *longindex)\r
+int getopt_long(int argc, char **argv, char const *opts,\r
+ const struct option *longopts, int *longindex)\r
{\r
char arg[256];\r
char *str;\r
optional_argument
};
-extern int getopt(int argc, char **argv, char *opts);
-extern int getopt_long(int argc, char **argv, char *opts,
- struct option *longopts, int *longindex);
+extern int getopt(int argc, char **argv, char const *opts);
+extern int getopt_long(int argc, char **argv, char const *opts,
+ const struct option *longopts, int *longindex);
#endif