From cd99c1703e7a27d21741a2b814c1ec61bd6301d2 Mon Sep 17 00:00:00 2001 From: Thorsten Lockert Date: Fri, 10 Sep 1999 05:06:42 +0000 Subject: Latest version from Cyclic --- gnu/usr.bin/cvs/lib/ChangeLog | 4 ++++ gnu/usr.bin/cvs/lib/getopt.h | 12 ++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'gnu/usr.bin/cvs/lib') diff --git a/gnu/usr.bin/cvs/lib/ChangeLog b/gnu/usr.bin/cvs/lib/ChangeLog index 6338f847ab6..37cc6ab9f5d 100644 --- a/gnu/usr.bin/cvs/lib/ChangeLog +++ b/gnu/usr.bin/cvs/lib/ChangeLog @@ -1,3 +1,7 @@ +1999-03-26 Jim Kingdon + + * getopt.h: Don't declare the arguments to getopt. + 1999-02-09 Jim Kingdon * vasprintf.c: Removed; there is apparently no clean, portable diff --git a/gnu/usr.bin/cvs/lib/getopt.h b/gnu/usr.bin/cvs/lib/getopt.h index c872f414205..7fc2cca396d 100644 --- a/gnu/usr.bin/cvs/lib/getopt.h +++ b/gnu/usr.bin/cvs/lib/getopt.h @@ -91,14 +91,14 @@ struct option #define optional_argument 2 #if __STDC__ -#if defined(__GNU_LIBRARY__) /* Many other libraries have conflicting prototypes for getopt, with - differences in the consts, in stdlib.h. To avoid compilation - errors, only prototype getopt for the GNU C library. */ -extern int getopt (int argc, char *const *argv, const char *shortopts); -#else /* not __GNU_LIBRARY__ */ + differences in the consts, in stdlib.h. We used to try to prototype + it if __GNU_LIBRARY__ but that wasn't problem free either (I'm not sure + exactly why), and there is no particular need to prototype it. + We really shouldn't be trampling on the system's namespace at all by + declaring getopt() but that is a bigger issue. */ extern int getopt (); -#endif /* not __GNU_LIBRARY__ */ + extern int getopt_long (int argc, char *const *argv, const char *shortopts, const struct option *longopts, int *longind); extern int getopt_long_only (int argc, char *const *argv, -- cgit v1.2.3