1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
https://bugs.gentoo.org/943880
--- a/lib/error.c
+++ b/lib/error.c
@@ -73,7 +73,7 @@ extern char *program_name;
# if HAVE_STRERROR
# ifndef strerror /* On some systems, strerror is a macro */
-char *strerror ();
+char *strerror (int);
# endif
# else
static char *
--- a/lib/long-options.c
+++ b/lib/long-options.c
@@ -36,11 +36,11 @@ static struct option const long_options[] =
/* Process long options --help and --version, but only if argc == 2.
Be careful not to gobble up `--'. */
void
-parse_long_options (argc, argv,version, usage)
- int argc;
- char **argv;
- void (*version)();
- void (*usage)();
+parse_long_options (
+ int argc,
+ char **argv,
+ void (*version)(void),
+ void (*usage)(int))
{
int c;
int saved_opterr;
@@ -61,7 +61,7 @@ parse_long_options (argc, argv,version, usage)
(*usage) (0);
case 'v':
- (*version) (0);
+ (*version) ();
/* printf ("%s (%s) %s\n", command_name, package, version_string); */
exit (0);
--- a/lib/xstrtol.c
+++ b/lib/xstrtol.c
@@ -65,17 +65,17 @@ extern int errno;
} \
while (0)
-__unsigned long int __strtol ();
+__unsigned long int __strtol (const char*, char**, int);
/* FIXME: comment. */
strtol_error
-__xstrtol (s, ptr, base, val, valid_suffixes)
- const char *s;
- char **ptr;
- int base;
- __unsigned long int *val;
- const char *valid_suffixes;
+__xstrtol (
+ const char *s,
+ char **ptr,
+ int base,
+ __unsigned long int *val,
+ const char *valid_suffixes)
{
char *t_ptr;
char **p;
--- a/lib/getopt.h
+++ b/lib/getopt.h
@@ -101,7 +101,7 @@ struct option
errors, only prototype getopt for the GNU C library. */
extern int getopt (int argc, char *const *argv, const char *shortopts);
#else /* not __GNU_LIBRARY__ */
-extern int getopt ();
+extern int getopt (int argc, char *const *argv, const char *shortopts);
#endif /* __GNU_LIBRARY__ */
extern int getopt_long (int argc, char *const *argv, const char *shortopts,
const struct option *longopts, int *longind);
|