This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RFA: include/*.h {Free,Net}BSD have correct prototypes for getopt() and basename().
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Subject: RFA: include/*.h {Free,Net}BSD have correct prototypes for getopt() and basename().
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Mon, 29 Nov 1999 14:43:00 +1100
- CC: Andrew Cagney <ac131313 at cygnus dot com>
- Organization: Cygnus Solutions
Hello,
The attatched updates include/getopt.h and include/libiberty.h to
reflect {Free,Net}BSD's header files.
Andrew
Wed Nov 24 10:55:19 1999 Andrew Cagney <cagney@b1.cygnus.com>
* getopt.h (getopt) : FreeBSD and NetBSD have correctly prototyped
declaration.
* libiberty.h (basename): Ditto.
Index: getopt.h
===================================================================
RCS file: /cvs/cvsfiles/devo/include/getopt.h,v
retrieving revision 1.18
diff -p -r1.18 getopt.h
*** getopt.h 1998/11/11 05:58:03 1.18
--- getopt.h 1999/11/29 02:36:33
*************** struct option
*** 99,105 ****
#define optional_argument 2
#if defined (__STDC__) && __STDC__
! #ifdef __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. */
--- 99,105 ----
#define optional_argument 2
#if defined (__STDC__) && __STDC__
! #if defined (__GNU_LIBRARY__) || defined (__FreeBSD__) || defined (__NetBSD__)
/* 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. */
Index: libiberty.h
===================================================================
RCS file: /cvs/cvsfiles/devo/include/libiberty.h,v
retrieving revision 1.27
diff -p -r1.27 libiberty.h
*** libiberty.h 1999/09/28 22:09:54 1.27
--- libiberty.h 1999/11/29 02:36:33
*************** extern char **dupargv PARAMS ((char **))
*** 36,42 ****
across different systems, sometimes as "char *" and sometimes as
"const char *" */
! #if defined (__GNU_LIBRARY__ ) || defined (__linux__) || defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__CYGWIN__) || defined (__CYGWIN32__)
extern char *basename PARAMS ((const char *));
#else
extern char *basename ();
--- 36,42 ----
across different systems, sometimes as "char *" and sometimes as
"const char *" */
! #if defined (__GNU_LIBRARY__ ) || defined (__linux__) || defined (__FreeBSD__) || defined (__NetBSD__) || defined (__OpenBSD__) || defined (__CYGWIN__) || defined (__CYGWIN32__)
extern char *basename PARAMS ((const char *));
#else
extern char *basename ();