Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
dec0fa94
Commit
dec0fa94
authored
Dec 21, 1999
by
Martin v. Löwis
Committed by
Martin v. Löwis
Dec 21, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* filebuf.cc (open): Support ios::ate if _G_HAVE_IO_FILE_OPEN.
From-SVN: r31057
parent
74a7ea12
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
4 deletions
+16
-4
libio/ChangeLog
+4
-0
libio/filebuf.cc
+12
-4
No files found.
libio/ChangeLog
View file @
dec0fa94
1999-12-21 Martin v. Lwis <loewis@informatik.hu-berlin.de>
* filebuf.cc (open): Support ios::ate if _G_HAVE_IO_FILE_OPEN.
1999-12-15 Jason Merrill <jason@casey.cygnus.com>
* filedoalloc.c, floatio.h, iovfprintf.c, iovfscanf.c: Remove
...
...
libio/filebuf.cc
View file @
dec0fa94
/* This is part of libio/iostream, providing -*- C++ -*- input/output.
Copyright (C) 1993, 1995 Free Software Foundation
Copyright (C) 1993, 1995
, 1999
Free Software Foundation
This file is part of the GNU IO Library. This library is free
software; you can redistribute it and/or modify it under the
...
...
@@ -112,15 +112,23 @@ filebuf* filebuf::open(const char *filename, ios::openmode mode, int prot)
if
(
mode
&
(
int
)
ios
::
noreplace
)
posix_mode
|=
O_EXCL
;
#if _G_HAVE_IO_FILE_OPEN
return
(
filebuf
*
)
_IO_file_open
(
this
,
filename
,
posix_mode
,
prot
,
read_write
,
0
);
if
(
!
_IO_file_open
(
this
,
filename
,
posix_mode
,
prot
,
read_write
,
0
))
return
NULL
;
if
(
mode
&
ios
::
ate
)
{
if
(
pubseekoff
(
0
,
ios
::
end
)
==
EOF
)
{
_IO_un_link
(
this
);
return
NULL
;
}
}
return
this
;
#else
int
fd
=
::
open
(
filename
,
posix_mode
,
prot
);
if
(
fd
<
0
)
return
NULL
;
_fileno
=
fd
;
xsetflags
(
read_write
,
_IO_NO_READS
+
_IO_NO_WRITES
+
_IO_IS_APPENDING
);
if
(
mode
&
(
ios
::
ate
|
ios
::
app
)
)
{
if
(
mode
&
ios
::
ate
)
{
if
(
pubseekoff
(
0
,
ios
::
end
)
==
EOF
)
return
NULL
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment