From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29381 invoked by alias); 11 Aug 2006 21:13:35 -0000 Received: (qmail 29368 invoked by uid 22791); 11 Aug 2006 21:13:35 -0000 X-Spam-Check-By: sourceware.org Received: from mail.oarcorp.com (HELO mail.oarcorp.com) (216.186.189.5) by sourceware.org (qpsmtpd/0.31) with SMTP; Fri, 11 Aug 2006 21:13:24 +0000 Received: (qmail 20296 invoked by uid 507); 11 Aug 2006 21:13:20 -0000 Received: from 192.168.1.3 by mail.oarcorp.com (envelope-from , uid 501) with qmail-scanner-1.25st (spamassassin: 3.1.1. perlscan: 1.25st. Clear:RC:1(192.168.1.3):. Processed in 0.032424 secs); 11 Aug 2006 21:13:20 -0000 X-Qmail-Scanner-Mail-From: joel.sherrill@oarcorp.com via mail.oarcorp.com X-Qmail-Scanner: 1.25st (Clear:RC:1(192.168.1.3):. Processed in 0.032424 secs Process 20290) Received: from england.oarcorp.com (HELO ?192.168.1.3?) (192.168.1.3) by mail.oarcorp.com with SMTP; 11 Aug 2006 21:13:20 -0000 Message-ID: <44DCF2F0.6010504@oarcorp.com> Date: Mon, 14 Aug 2006 15:43:00 -0000 From: Joel Sherrill User-Agent: Thunderbird 1.5.0.4 (X11/20060614) MIME-Version: 1.0 To: Daniel Jacobowitz , gdb-patches@sourceware.org Subject: Re: GDB 6.5 RTEMS patch References: <44B6AFEF.6050903@oarcorp.com> <20060724202837.GE15759@nevyn.them.org> In-Reply-To: <20060724202837.GE15759@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-08/txt/msg00093.txt.bz2 Daniel Jacobowitz wrote: > On Thu, Jul 13, 2006 at 03:41:19PM -0500, Joel Sherrill wrote: > >> diff -uNr /home/joel/tools-original/gdb-6.5/bfd/sysdep.h gdb-6.5/bfd/sysdep.h >> --- /home/joel/tools-original/gdb-6.5/bfd/sysdep.h 2005-05-05 13:51:14.000000000 -0500 >> +++ gdb-6.5/bfd/sysdep.h 2006-07-13 10:00:00.000000000 -0500 >> @@ -135,7 +135,7 @@ >> #endif >> >> #if !HAVE_DECL_STRSTR >> -extern char *strstr (); >> +/* extern char *strstr (); */ >> #endif >> >> #ifdef HAVE_FTELLO >> > > What's this for? Shouldn't be necessary, of course. > 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: /* Find the first occurrence of NEEDLE in HAYSTACK. Newer gcc versions do this itself. */ #if !defined _HAVE_STRING_ARCH_strstr && !__GNUC_PREREQ (2, 97) # define strstr(haystack, needle) \ (__extension__ (__builtin_constant_p (needle) && __string2_1bptr_p (needle) \ ? (((__const char *) (needle))[0] == '\0' \ ? (char *) (size_t) (haystack) \ : (((__const char *) (needle))[1] == '\0' \ ? strchr (haystack, \ ((__const char *) (needle))[0]) \ : strstr (haystack, needle))) \ : strstr (haystack, needle))) #endif Any thoughts now that I have finally reproduced the odd case that made me want to comment that originally. :) Thanks. --joel