This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: sysdep.h:stpcpy change caused build error in autotester
- From: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- To: binutils at sourceware dot org
- Cc: hongjiu dot lu at intel dot com
- Date: Thu, 5 May 2005 01:30:24 +0200
- Subject: Re: sysdep.h:stpcpy change caused build error in autotester
> Date: Thu, 5 May 2005 00:58:42 +0200
> From: Hans-Peter Nilsson <hp@axis.com>
> I'll investigate and likely fix as obvious.
I committed this one, that I've tested by editing and resuming
the test in the autotester (cris-axis-elf) directory.
A better solution IMHO, but more invasive, would be to compile
all of binutils with -D__USE_GNU, so prototypes of all
non-standard functions are exposed (apparently a bug in
glibc-2.2.5 that the macro is still exposed).
I wonder why -D__USE_GNU isn't used.
* sysdep.h (stpcpy): Wrap declaration in parentheses.
Index: sysdep.h
===================================================================
RCS file: /cvs/src/src/bfd/sysdep.h,v
retrieving revision 1.13
diff -u -p -r1.13 sysdep.h
--- sysdep.h 4 May 2005 22:15:30 -0000 1.13
+++ sysdep.h 4 May 2005 23:21:37 -0000
@@ -126,7 +126,9 @@ extern PTR realloc ();
#endif
#if !HAVE_DECL_STPCPY
-extern char *stpcpy (char *__dest, const char *__src);
+/* With glibc, not exposed without -D__USE_GNU, but some old versions
+ (2.2.5-34 on RH 7.3) still expose the macro. */
+extern char *(stpcpy) (char *__dest, const char *__src);
#endif
#if !HAVE_DECL_STRSTR
brgds, H-P