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
-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
-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. *
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
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
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
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.