From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11269 invoked by alias); 26 May 2003 04:47:41 -0000 Mailing-List: contact sid-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: sid-owner@sources.redhat.com Received: (qmail 3726 invoked from network); 26 May 2003 04:44:00 -0000 Received: from unknown (HELO main.gmane.org) (80.91.224.249) by sources.redhat.com with SMTP; 26 May 2003 04:44:00 -0000 Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19K9o5-00063r-00 for ; Mon, 26 May 2003 06:41:57 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: sid@sources.redhat.com Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19K9o3-00063Z-00 for ; Mon, 26 May 2003 06:41:55 +0200 From: Ben Elliston Subject: Re: Using vsnprintf or vasprintf in sid Date: Mon, 26 May 2003 04:47:00 -0000 Message-ID: <87y90utizh.fsf@sashimi.wasabisystems.com> References: <3ECE6412.7040007@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@main.gmane.org User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 X-SW-Source: 2003-q2/txt/msg00033.txt.bz2 Hi Dave! Dave Brolley writes: > I have a need for printf-like printing into a buffer, however I have > no control over the input and so I don't know the size of the buffer > which will be required. It looks like vsnprintf (_ISOC99_SOURCE) or > vasprintf (_GNU_SOURCE) are what I need. Is it ok to use these > function in sid and, if so, how do I get configure to add the > necessary -Dxxxx to the sid compilations and (if necessary) specify > the library to look in? I'm not aware of any policy (the problem with SID is that it lacks the strict policies and exciting politics of other free software projects!) that would prevent you from using either of these functions in SID, provided that you use Autoconf tests as you suggest. I think it's important to have a fall-back implementation, though, in the case that neither is available. Take a look at using AC_CHECK_FUNC to do the test and set a #define in config.h to indicate the function(s) presence. If you can, try and isolate the test to the configure script used in the part of the source tree you're working in rather than running the test in the top-level configure script. Cheers, Ben