This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Minor ELF32/ia64 cleanup


On Wed, May 04, 2005 at 01:16:47PM -0700, Steve Ellcey wrote:
> > There is a stpcpy.c in libiberty. Why isn't it used?
> > 
> > 
> > H.J.
> 
> Ah.  It looks like the problem is that there is no declaration for it
> and we are compiling with -Wall so the warning about 'implicit
> declaration' of stpcpy becomes an error.  Is there a libiberty header
> that elfxx-ia64.c should be including in order to get a declaration for
> stpcpy?
> 
> Steve Ellcey

Can you try this?

H.J.
---
2005-05-04  H.J. Lu  <hongjiu.lu@intel.com>

	* configure.in: Add AC_CHECK_DECLS(stpcpy).
	* sysdep.h (stpcpy): New.
	* configure: Regenerate.
	* config.in: Ditto.

--- bfd/configure.in.check	2005-05-04 10:45:12.000000000 -0700
+++ bfd/configure.in	2005-05-04 13:25:42.000000000 -0700
@@ -140,6 +140,7 @@ AC_CHECK_DECLS(free)
 AC_CHECK_DECLS(getenv)
 AC_CHECK_DECLS(malloc)
 AC_CHECK_DECLS(realloc)
+AC_CHECK_DECLS(stpcpy)
 AC_CHECK_DECLS(strstr)
 
 # If we are configured native, pick a core file support file.
--- bfd/sysdep.h.check	2005-05-04 06:59:12.000000000 -0700
+++ bfd/sysdep.h	2005-05-04 13:35:58.000000000 -0700
@@ -125,6 +125,10 @@ extern PTR malloc ();
 extern PTR realloc ();
 #endif
 
+#if !HAVE_DECL_STPCPY
+extern char *stpcpy (char *__dest, const char *__src);
+#endif
+
 #if !HAVE_DECL_STRSTR
 extern char *strstr ();
 #endif


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]