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: "H. J. Lu" <hjl at lucon dot org>
- To: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- Cc: binutils at sourceware dot org
- Date: Wed, 4 May 2005 16:13:15 -0700
- Subject: Re: sysdep.h:stpcpy change caused build error in autotester
- References: <200505042258.j44MwgHn026816@ignucius.se.axis.com>
On Thu, May 05, 2005 at 12:58:42AM +0200, Hans-Peter Nilsson wrote:
> Namely:
>
> /bin/sh /h/hp/binutils/cvs_latest/src/bfd/../move-if-change bfd-tmp.h bfd.h
> rm -f bfd-tmp.h
> touch stmp-bfd-h
> /bin/sh ./libtool --mode=compile /n/asic/slask/hp/gcc32/p/bin/gcc -DHAVE_CONFIG_H -I. -I/h/hp/binutils/cvs_latest/src/bfd -I. -D_GNU_SOURCE -I. -I/h/hp/binutils/cvs_latest/src/bfd -I/h/hp/binutils/cvs_latest/src/bfd/../include -I/h/hp/binutils/cvs_latest/src/bfd/../intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c -o archive.lo /h/hp/binutils/cvs_latest/src/bfd/archive.c
> /n/asic/slask/hp/gcc32/p/bin/gcc -DHAVE_CONFIG_H -I. -I/h/hp/binutils/cvs_latest/src/bfd -I. -D_GNU_SOURCE -I. -I/h/hp/binutils/cvs_latest/src/bfd -I/h/hp/binutils/cvs_latest/src/bfd/../include -I/h/hp/binutils/cvs_latest/src/bfd/../intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c /h/hp/binutils/cvs_latest/src/bfd/archive.c -o archive.o
> In file included from /h/hp/binutils/cvs_latest/src/bfd/archive.c:131:
> /h/hp/binutils/cvs_latest/src/bfd/sysdep.h:129: parse error before "__extension__"
> make[3]: *** [archive.lo] Error 1
>
> I'll investigate and likely fix as obvious.
>
I have no problem. Can you try this?
H.J.
--- bfd/sysdep.h.foo 2005-05-04 13:35:58.000000000 -0700
+++ bfd/sysdep.h 2005-05-04 16:12:09.000000000 -0700
@@ -126,8 +126,11 @@ extern PTR realloc ();
#endif
#if !HAVE_DECL_STPCPY
+#ifndef stpcpy
+/* stpcpy may be a macro. */
extern char *stpcpy (char *__dest, const char *__src);
#endif
+#endif
#if !HAVE_DECL_STRSTR
extern char *strstr ();