From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20384 invoked by alias); 4 Aug 2015 15:42:15 -0000 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 Received: (qmail 20318 invoked by uid 89); 4 Aug 2015 15:42:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL,BAYES_40,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 04 Aug 2015 15:42:09 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id D5A1411CFDC; Tue, 4 Aug 2015 11:42:03 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 7MYcRqn0n1iW; Tue, 4 Aug 2015 11:42:03 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id B103A11CFDF; Tue, 4 Aug 2015 11:41:58 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 2D720472E5; Tue, 4 Aug 2015 08:41:57 -0700 (PDT) Date: Tue, 04 Aug 2015 15:42:00 -0000 From: Joel Brobecker To: Iain Buclaw Cc: gdb-patches@sourceware.org, lgustavo@codesourcery.com Subject: Re: [PATCH] bfd: Fix regression when building bfd on mingw32 Message-ID: <20150804154157.GA4777@adacore.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2015-08/txt/msg00079.txt.bz2 Hi Iain, Thanks for the patch. I've been trying to reproduce, but haven't had much luck so far, not sure why. In the meantime, this patch touches bfd, so it needs to be sent to binutils@ instead. Thanks! On Mon, Jul 20, 2015 at 09:14:04PM +0200, Iain Buclaw wrote: > Hi, > > This patch is as per suggestion from Pedro, I've also added a check > for vasprintf just for completeness sake, and that there is a similar > condition for HAVE_DECL_VASPRINTF in libiberty.h. > > https://sourceware.org/ml/gdb-patches/2015-06/msg00654.html > > As per my comments earlier, I am going blind on this, but it looks > correct to me, and I can at least verify on my machine that I can see: > > configure stage > --- > checking whether asprintf is declared... yes > checking whether vasprintf is declared... yes > --- > config.h > --- > /* Define to 1 if you have the declaration of `asprintf', and to 0 if you > don't. */ > #define HAVE_DECL_ASPRINTF 1 > > /* Define to 1 if you have the declaration of `vasprintf', and to 0 if you > don't. */ > #define HAVE_DECL_VASPRINTF 1 > --- > > So should either one be false, they should have a proper declaration > in libiberty.h > > Luis, can you check this patch is good for you? > > > Regards > Iain > --- > 2015-07-20 Iain Buclaw > > * configure.in: Add asprintf and vasprintf to AC_CHECK_DECLS. > * config.in, configure: Regenerate. > > --- a/bfd/config.in > +++ b/bfd/config.in > @@ -17,6 +17,10 @@ > /* Define to 1 if you have the header file. */ > #undef HAVE_ALLOCA_H > > +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you > + don't. */ > +#undef HAVE_DECL_ASPRINTF > + > /* Define to 1 if you have the declaration of `basename', and to 0 if you > don't. */ > #undef HAVE_DECL_BASENAME > @@ -72,6 +76,10 @@ > */ > #undef HAVE_DECL_STRSTR > > +/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you > + don't. */ > +#undef HAVE_DECL_VASPRINTF > + > /* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you > don't. */ > #undef HAVE_DECL_VSNPRINTF > --- a/bfd/configure > +++ b/bfd/configure > @@ -13819,6 +13819,28 @@ cat >>confdefs.h <<_ACEOF > #define HAVE_DECL_STRSTR $ac_have_decl > _ACEOF > > +ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default" > +if test "x$ac_cv_have_decl_asprintf" = x""yes; then : > + ac_have_decl=1 > +else > + ac_have_decl=0 > +fi > + > +cat >>confdefs.h <<_ACEOF > +#define HAVE_DECL_ASPRINTF $ac_have_decl > +_ACEOF > + > +ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default" > +if test "x$ac_cv_have_decl_vasprintf" = x""yes; then : > + ac_have_decl=1 > +else > + ac_have_decl=0 > +fi > + > +cat >>confdefs.h <<_ACEOF > +#define HAVE_DECL_VASPRINTF $ac_have_decl > +_ACEOF > + > ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" > if test "x$ac_cv_have_decl_snprintf" = x""yes; then : > ac_have_decl=1 > --- a/bfd/configure.ac > +++ b/bfd/configure.ac > @@ -232,6 +232,8 @@ AC_CHECK_DECLS(malloc) > AC_CHECK_DECLS(realloc) > AC_CHECK_DECLS(stpcpy) > AC_CHECK_DECLS(strstr) > +AC_CHECK_DECLS(asprintf) > +AC_CHECK_DECLS(vasprintf) > AC_CHECK_DECLS(snprintf) > AC_CHECK_DECLS(vsnprintf) > AC_CHECK_DECLS(strnlen) -- Joel