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
This commit is contained in:
Benjamin Kosnik 2003-07-04 21:24:35 +00:00 committed by Benjamin Kosnik
parent 5b5bf71795
commit 69ef29fdf6
2 changed files with 23 additions and 18 deletions

View File

@ -1,3 +1,8 @@
2003-07-04 Benjamin Kosnik <bkoz@redhat.com>
Petur Runolfsson <peturr02@ru.is>
* config/io/basic_file_stdio.cc: Revert.
2003-07-04 Paolo Carlini <pcarlini@unitus.it>
* include/bits/deque.tcc: Fully qualify standard

View File

@ -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()