Commit 80c85eae authored by bkoz's avatar bkoz
Browse files

2003-07-04  Benjamin Kosnik  <bkoz@redhat.com>
            Petur Runolfsson  <peturr02@ru.is>

	* config/io/basic_file_stdio.cc: Revert.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68938 138bc75d-0d04-0410-961f-82ee72b054a4
parent 033443a4
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
......
......@@ -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()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment