summaryrefslogtreecommitdiffstats
path: root/libc/stdio/_fwrite.c
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2006-02-26 03:57:14 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2006-02-26 03:57:14 +0000
commit9921832fa13cef31006cfa69bc5574636c36ac0f (patch)
tree4faa87a1fbc9842126d3bdc61c0d64285ebcc849 /libc/stdio/_fwrite.c
parent292e2d7a707449b531422d37cec4608d304da24e (diff)
downloaduClibc-alpine-9921832fa13cef31006cfa69bc5574636c36ac0f.tar.bz2
uClibc-alpine-9921832fa13cef31006cfa69bc5574636c36ac0f.tar.xz
Merge from trunk.
Diffstat (limited to 'libc/stdio/_fwrite.c')
-rw-r--r--libc/stdio/_fwrite.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/libc/stdio/_fwrite.c b/libc/stdio/_fwrite.c
index 600b15e6d..1e0f7ceee 100644
--- a/libc/stdio/_fwrite.c
+++ b/libc/stdio/_fwrite.c
@@ -5,11 +5,12 @@
* Dedicated to Toni. See uClibc/DEDICATION.mjn3 for details.
*/
-#define memrchr __memrchr
-#define memchr __memchr
-
#include "_stdio.h"
+libc_hidden_proto(memchr)
+libc_hidden_proto(memcpy)
+libc_hidden_proto(memrchr)
+
#ifdef __STDIO_BUFFERS
/* Either buffer data or (commit buffer if necessary and) write. */
@@ -35,7 +36,7 @@ size_t attribute_hidden __stdio_fwrite(const unsigned char * __restrict buffer,
if (pending > bytes) {
pending = bytes;
}
- __memcpy(stream->__bufpos, buffer, pending);
+ memcpy(stream->__bufpos, buffer, pending);
stream->__bufpos += pending;
__STDIO_STREAM_VALIDATE(stream);
return bytes;
@@ -43,7 +44,7 @@ size_t attribute_hidden __stdio_fwrite(const unsigned char * __restrict buffer,
/* RETRY: */
if (bytes <= __STDIO_STREAM_BUFFER_WAVAIL(stream)) {
- __memcpy(stream->__bufpos, buffer, bytes);
+ memcpy(stream->__bufpos, buffer, bytes);
stream->__bufpos += bytes;
if (__STDIO_STREAM_IS_LBF(stream)
&& memrchr(buffer, '\n', bytes) /* Search backwards. */