From: Alan Modra <amodra@bigpond.net.au>
To: DJ Delorie <dj@delorie.com>
Cc: binutils@sources.redhat.com, gcc-patches@gcc.gnu.org
Subject: Re: Problems with gcc + exceptions + -pedantic + libiberty.h
Date: Sun, 23 Jun 2002 22:08:00 -0000 [thread overview]
Message-ID: <20020624050831.GB22093@bubble.sa.bigpond.net.au> (raw)
In-Reply-To: <200201080428.g084Sl905133@envy.delorie.com>
On Mon, Jan 07, 2002 at 11:28:47PM -0500, DJ Delorie wrote:
>
> Ok, minus the obvious typo. A similar patch for getopt.h is
> preapproved.
Somehow, I never got around to committing the change, and there are
enough other changes in my local trees that these got lost. Here's
what I finally committed to gcc mainline. binutils can wait for
your automatic merge.
include/ChangeLog
* libiberty.h (basename): Don't declare if HAVE_DECL_BASENAME.
* getopt.h (getopt): Don't declare if HAVE_DECL_GETOPT.
Index: include/getopt.h
===================================================================
RCS file: /cvs/gcc/gcc/include/getopt.h,v
retrieving revision 1.6
diff -u -p -r1.6 getopt.h
--- include/getopt.h 14 Mar 2001 19:44:38 -0000 1.6
+++ include/getopt.h 24 Jun 2002 04:51:24 -0000
@@ -105,16 +105,17 @@ struct option
declaration without arguments. If it is 0, we checked and failed
to find the declaration so provide a fully prototyped one. If it
is 1, we found it so don't provide any declaration at all. */
-#if defined (__GNU_LIBRARY__) || (defined (HAVE_DECL_GETOPT) && !HAVE_DECL_GETOPT)
+#if !HAVE_DECL_GETOPT
+#if defined (__GNU_LIBRARY__) || defined (HAVE_DECL_GETOPT)
/* 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__ */
-# if !defined (HAVE_DECL_GETOPT)
+#else
extern int getopt ();
-# endif
-#endif /* __GNU_LIBRARY__ */
+#endif
+#endif /* !HAVE_DECL_GETOPT */
+
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,
Index: include/libiberty.h
===================================================================
RCS file: /cvs/gcc/gcc/include/libiberty.h,v
retrieving revision 1.27
diff -u -p -r1.27 libiberty.h
--- include/libiberty.h 28 Jan 2002 21:08:34 -0000 1.27
+++ include/libiberty.h 24 Jun 2002 04:51:25 -0000
@@ -73,12 +73,12 @@ extern char **dupargv PARAMS ((char **))
declaration without arguments. If it is 0, we checked and failed
to find the declaration so provide a fully prototyped one. If it
is 1, we found it so don't provide any declaration at all. */
-#if defined (__GNU_LIBRARY__ ) || defined (__linux__) || defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__CYGWIN__) || defined (__CYGWIN32__) || (defined (HAVE_DECL_BASENAME) && !HAVE_DECL_BASENAME)
+#if !HAVE_DECL_BASENAME
+#if defined (__GNU_LIBRARY__ ) || defined (__linux__) || defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__CYGWIN__) || defined (__CYGWIN32__) || defined (HAVE_DECL_BASENAME)
extern char *basename PARAMS ((const char *));
#else
-# if !defined (HAVE_DECL_BASENAME)
extern char *basename ();
-# endif
+#endif
#endif
/* A well-defined basename () that is always compiled in. */
--
Alan Modra
IBM OzLabs - Linux Technology Centre
next prev parent reply other threads:[~2002-06-24 5:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-07 16:07 John Levon
2002-01-07 16:16 ` DJ Delorie
2002-01-07 16:21 ` Alan Modra
2002-01-07 17:38 ` DJ Delorie
2002-01-07 20:28 ` Alan Modra
2002-01-07 21:49 ` DJ Delorie
2002-01-08 11:23 ` John Levon
2002-01-08 12:52 ` DJ Delorie
2002-06-23 22:08 ` Alan Modra [this message]
2002-01-08 10:25 ` John Levon
2002-01-08 14:10 ` DJ Delorie
2002-01-08 3:02 ` Alan Modra
2002-01-07 18:30 ` Andrew Cagney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020624050831.GB22093@bubble.sa.bigpond.net.au \
--to=amodra@bigpond.net.au \
--cc=binutils@sources.redhat.com \
--cc=dj@delorie.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).