develooper Front page | perl.perl5.porters | Postings from January 2006

Re: [PATCH] snprintf() and vsnprintf() (was Re: [PATCH] Configure: stdio char (un)signedness)

Thread Previous | Thread Next
From:
Steve Peters
Date:
January 4, 2006 07:17
Subject:
Re: [PATCH] snprintf() and vsnprintf() (was Re: [PATCH] Configure: stdio char (un)signedness)
Message ID:
20060104151712.GA7466@mccoy.peters.homeunix.org
On Tue, Jan 03, 2006 at 08:52:14PM -0600, Steve Peters wrote:
> On Wed, Jan 04, 2006 at 02:45:51AM +0100, Abe Timmerman wrote:
> > Op een mooie winterdag (Tuesday 03 January 2006 16:51),schreef  H.Merijn 
> > Brand:
> > > On Mon, 2 Jan 2006 09:37:27 -0600, Steve Peters <steve@fisharerojo.org> 
> > wrote:
> > > > On Mon, Jan 02, 2006 at 07:53:53AM +0200, Jarkko Hietaniemi wrote:
> > > > > H.Merijn Brand wrote:
> > > > > > On Sat, 26 Nov 2005 11:25:18 +0200, Jarkko Hietaniemi
> > > > > >
> > > > > > <jhietaniemi@gmail.com> wrote:
> > > > > >> Not that the detection of the stdio char signedness is all that
> > > > > >> important these days, but I grew bored by these warnings in Tru64:
> > > > > >
> > > > > > Sorry for the delay. This sounds very reasonable, and I have applied
> > > > > > this in change #26557. Thanks.
> > > > >
> > > > > If I may present a tiny wish for (5.9.3) Configure; since we seem to
> > > > > scan for the safe strl*() functions these days, how about also scanning
> > > > > for snprintf() and vsnprintf(), for the same reason, providing a safer
> > > > > API for  people doing XS work?  (One might of course use sv_*pvf*() for
> > > > > the same effect, but sometimes that is an overkill.)  (Use also
> > > > > Porting/checkcfgvar.pl, and tweak vms/*.)
> > > > > Thank you.
> > > >
> > > > Adding support for snprintf() and vsnprintf() isn't too difficult to do
> > > > if you optimistically (or foolishly) assume these functions both return
> > > > int's as POSIX specifies.  As both functions are relatively new to most
> > > > libc's, I'll assume the standards are being followed for now.
> > > >
> > > > Bellow is the patch of what would be needed to make it work.
> > > > Of course, metaconfig should be used to make this happen, and I left off
> > > > the necessary changes to Porting/Glossary due to the large "DO NO EDIT
> > > > THIS FILE" warning.
> > >
> > > Thanks, I have applied it a bit modified because of sorting issues and
> > > typoes :) in change #26606
> > 
> > Shouldn't the config_h.SH bits also be added to the Win*/config_H.* files?
> > Also add the d_snprintf and d_vsnprintf to VMS configure.com?
> > 
> > I have no idea what the values should be on these platforms...
> > 
> 
> >From what I saw on MSDN, both functions appear to be defined on Win32.  I've
> added them appropriately to all the various configuration files for Win32.
> For VMS, I'd appreciate some help.
> 
For now, I've defaulted snprintf() and vsnprintf() to "undef" on VMS after
some prodding from Abe.  Jarkko, bless his heart, emailed me updated 
configurations for nearly all the other separately supported platforms. :)
These additional configuration changes have come through as changes #26630, 
#26632, and #26639.

Thanks,

Steve Peters
steve@fisharerojo.org

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About