diff options
author | Martin v. Löwis <loewis@informatik.hu-berlin.de> | 2000-01-28 09:55:33 +0000 |
---|---|---|
committer | Martin v. Löwis <loewis@gcc.gnu.org> | 2000-01-28 09:55:33 +0000 |
commit | dfe50efb43c5e5ac48d03f70c3e7d9fcfde37223 (patch) | |
tree | 2a153d1bf6d75395bb6ec0452041e51ce3954856 /libio/fstream.h | |
parent | e8ea81ec7daf700d5781169033d5621d6ada66c4 (diff) | |
download | gcc-dfe50efb43c5e5ac48d03f70c3e7d9fcfde37223.zip gcc-dfe50efb43c5e5ac48d03f70c3e7d9fcfde37223.tar.gz gcc-dfe50efb43c5e5ac48d03f70c3e7d9fcfde37223.tar.bz2 |
fstream.h (ifstream::ifstream): Add ios::in to mode.
* fstream.h (ifstream::ifstream): Add ios::in to mode.
(ifstream::open): Likewise.
(ofstream::ofstream): Add ios::out to mode.
(ofstream::open): Likewise.
From-SVN: r31666
Diffstat (limited to 'libio/fstream.h')
-rw-r--r-- | libio/fstream.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libio/fstream.h b/libio/fstream.h index ea98f5c..b5f6598 100644 --- a/libio/fstream.h +++ b/libio/fstream.h @@ -1,5 +1,5 @@ /* This is part of libio/iostream, providing -*- C++ -*- input/output. -Copyright (C) 1993 Free Software Foundation +Copyright (C) 1993, 2000 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 @@ -62,9 +62,9 @@ class ifstream : public fstreambase, public istream { ifstream(int fd) : fstreambase(fd) { } ifstream(int fd, char *p, int l) : fstreambase(fd, p, l) { } /*Deprecated*/ ifstream(const char *name, int mode=ios::in, int prot=0664) - : fstreambase(name, mode, prot) { } + : fstreambase(name, mode | ios::in, prot) { } void open(const char *name, int mode=ios::in, int prot=0664) - { fstreambase::open(name, mode, prot); } + { fstreambase::open(name, mode | ios::in, prot); } }; class ofstream : public fstreambase, public ostream { @@ -73,9 +73,9 @@ class ofstream : public fstreambase, public ostream { ofstream(int fd) : fstreambase(fd) { } ofstream(int fd, char *p, int l) : fstreambase(fd, p, l) { } /*Deprecated*/ ofstream(const char *name, int mode=ios::out, int prot=0664) - : fstreambase(name, mode, prot) { } + : fstreambase(name, mode | ios::out, prot) { } void open(const char *name, int mode=ios::out, int prot=0664) - { fstreambase::open(name, mode, prot); } + { fstreambase::open(name, mode | ios::out, prot); } }; class fstream : public fstreambase, public iostream { |