summaryrefslogtreecommitdiff
path: root/libc/stdio/_fwrite.c
diff options
context:
space:
mode:
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. */