Re: GDB 6.5 RTEMS patch

Daniel Jacobowitz
2006-10-09T19:11:02Z

Sorry about dropping the ball on this again. This was about this
change:

> >> #if !HAVE_DECL_STRSTR
> >>-extern char *strstr ();
> >>+/* extern char *strstr (); */
> >> #endif

On Fri, Aug 11, 2006 at 04:13:20PM -0500, Joel Sherrill wrote:
> I just ran into a configuration tripping the need for this again. I am
> in a chroot'ed
> RH73 environment building RPMs. gcc is from the RPM gcc-2.96-113. Apparently
> strstr is a macro on this configuration. When compiling the interp.c
> file from some
> of the simulators, you get this error.
>
> ../../../gdb-6.5/bfd/sysdep.h:138:22: macro "strstr" requires 2
> arguments, but only 1 given
>
> I think this is the macro is in /usr/include/bits/string2.h causing this:

The macro itself isn't a problem. The problem is that we didn't find
the prototype for the actual function, or the macro, during configure.
I would recommend taking a look at the config.log for the gdb
subdirectory, and searching for the strstr test. There should be a
failed program logged; maybe it's not included some header that it
ought to have.

A guess: does adding ACX_HEADER_STRING to gdb/configure.ac and
regenerating configure help?