Re: obstack_printf

2024-06-29 Thread Bruno Haible
Paul Eggert wrote: > While we're on the subject of the *z*printf API, I was surprised to see > the obstack-related functions in stdio.h. Shouldn't they be in obstack.h? glibc has obstack_printf and obstack_vprintf in /usr/include/stdio.h. Gnulib's obstack* modules are intended to mimic glibc, mu

Re: obstack_printf

2008-06-14 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Jim Meyering on 6/14/2008 2:04 AM: | Bruno Haible <[EMAIL PROTECTED]> wrote: | ... |> 1) This C code |> |> const size_t cutoff = 1024; |> char buf[cutoff]; |> |> is understood only by gcc, Tru64 cc, IRIX cc. It fails to compile on

Re: obstack_printf

2008-06-14 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Bruno Haible on 6/14/2008 1:33 AM: | | 5) What do you mean by this comment in tests/test-obstack-printf.c ? | /* In general, don't invoke obstack_* functions inside ASSERT, as | not all compilers can avoid multiple side effects. *

Re: obstack_printf

2008-06-14 Thread Bruno Haible
Eric Blake wrote: > Bruno, thanks for the cleanup. > ... > I likewise much prefer the enum-style of code over macros, having used it > myself elsewhere. OK, as you wish. I committed this. 2008-06-14 Bruno Haible <[EMAIL PROTECTED]> * lib/obstack_printf.c (obstack_vprintf): Define the s

Re: obstack_printf

2008-06-14 Thread Jim Meyering
Bruno Haible <[EMAIL PROTECTED]> wrote: ... > 1) This C code > > const size_t cutoff = 1024; > char buf[cutoff]; > > is understood only by gcc, Tru64 cc, IRIX cc. It fails to compile on other C > compilers: > > Solaris, Sun C 5.0: > cc -O -DHAVE_CONFIG_H -I. -I.. -g -c obstack_printf.c

Re: obstack_printf

2008-06-14 Thread Bruno Haible
Eric Blake wrote: > More than a year ago, I proposed adding obstack_printf: > > http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00188.html > > Well, the time finally came where I'm ready to use it in m4, so here goes. The obligatory proofreading and nitpicking: 1) This C code cons

Re: obstack_printf

2007-04-13 Thread Bruno Haible
Eric Blake wrote: > obstack_printf is glibc specific, and not part of the gnulib obstack > module. Is there interest in supporting obstack_printf alongside the > vasnprintf family? Yes. Since glibc has it, and it can be implemented in a portable way, it is welcome if gnulib provides a substitute.