diff options
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 |
commit | 9921832fa13cef31006cfa69bc5574636c36ac0f (patch) | |
tree | 4faa87a1fbc9842126d3bdc61c0d64285ebcc849 /libc/stdio/fmemopen.c | |
parent | 292e2d7a707449b531422d37cec4608d304da24e (diff) | |
download | uClibc-alpine-9921832fa13cef31006cfa69bc5574636c36ac0f.tar.bz2 uClibc-alpine-9921832fa13cef31006cfa69bc5574636c36ac0f.tar.xz |
Merge from trunk.
Diffstat (limited to 'libc/stdio/fmemopen.c')
-rw-r--r-- | libc/stdio/fmemopen.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libc/stdio/fmemopen.c b/libc/stdio/fmemopen.c index fc7870258..a78d56efc 100644 --- a/libc/stdio/fmemopen.c +++ b/libc/stdio/fmemopen.c @@ -5,10 +5,14 @@ * Dedicated to Toni. See uClibc/DEDICATION.mjn3 for details. */ -#define fopencookie __fopencookie +#include <features.h> +#ifdef __USE_GNU #include "_stdio.h" +libc_hidden_proto(memcpy) +libc_hidden_proto(fopencookie) + #ifndef __UCLIBC_HAS_GLIBC_CUSTOM_STREAMS__ #error no custom streams! #endif @@ -37,7 +41,7 @@ static ssize_t fmo_read(register void *cookie, char *buf, size_t bufsize) bufsize = count; } - __memcpy(buf, COOKIE->buf + COOKIE->pos, bufsize); + memcpy(buf, COOKIE->buf + COOKIE->pos, bufsize); COOKIE->pos += bufsize; return bufsize; @@ -64,7 +68,7 @@ static ssize_t fmo_write(register void *cookie, const char *buf, size_t bufsize) } } - __memcpy(COOKIE->buf + COOKIE->pos, buf, bufsize); + memcpy(COOKIE->buf + COOKIE->pos, buf, bufsize); COOKIE->pos += bufsize; if (COOKIE->pos > COOKIE->eof) { @@ -176,3 +180,4 @@ FILE *fmemopen(void *s, size_t len, const char *modes) return NULL; } +#endif |