git-svn: trunk@4766
Török Edvin authored on 2009/02/13 04:06:29... | ... |
@@ -1,3 +1,8 @@ |
1 |
+Thu Feb 12 21:35:15 EET 2009 (edwin) |
|
2 |
+------------------------------------ |
|
3 |
+ * shared/getopt.c, shared/getopt.h: make prototype compatible with |
|
4 |
+ that declared in system headers. (bb #1383) |
|
5 |
+ |
|
1 | 6 |
Thu Feb 12 21:34:54 EET 2009 (edwin) |
2 | 7 |
------------------------------------ |
3 | 8 |
* libclamav/scanners.c: fix valgrind warning (bb #1371) |
... | ... |
@@ -46,8 +46,9 @@ int getopt_reset(void) |
46 | 46 |
/* if you're porting some piece of UNIX software, this is all you need. */ |
47 | 47 |
/* this supports GNU-style permution and optional arguments */ |
48 | 48 |
|
49 |
-int getopt(int argc, char * argv[], const char *opts) |
|
49 |
+int getopt(int argc, char * const argvc[], const char *opts) |
|
50 | 50 |
{ |
51 |
+ char **argv = (char*)argvc; |
|
51 | 52 |
static int charind=0; |
52 | 53 |
const char *s; |
53 | 54 |
char mode, colon_mode; |
... | ... |
@@ -34,7 +34,7 @@ extern "C" { |
34 | 34 |
extern int getopt_reset(void); |
35 | 35 |
|
36 | 36 |
/* UNIX-style short-argument parser */ |
37 |
-extern int getopt(int argc, char * argv[], const char *opts); |
|
37 |
+extern int getopt(int argc, char * const argv[], const char *opts); |
|
38 | 38 |
|
39 | 39 |
extern int optind, opterr, optopt; |
40 | 40 |
extern char *optarg; |