chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] compiling Chicken 4.7.0 with musl instead of glibc


From: Peter Bex
Subject: Re: [Chicken-hackers] compiling Chicken 4.7.0 with musl instead of glibc
Date: Mon, 6 Feb 2012 09:50:14 +0100
User-agent: Mutt/1.4.2.3i

On Mon, Feb 06, 2012 at 02:45:54AM -0500, John Cowan wrote:
> Sergey scripsit:
> 
> > On the subject of the 'gcov' problem, the word from #musl is:
> >
> >     "gcvt was deprecated/removed some 10-20 years ago..
> >     i could add it if needed, but i've never seen anything use it before
> >     it's similar to sprintf with %g
> >     but omits the decimal point, and maybe some other oddities"
> >
> > What's the right response here?
> 
> Quite right.  It was in UNIX 98 and Posix 2001, but is not part of
> Posix 2008.  Use snprintf() instead.

We already use sprintf or fprintf when gcvt is unavailable (if HAVE_GCVT is
not defined in chicken-config.h).

I don't really see why we have this; why is gcvt favored over printf?
We could just remove the checks altogether and use printf everywhere,
even if gcvt is available.  This would make the code simpler and more
portable.

Cheers,
Peter
-- 
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
                                                        -- Donald Knuth



reply via email to

[Prev in Thread] Current Thread [Next in Thread]