summaryrefslogtreecommitdiff
path: root/libstdc++-v3/config/io
diff options
context:
space:
mode:
authorBenjamin Kosnik <bkoz@redhat.com>2003-07-04 21:24:35 +0000
committerBenjamin Kosnik <bkoz@gcc.gnu.org>2003-07-04 21:24:35 +0000
commit69ef29fdf6e21be0729464bbaebff7dac006fc27 (patch)
treeba7bad962f418dcf96dd66c6b40b44883d3550ae /libstdc++-v3/config/io
parent5b5bf71795052950c49778edd75b01af468fc482 (diff)
downloadgcc-69ef29fdf6e21be0729464bbaebff7dac006fc27.tar.gz
basic_file_stdio.cc: Revert.
2003-07-04 Benjamin Kosnik <bkoz@redhat.com> Petur Runolfsson <peturr02@ru.is> * config/io/basic_file_stdio.cc: Revert. Co-Authored-By: Petur Runolfsson <peturr02@ru.is> From-SVN: r68938
Diffstat (limited to 'libstdc++-v3/config/io')
-rw-r--r--libstdc++-v3/config/io/basic_file_stdio.cc36
1 files changed, 18 insertions, 18 deletions
diff --git a/libstdc++-v3/config/io/basic_file_stdio.cc b/libstdc++-v3/config/io/basic_file_stdio.cc
index a5453c24200..8e6695b9f17 100644
--- a/libstdc++-v3/config/io/basic_file_stdio.cc
+++ b/libstdc++-v3/config/io/basic_file_stdio.cc
@@ -207,32 +207,32 @@ namespace std
streamsize
__basic_file<char>::xsgetn(char* __s, streamsize __n)
- { return fread(__s, 1, __n, _M_cfile); }
+ {
+ streamsize __ret;
+ do
+ __ret = read(this->fd(), __s, __n);
+ while (__ret == -1L && errno == EINTR);
+ return __ret;
+ }
streamsize
__basic_file<char>::xsputn(const char* __s, streamsize __n)
- { return fwrite(__s, 1, __n, _M_cfile); }
+ {
+ streamsize __ret;
+ do
+ __ret = write(this->fd(), __s, __n);
+ while (__ret == -1L && errno == EINTR);
+ return __ret;
+ }
streampos
- __basic_file<char>::seekoff(streamoff off, ios_base::seekdir way,
+ __basic_file<char>::seekoff(streamoff __off, ios_base::seekdir __way,
ios_base::openmode /*__mode*/)
- {
- streampos ret(-1);
- fpos_t tmp;
- if (!fseek(_M_cfile, off, way) && !fgetpos(_M_cfile, &tmp))
- ret = tmp;
- return ret;
- }
+ { return lseek(this->fd(), __off, __way); }
streampos
- __basic_file<char>::seekpos(streampos pos, ios_base::openmode /*__mode*/)
- {
- streampos ret(-1);
- fpos_t tmp = pos;
- if (!fsetpos(_M_cfile, &tmp) && !fgetpos(_M_cfile, &tmp))
- ret = tmp;
- return ret;
- }
+ __basic_file<char>::seekpos(streampos __pos, ios_base::openmode /*__mode*/)
+ { return lseek(this->fd(), __pos, ios_base::beg); }
int
__basic_file<char>::sync()