diff options
author | Eric Blake <eblake@redhat.com> | 2007-05-01 23:03:36 +0000 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2007-05-01 23:03:36 +0000 |
commit | b4f095585f1e139cba8d2e078c807e384b3e102d (patch) | |
tree | e7ee261d556586898030b9ac5252c6a2ab3d5c1d /newlib/libc/stdio/findfp.c | |
parent | 2babeb3d94cb8a507ca12b46252995b453600290 (diff) | |
download | cygnal-b4f095585f1e139cba8d2e078c807e384b3e102d.tar.gz cygnal-b4f095585f1e139cba8d2e078c807e384b3e102d.tar.bz2 cygnal-b4f095585f1e139cba8d2e078c807e384b3e102d.zip |
* libc/stdio64/local64.h: Delete, move contents to...
* libc/stdio/local.h: ...here.
* libc/stdio64/fdopen64.c: Update includes.
* libc/stdio64/fopen64.c: Likewise.
* libc/stdio64/freopen64.c: Likewise.
* libc/stdio64/fseeko64.c: Likewise.
* libc/stdio64/ftello64.c: Likewise.
* libc/stdio/findfp.c (std) [__LARGE64_FILES]: Open stdin, stdout,
and stderr with 64-bit offset.
* libc/stdio/fseek.c (_fseek_r): Avoid compile warning.
* libc/stdio/makebuf.c (__smakebuf_r): Likewise.
* libc/stdio/mktemp.c (_gettemp): Likewise.
Diffstat (limited to 'newlib/libc/stdio/findfp.c')
-rw-r--r-- | newlib/libc/stdio/findfp.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/newlib/libc/stdio/findfp.c b/newlib/libc/stdio/findfp.c index ac1354619..43f02ba5f 100644 --- a/newlib/libc/stdio/findfp.c +++ b/newlib/libc/stdio/findfp.c @@ -52,7 +52,13 @@ _DEFUN(std, (ptr, flags, file, data), ptr->_lbfsize = 0; ptr->_cookie = ptr; ptr->_read = __sread; +#ifndef __LARGE64_FILES ptr->_write = __swrite; +#else /* __LARGE64_FILES */ + ptr->_write = __swrite64; + ptr->_seek64 = __sseek64; + ptr->_flags |= __SL64; +#endif /* __LARGE64_FILES */ ptr->_seek = __sseek; ptr->_close = __sclose; #if !defined(__SINGLE_THREAD__) && !defined(_REENT_SMALL) @@ -100,7 +106,7 @@ _DEFUN(__sfp, (d), int n; struct _glue *g; - __sfp_lock_acquire (); + __sfp_lock_acquire (); if (!_GLOBAL_REENT->__sdidinit) __sinit (_GLOBAL_REENT); @@ -113,7 +119,7 @@ _DEFUN(__sfp, (d), (g->_next = __sfmoreglue (d, NDYNAMIC)) == NULL) break; } - __sfp_lock_release (); + __sfp_lock_release (); d->_errno = ENOMEM; return NULL; @@ -123,7 +129,7 @@ found: #ifndef __SINGLE_THREAD__ __lock_init_recursive (fp->_lock); #endif - __sfp_lock_release (); + __sfp_lock_release (); fp->_p = NULL; /* no current pointer */ fp->_w = 0; /* nothing to read or write */ @@ -198,7 +204,7 @@ _DEFUN(__sinit, (s), std (s->_stdin, __SRD, 0, s); - /* on platforms that have true file system I/O, we can verify whether stdout + /* on platforms that have true file system I/O, we can verify whether stdout is an interactive terminal or not. For all other platforms, we will default to line buffered mode here. */ #ifdef HAVE_FCNTL @@ -220,25 +226,25 @@ __LOCK_INIT_RECURSIVE(static, __sinit_lock); _VOID _DEFUN_VOID(__sfp_lock_acquire) { - __lock_acquire_recursive (__sfp_lock); + __lock_acquire_recursive (__sfp_lock); } _VOID _DEFUN_VOID(__sfp_lock_release) { - __lock_release_recursive (__sfp_lock); + __lock_release_recursive (__sfp_lock); } _VOID _DEFUN_VOID(__sinit_lock_acquire) { - __lock_acquire_recursive (__sinit_lock); + __lock_acquire_recursive (__sinit_lock); } _VOID _DEFUN_VOID(__sinit_lock_release) { - __lock_release_recursive (__sinit_lock); + __lock_release_recursive (__sinit_lock); } /* Walkable file locking routine. */ @@ -264,7 +270,7 @@ _DEFUN(__fp_unlock, (ptr), _VOID _DEFUN_VOID(__fp_lock_all) { - __sfp_lock_acquire (); + __sfp_lock_acquire (); _CAST_VOID _fwalk (_REENT, __fp_lock); } |