Re: [PATCH 1/2] Add strbuf_initf()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 06, 2008 at 07:26:50PM +0100, Johannes Schindelin wrote:
> Hi,
> 
> On Thu, 6 Mar 2008, Kristian Høgsberg wrote:
> 
> > On Thu, 2008-03-06 at 11:55 +0100, Johannes Schindelin wrote:
> >
> > > So your suggestion is out, unless you suggest to implement the whole 
> > > printf mechanism... which I hope you're not.
> > 
> > It's not a terrible idea, honestly.
> 
> Heh.  Yeah, I actually posted a start...
> 
> > There are several mature vsnprintf implementations out there under 
> > friendly licenses.  We could just stick it in compat/.  It's the only 
> > way to do reliable, cross platform vsnprintf, in my experience.  And the 
> > issue with %I64u vs %llu could be handle by implementing both, as Wayne 
> > Davison suggests.
> 
> Sure, we could always copy from somewhere else.  My rationale was that I 
> had fun writing it, and that we do not really need a full printf() 
> implementation.

And vsnprintf is a mess accross systems, returning -1 when not expected.
I even had the surprise to get an interesting bug in liferea/libxml2 due
to glibc's vsnprintf returning -1 in some obscure cases.

Mike
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux