diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-08-13 18:18:28 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-08-13 18:18:28 +0000 |
commit | 319d719d86e2278ecca219c099c5d6d343a576a1 (patch) | |
tree | 5359adefb397437feb7cf3e0c27cab895bc86cc7 /libio/genops.c | |
parent | 8a82cc302401f7beea53f0395bbba2030ffe587a (diff) | |
download | glibc-319d719d86e2278ecca219c099c5d6d343a576a1.tar.gz glibc-319d719d86e2278ecca219c099c5d6d343a576a1.tar.xz glibc-319d719d86e2278ecca219c099c5d6d343a576a1.zip |
Update.
2000-08-13 Ulrich Drepper <drepper@redhat.com> Benjamin Koznik <bkoz@redhat.com> * libio/fileops.c: Merge with libstdc++-v3. * libio/genops.c: Likewise. * libio/iofclose.c: Likewise. * libio/iofopen.c: Likewise. * libio/iofwide.c: Likewise. * libio/libio.h: Likewise. * libio/libioP.h: Likewise. * libio/stdfiles.c: Likewise. * libio/stdio.c: Likewise. * libio/wfileops.c: Likewise. * libio/wgenops.c: Likewise. * libio/Versions: Export functions needed by libstdc++-v3 in GLIBC_2.2.
Diffstat (limited to 'libio/genops.c')
-rw-r--r-- | libio/genops.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/libio/genops.c b/libio/genops.c index 381c45fa5d..b1ae5afc50 100644 --- a/libio/genops.c +++ b/libio/genops.c @@ -285,8 +285,10 @@ int __underflow (fp) _IO_FILE *fp; { +#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T if (fp->_vtable_offset == 0 && _IO_fwide (fp, -1) != -1) return EOF; +#endif if (fp->_mode == 0) _IO_fwide (fp, -1); @@ -315,8 +317,10 @@ int __uflow (fp) _IO_FILE *fp; { +#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T if (fp->_vtable_offset == 0 && _IO_fwide (fp, -1) != -1) return EOF; +#endif if (fp->_mode == 0) _IO_fwide (fp, -11); @@ -580,6 +584,7 @@ _IO_no_init (fp, flags, orientation, wd, jmp) _IO_lock_init (*fp->_lock); #endif fp->_mode = orientation; +#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T if (orientation >= 0) { fp->_wide_data = wd; @@ -597,6 +602,7 @@ _IO_no_init (fp, flags, orientation, wd, jmp) fp->_wide_data->_wide_vtable = jmp; } +#endif } int @@ -749,9 +755,12 @@ _IO_flush_all () struct _IO_FILE *fp; for (fp = (_IO_FILE *) _IO_list_all; fp; fp = fp->_chain) if (((fp->_mode < 0 && fp->_IO_write_ptr > fp->_IO_write_base) +#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T || (fp->_vtable_offset == 0 && fp->_mode > 0 && (fp->_wide_data->_IO_write_ptr - > fp->_wide_data->_IO_write_base))) + > fp->_wide_data->_IO_write_base)) +#endif + ) && _IO_OVERFLOW (fp, EOF) == EOF) result = EOF; return result; @@ -775,7 +784,9 @@ _IO_unbuffer_write () for (fp = (_IO_FILE *) _IO_list_all; fp; fp = fp->_chain) if (! (fp->_flags & _IO_UNBUFFERED) && (! (fp->_flags & _IO_NO_WRITES) - || (fp->_flags & _IO_IS_APPENDING))) + || (fp->_flags & _IO_IS_APPENDING)) + /* Iff stream is un-orientated, it wasn't used. */ + && fp->_mode != 0) _IO_SETBUF (fp, NULL, 0); } @@ -1021,7 +1032,7 @@ _IO_default_write (fp, data, n) return 0; } -size_t +int _IO_default_showmanyc (fp) _IO_FILE *fp; { |