From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29480 invoked by alias); 14 May 2005 14:12:10 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 29458 invoked from network); 14 May 2005 14:12:05 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 14 May 2005 14:12:05 -0000 Received: from drow by nevyn.them.org with local (Exim 4.50) id 1DWxN6-0002pU-Ob; Sat, 14 May 2005 10:12:04 -0400 Date: Sat, 14 May 2005 16:39:00 -0000 From: Daniel Jacobowitz To: Eli Zaretskii Cc: gcc-patches@gcc.gnu.org, gdb-patches@sources.redhat.com Subject: Re: [RFA] Eliminate warnings about snprintf declaration Message-ID: <20050514141204.GA10684@nevyn.them.org> Mail-Followup-To: Eli Zaretskii , gcc-patches@gcc.gnu.org, gdb-patches@sources.redhat.com References: <41994B9D.9080809@gnu.org> <01c55702$Blat.v2.4$d4764900@zahav.net.il> <20050512150804.GA1808@nevyn.them.org> <01c55708$Blat.v2.4$cfc9f040@zahav.net.il> <20050512154716.GA3513@nevyn.them.org> <01c5570e$Blat.v2.4$1c533160@zahav.net.il> <20050512162453.GA5180@nevyn.them.org> <01c55732$Blat.v2.4$e9bd3640@zahav.net.il> <20050512205103.GB13519@nevyn.them.org> <01c5586c$Blat.v2.4$a7dfc720@zahav.net.il> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <01c5586c$Blat.v2.4$a7dfc720@zahav.net.il> User-Agent: Mutt/1.5.8i X-SW-Source: 2005-05/txt/msg00349.txt.bz2 On Sat, May 14, 2005 at 01:05:51PM +0300, Eli Zaretskii wrote: > > Date: Thu, 12 May 2005 16:51:03 -0400 > > From: Daniel Jacobowitz > > Cc: gcc-patches@gcc.gnu.org, gdb-patches@sources.redhat.com > > > > > So I need to add these functions to gdb/configure.ac _and_ to > > > libiberty/configure.ac; got it. I will post a revised patch soon. > > > > > > Thanks for your patience. > > > > Almost - you don't actually need them in libiberty/configure.ac, unless > > you see warnings about them during the build of libiberty. To make GDB > > -Werror happy, all you need is gdb/configure.ac and > > include/libiberty.h. > > Actually, I found that a simpler patch to include/libiberty.h (below) > is all that is needed to fix all the warnings about snprintf and > vsnprintf. libiberty.h already does that for asprintf and vasprintf, > so I think we can use the same method for snprintf and vsnprintf; no > need to change any configure.ac files. > > Okay? > > 2005-05-14 Eli Zaretskii > > * libiberty.h: (snprintf) [!HAVE_DECL_SNPRINTF]: Declare if > needed. > (vsnprintf) [!HAVE_DECL_VSNPRINTF]: Declare if needed. Note that this will only work if there are no systems which declare snprintf with an incorrect prototype. For instance, a missing const on the format string in a system header would now generate an error. For asprintf this isn't an issue, because it's not a standard function; it's only provided by glibc. I don't know whether that's a real problem though. I'll let DJ answer that :-) -- Daniel Jacobowitz CodeSourcery, LLC