mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-02 16:23:56 +08:00
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:
parent
5b5bf71795
commit
69ef29fdf6
@ -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
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user