This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Problems with gcc + exceptions + -pedantic + libiberty.h
On Mon, Jan 07, 2002 at 07:07:04PM -0500, DJ Delorie wrote:
>
> Since Linux is specifically mentioned in libiberty.h, and linux is the
> one having the problem, I suppose it would be acceptable for the
> linux-specific case to do something different in libiberty.h.
>
> However, a better solution is to add the gcc-specific prototype
> detection logic to some common area, and teach projects to use it.
> Then, libiberty.h can default to "no prototype" unless the detection
> tells it what to do.
Why is it that __linux__ etc. means we disregard HAVE_DECL_BASENAME ?
How about the following change?
#if HAVE_DECL_BASENAME
/* Cool. */
#else
#if defined (__GNU_LIBRARY__ ) || defined (__linux__) || defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__CYGWIN__) || defined (__CYGWIN32__)
extern char *basename PARAMS ((const char *));
#else
extern char *basename ();
# endif
#endif
--
Alan Modra
IBM OzLabs - Linux Technology Centre