From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6781 invoked by alias); 19 Apr 2012 12:19:28 -0000 Received: (qmail 6766 invoked by uid 22791); 19 Apr 2012 12:19:26 -0000 X-SWARE-Spam-Status: No, hits=-7.3 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 19 Apr 2012 12:18:41 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q3JCIfN8002643 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 19 Apr 2012 08:18:41 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q3JCIeZH008331; Thu, 19 Apr 2012 08:18:40 -0400 Message-ID: <4F9002A0.30303@redhat.com> Date: Thu, 19 Apr 2012 12:21:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 MIME-Version: 1.0 To: Pedro Alves CC: gdb-patches@sourceware.org Subject: Re: [PATCH] memmem removed from gdbserver's AC_CHECK_DECLS. References: <20120419102444.16030.63019.stgit@brno.lan> In-Reply-To: <20120419102444.16030.63019.stgit@brno.lan> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-04/txt/msg00623.txt.bz2 On 04/19/2012 11:24 AM, Pedro Alves wrote: > 2012-04-19 Pedro Alves > > * configure.ac: Remove AC_CHECK_DECLS check for memmem. > * server.h (memmem): Remove declaration. > * config.in: Regenerate. > * configure: Regenerate. This actually breaks the build on Windows ... ../../../src/gdb/gdbserver/server.c: In function 'handle_search_memory_1': ../../../src/gdb/gdbserver/server.c:757:7: error: implicit declaration of function 'memmem' [-Werror=implicit-function-declaration] ../../../src/gdb/gdbserver/server.c:757:17: error: assignment makes pointer from integer without a cast [-Werror] because nothing is pointing the compiler at gnulib's build directory, which contains the generated replacement headers (string.h in this case), which contain the memmem declaration for systems that need it, such as mingw32. Missed it before because I had originally written that patch against the new wrapper gnulib, which didn't have this bug. This fixes it. Applied. Note GDB does the exact same thing (discounting the source path difference): INCGNU = -I$(srcdir)/gnulib -Ignulib 2012-04-19 Pedro Alves * Makefile.in (INCGNU): Add -Ignulib. --- gdb/gdbserver/Makefile.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in index 94b9cae..1e78f98 100644 --- a/gdb/gdbserver/Makefile.in +++ b/gdb/gdbserver/Makefile.in @@ -77,7 +77,7 @@ ustinc = @ustinc@ # gnulib LIBGNU = gnulib/libgnu.a -INCGNU = -I$(srcdir)/../gnulib +INCGNU = -I$(srcdir)/../gnulib -Ignulib # We build gnulib directly under the gdbserver build directory, but # its sources don't live directly under gdbserver's source directory.