Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2007-08-03 00:23:06 +0400
committerEric Blake <eblake@redhat.com>2007-08-03 00:23:06 +0400
commit6ddcdb9da510ddf2b6309006ded0827f467e23b4 (patch)
treef0e349d3cc7ad6083b3a652e688d385215a41dc8 /newlib/libc/stdio/fopencookie.c
parent191814588af712faa0093d21a08c51c97abae3f2 (diff)
Implement fmemopen and open_memstream.
* libc/stdio/fmemopen.c (_fmemopen_r, fmemopen): New file. * libc/stdio/open_memstream.c (_open_memstream_r, open_memstream): New file. * libc/stdio/fopencookie.c (fcwriter): Minor optimization. * libc/include/stdio.h (dprintf, vdprintf): Group all POSIX 200x functions together. (fmemopen, open_memstream): Declare new functions. * libc/stdio/stdio.tex: Document them. * libc/stdio/Makefile.am (ELIX_4_SOURCES, CHEWOUT_FILES): Add fmemopen and open_memstream. * libc/stdio/Makefile.in: Regenerate.
Diffstat (limited to 'newlib/libc/stdio/fopencookie.c')
-rw-r--r--newlib/libc/stdio/fopencookie.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/newlib/libc/stdio/fopencookie.c b/newlib/libc/stdio/fopencookie.c
index 35afa3257..854bb49e9 100644
--- a/newlib/libc/stdio/fopencookie.c
+++ b/newlib/libc/stdio/fopencookie.c
@@ -122,9 +122,9 @@ _DEFUN(fcwriter, (ptr, cookie, buf, n),
if (c->fp->_flags & __SAPP && c->fp->_seek)
{
#ifdef __LARGE64_FILES
- c->fp->_seek64 (ptr, c->fp->_cookie, 0, SEEK_END);
+ c->fp->_seek64 (ptr, cookie, 0, SEEK_END);
#else
- c->fp->_seek (ptr, c->fp->_cookie, 0, SEEK_END);
+ c->fp->_seek (ptr, cookie, 0, SEEK_END);
#endif
}
errno = 0;
@@ -134,7 +134,7 @@ _DEFUN(fcwriter, (ptr, cookie, buf, n),
}
static _fpos_t
-_DEFUN(fcseeker, (ptr, cookie, off, whence),
+_DEFUN(fcseeker, (ptr, cookie, pos, whence),
struct _reent *ptr _AND
void *cookie _AND
_fpos_t pos _AND
@@ -162,7 +162,7 @@ _DEFUN(fcseeker, (ptr, cookie, off, whence),
#ifdef __LARGE64_FILES
static _fpos64_t
-_DEFUN(fcseeker64, (ptr, cookie, off, whence),
+_DEFUN(fcseeker64, (ptr, cookie, pos, whence),
struct _reent *ptr _AND
void *cookie _AND
_fpos64_t pos _AND