diff options
author | Rob Landley <rob@landley.net> | 2012-03-19 19:19:21 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2012-03-19 19:19:21 -0500 |
commit | ee00a7f4587c1b75dedb71b5aa3d12608fb7b54c (patch) | |
tree | 1898173cb11a34f3565ea134286e1060f8b0e743 /toys/count.c | |
parent | 522d90613ae7dc728a98d3ce3b939b4ad9b30f25 (diff) | |
download | toybox-ee00a7f4587c1b75dedb71b5aa3d12608fb7b54c.tar.gz |
Remove "feature test macros", replace non-portable fdprintf() with standard fprintf().
Diffstat (limited to 'toys/count.c')
-rw-r--r-- | toys/count.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/toys/count.c b/toys/count.c index acc0c69f..0ec3919d 100644 --- a/toys/count.c +++ b/toys/count.c @@ -23,13 +23,14 @@ void count_main(void) { uint64_t size = 0; int len; + char buf[32]; for (;;) { len = xread(0, toybuf, sizeof(toybuf)); if (!len) break; size += len; xwrite(1, toybuf, len); - fdprintf(2, "%"PRIu64" bytes\r", size); + xwrite(2, buf, sprintf(buf, "%"PRIu64" bytes\r", size)); } - fdprintf(2,"\n"); + xwrite(2, "\n", 1); } |