On Sun, Feb 15, 2009 at 07:43:47PM +0100, Szabolcs Nagy wrote: > On 2/15/09, Marcin Cieslak <sa...@system.pl> wrote: > > Enno "Gottox" Boland <got...@gmail.com> wrote: > >> - fprintf(stderr, "warning: no locale support\n"); > >> + fputs("warning: no locale support\n", stderr); > > > > Depends on a code style one likes. To quote FreeBSD's style(9): > > > > Use printf(3), not fputs(3), puts(3), putchar(3), whatever; it is > > faster > > and usually cleaner, not to mention avoiding stupid bugs. > > yes, depends on who you ask, from dietlibc FAQ: > > Q: When linking binaries, I get warnings about stdio and printf all the > time. What gives? > A: Since the diet libc was written to make writing small programs > possible, it also tries to assist in the process of seeing causes of > bloat. Premier causes for bloat are stdio and the printf family of > functions...
But in dietlibc puts() is a write() wrapper (so it does no buffering), in glibc puts() is part of stdio and thus uses stdout. Regards, Matthias-Christian