Dan Fandrich wrote
On Wed, Sep 15, 2010 at 12:01:00PM +0200, Alessandro Rubini wrote:
But putchar and fwrite cannot evaluate the arguments more than once.
So the patch is fine for putc (the part I don't quote here), but
is wrong (i.e., unneeded) for the two hunks above.
OpenWatcom for one, defines putchar() as a macro in some configurations,
so there, at at least, it's not wrong. I changed the fwrite() loop only
for consistency with the putc() loop immediately below.
The Linux man-page says:
putc() is equivalent to fputc() except that it may be implemented
as a macro which evaluates stream more than once.
putchar(c); is equivalent to putc(c,stdout).
There is no mention of c being evaluated more then once, but that may be
part of the Linux implementation.
Ralf Friedl
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox